org.apache.tools.ant.taskdefs
public class Ant 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>
Since: Ant 1.1
UNKNOWN: category="control"
Nested Class Summary | |
---|---|
static class | Ant.Reference
Helper class that implements the nested <reference>
element of <ant> and <antcall>. |
static class | Ant.TargetElement
Helper class that implements the nested <target>
element of <ant> and <antcall>. |
Method Summary | |
---|---|
void | addConfiguredTarget(Ant.TargetElement t)
Add a target to this Ant invocation. |
void | addPropertyset(PropertySet ps)
Add a set of properties to pass to the new project.
|
void | addReference(Ant.Reference r)
Add a 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. |
void | handleErrorFlush(String output) |
void | handleErrorOutput(String output) |
void | handleFlush(String output) |
int | handleInput(byte[] buffer, int offset, int length) |
void | handleOutput(String output) |
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)
Set the filename to write the output to. |
void | setTarget(String s)
The target of the new Ant project to execute.
|
Parameters: t the TargetElement
to add.
Since: Ant 1.6.3
Parameters: ps PropertySet
to add.
Since: Ant 1.6
Parameters: r Reference
to add.
Returns: the created Property
object.
Throws: BuildException if a target tries to call itself; probably also if a BuildException is thrown by the new project.
Since: Ant 1.6
See Also: (byte[], int, int)
Parameters: s the String
build file name.
Parameters: d new directory as File
.
Parameters: value if true pass all properties to the new Ant project.
Parameters: value if true, pass all references to the new Ant project
Parameters: s the name of the file to which the output should go.
Parameters: s the name of the target to invoke.