Methods Summary |
---|
public java.io.File | resolve(org.apache.tools.ant.taskdefs.optional.extension.Extension extension, org.apache.tools.ant.Project project)Returns the resolved file
validate();
final Ant ant = new Ant();
ant.setProject(project);
ant.setInheritAll(false);
ant.setAntfile(antfile.getName());
try {
final File dir =
antfile.getParentFile().getCanonicalFile();
ant.setDir(dir);
} catch (final IOException ioe) {
throw new BuildException(ioe.getMessage(), ioe);
}
if (null != target) {
ant.setTarget(target);
}
ant.execute();
return destfile;
|
public void | setAntfile(java.io.File antfile)Sets the ant file
this.antfile = antfile;
|
public void | setDestfile(java.io.File destfile)Sets the destination file
this.destfile = destfile;
|
public void | setTarget(java.lang.String target)Sets the target
this.target = target;
|
public java.lang.String | toString()Returns a string representation
return "Ant[" + antfile + "==>" + destfile + "]";
|
private void | validate()
if (null == antfile) {
final String message = "Must specify Buildfile";
throw new BuildException(message);
}
if (null == destfile) {
final String message = "Must specify destination file";
throw new BuildException(message);
}
|