
org.jvnet.maven.plugin.antrun.IfTask Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maven-antrun-extended-plugin Show documentation
Show all versions of maven-antrun-extended-plugin Show documentation
This extended antrun maven plugin enables users not only to run ant scripts embedded in the POM, but also to reference maven dependencies using Ant task classes. This enables the user to delegate more complex tasks to Ant such as constructing file-based installation distros.
The newest version!
package org.jvnet.maven.plugin.antrun;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.taskdefs.Sequential;
/**
* Conditional execution.
*
* @author Kohsuke Kawaguchi
*/
public class IfTask extends Sequential {
private Boolean test;
public void setTest(boolean value) {
this.test = value;
}
public void execute() throws BuildException {
if(test())
super.execute();
}
private boolean test() throws BuildException {
if(test!=null)
return test;
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy