net.sf.antcontrib.logic
public class AntFetch extends Task
<target name="foo" depends="init">
<ant antfile="build.xml" target="bar" >
<property name="property1" value="aaaaa" />
<property name="foo" value="baz" />
</ant> </target> <target name="bar"
depends="init"> <echo message="prop is ${property1}
${foo}" /> </target>
Developed for use with Antelope, migrated to ant-contrib Oct 2003.
Credit to Costin for the original <ant> task, on which this is based.
Since: Ant 1.1
UNKNOWN: category="control"
| Nested Class Summary | |
|---|---|
| static class | AntFetch.Reference
Helper class that implements the nested <reference> element of
<ant> and <antcall>.
|
| Method Summary | |
|---|---|
| void | addReference(AntFetch.Reference r)
Reference element identifying a data type to carry over to the new
project.
|
| Property | createProperty()
Property to pass to the new project. |
| void | execute()
Do the execution.
|
| protected void | handleErrorOutput(String line)
Pass output sent to System.err to the new project.
|
| protected void | handleOutput(String line)
Pass output sent to System.out to the new project.
|
| void | init() Creates a Project instance for the project to call. |
| void | setAntfile(String s)
The build file to use. |
| void | setDir(File d)
The directory to use as a base directory for the new Ant project. |
| void | setInheritAll(boolean value)
If true, pass all properties to the new Ant project. |
| void | setInheritRefs(boolean value)
If true, pass all references to the new Ant project. |
| void | setOutput(String s)
Filename to write the output to. |
| void | setReturn(String r)
Set the property or properties that are set in the new project to be
transfered back to the original project. |
| void | setTarget(String s)
The target of the new Ant project to execute. |
Parameters: r The feature to be added to the Reference attribute
Returns: Description of the Return Value
Throws: BuildException Description of the Exception
Parameters: line Description of the Parameter
Since: Ant 1.5
Parameters: line Description of the Parameter
Since: Ant 1.5
Parameters: s The new antfile value
Parameters: d The new dir value
Parameters: value The new inheritAll value
Parameters: value The new inheritRefs value
Parameters: s The new output value
Parameters: r the name of a property in the new project to set in the original project. This may be a comma separate list of properties.
Parameters: s The new target value