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>. |
Constructor Summary | |
---|---|
Ant()
simple constructor | |
Ant(Task owner)
create a task bound to its creator |
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 ref)
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. |
protected Project | getNewProject()
Get the (sub)-Project instance currently in use. |
void | handleErrorFlush(String errorOutputToFlush)
Handle error output.
|
void | handleErrorOutput(String errorOutputToHandle)
Handle error output.
|
void | handleFlush(String toFlush)
Handles output.
|
int | handleInput(byte[] buffer, int offset, int length)
Handles input.
|
void | handleOutput(String outputToHandle)
Handles output.
|
void | init()
Creates a Project instance for the project to call. |
void | setAntfile(String antFile)
The build file to use. |
void | setDir(File dir)
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 outputFile)
Set the filename to write the output to. |
void | setTarget(String targetToAdd)
The target of the new Ant project to execute.
|
Parameters: owner owning task
Parameters: t the TargetElement
to add.
Since: Ant 1.6.3
Parameters: ps PropertySet
to add.
Since: Ant 1.6
Parameters: ref 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.
Returns: Project
Since: Ant 1.7
Parameters: errorOutputToFlush The string to output.
Since: Ant 1.5.2
See Also: handleErrorFlush
Parameters: errorOutputToHandle The string to output.
Since: Ant 1.5
See Also: handleErrorOutput
Parameters: toFlush The string to output.
Since: Ant 1.5.2
See Also: handleFlush
Parameters: buffer the buffer into which data is to be read. offset the offset into the buffer at which data is stored. length the amount of data to read.
Returns: the number of bytes read.
Throws: IOException if the data cannot be read.
Since: Ant 1.6
See Also: (byte[], int, int)
Parameters: outputToHandle The string output to output.
Since: Ant 1.5
See Also: handleOutput
Parameters: antFile the String
build file name.
Parameters: dir 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: outputFile the name of the file to which the output should go.
Parameters: targetToAdd the name of the target to invoke.