View Javadoc

1   package org.kuali.maven.mojo;
2   
3   import org.apache.maven.plugin.MojoExecutionException;
4   
5   /**
6    * Connect to a Jenkins server and schedule a job to run
7    * 
8    * @goal runjob
9    * @requiresDependencyResolution test
10   */
11  public class RunJobMojo extends AbstractCliMojo {
12  
13  	/**
14  	 * The command issued to Jenkins CLI
15  	 * 
16  	 * @parameter expression="${jenkins.cmd}" default-value="build"
17  	 * @required
18  	 */
19  	private String cmd;
20  
21  	/**
22  	 * The type of job to run
23  	 * 
24  	 * @parameter expression="${jenkins.type}" default-value="publish"
25  	 * @required
26  	 */
27  	private String type;
28  
29  	/**
30  	 * The explicit name of a job to run. If name is provided, 'type' is ignored
31  	 * 
32  	 * @parameter expression="${jenkins.name}"
33  	 * @required
34  	 */
35  	private String name;
36  
37  	@Override
38  	public void execute() throws MojoExecutionException {
39  		helper.executeCliJobCommand(this, name, type);
40  	}
41  
42  	public String getType() {
43  		return type;
44  	}
45  
46  	public void setType(String type) {
47  		this.type = type;
48  	}
49  
50  	public String getCmd() {
51  		return cmd;
52  	}
53  
54  	public void setCmd(String cmd) {
55  		this.cmd = cmd;
56  	}
57  
58  	public String getName() {
59  		return name;
60  	}
61  
62  	public void setName(String name) {
63  		this.name = name;
64  	}
65  
66  }