/** * Creates the <ant> task configured to run a specific target. * * @param directory : if not null the directory where the build should run * @return the ant task, configured with the explicit properties and references necessary to run * the sub-build. */ private Ant createAntTask(File directory) { Ant ant = (Ant) getProject().createTask("ant"); ant.setOwningTarget(getOwningTarget()); ant.setTaskName(getTaskName()); ant.init(); if (target != null && target.length() > 0) { ant.setTarget(target); } if (output != null) { ant.setOutput(output); } if (directory != null) { ant.setDir(directory); } ant.setInheritAll(inheritAll); for (Enumeration i = properties.elements(); i.hasMoreElements(); ) { copyProperty(ant.createProperty(), (Property) i.nextElement()); } for (Enumeration i = propertySets.elements(); i.hasMoreElements(); ) { ant.addPropertyset((PropertySet) i.nextElement()); } ant.setInheritRefs(inheritRefs); for (Enumeration i = references.elements(); i.hasMoreElements(); ) { ant.addReference((Ant.Reference) i.nextElement()); } return ant; }
public Property createParam() { return callee.createProperty(); }
/** Property to pass to the invoked target. */ public Property createParam() { if (callee == null) { init(); } return callee.createProperty(); }