All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kuali.maven.mojo.GetJobMojo Maven / Gradle / Ivy

package org.kuali.maven.mojo;

import org.apache.maven.plugin.MojoExecutionException;

/**
 * Connect to a Jenkins server and retrieve an XML document describing the job configuration
 * 
 * @goal getjob
 * @requiresDependencyResolution test
 */
public class GetJobMojo extends AbstractCliMojo {

	/**
	 * The command issued to Jenkins CLI
	 * 
	 * @parameter expression="${jenkins.cmd}" default-value="get-job"
	 * @required
	 */
	private String cmd;

	/**
	 * The type of job. This is combined with artifactId and majorVersion to produce a fully qualified job name. eg "jenkins-maven-plugin-1.0-publish"
	 * 
	 * @parameter expression="${jenkins.type}" default-value="publish"
	 */
	private String type;

	/**
	 * The name of the job to retrieve XML for
	 * 
	 * @parameter expression="${jenkins.name}"
	 */
	private String name;

	@Override
	public void execute() throws MojoExecutionException {
		helper.getJob(this, name, type);
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCmd() {
		return cmd;
	}

	public void setCmd(String cmd) {
		this.cmd = cmd;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy