001 package org.kuali.maven.mojo; 002 003 import org.apache.maven.plugin.MojoExecutionException; 004 005 /** 006 * Connect to a Jenkins server and delete a job 007 * 008 * @goal deletejob 009 * @requiresDependencyResolution test 010 */ 011 public class DeleteJobMojo extends AbstractCliMojo { 012 013 /** 014 * The command issued to Jenkins CLI 015 * 016 * @parameter expression="${jenkins.cmd}" default-value="delete-job" 017 * @required 018 */ 019 private String cmd; 020 021 /** 022 * The type of job to delete 023 * 024 * @parameter expression="${jenkins.type}" default-value="publish" 025 * @required 026 */ 027 private String type; 028 029 /** 030 * The name of the job to delete. If name is provided, 'type' is ignored 031 * 032 * @parameter expression="${jenkins.name}" 033 * @required 034 */ 035 private String name; 036 037 @Override 038 public void execute() throws MojoExecutionException { 039 helper.executeCliJobCommand(this, name, type); 040 } 041 042 public String getType() { 043 return type; 044 } 045 046 public void setType(String type) { 047 this.type = type; 048 } 049 050 public String getCmd() { 051 return cmd; 052 } 053 054 public void setCmd(String cmd) { 055 this.cmd = cmd; 056 } 057 058 public String getName() { 059 return name; 060 } 061 062 public void setName(String name) { 063 this.name = name; 064 } 065 066 }