org.apache.tools.ant.taskdefs
public class CallTarget extends Task
<target name="foo">
<antcall target="bar">
<param name="property1" value="aaaaa" />
<param name="foo" value="baz" />
</antcall>
</target>
<target name="bar" depends="init">
<echo message="prop is ${property1} ${foo}" />
</target>
This only works as expected if neither property1 nor foo are defined in the project itself.
Since: Ant 1.2
UNKNOWN: name="antcall" category="control"
| Method Summary | |
|---|---|
| void | addConfiguredTarget(Ant.TargetElement t)
Add a target to the list of targets to invoke. |
| void | addPropertyset(PropertySet ps)
Set of properties to pass to the new project. |
| void | addReference(Ant.Reference r)
Reference element identifying a data type to carry
over to the invoked target. |
| Property | createParam()
Create a new Property to pass to the invoked target(s). |
| void | execute()
Delegate the work to the ant task instance, after setting it up. |
| 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()
Initialize this task by creating new instance of the ant task and
configuring it by calling its own init method. |
| void | setInheritAll(boolean inherit)
If true, pass all properties to the new Ant project.
|
| void | setInheritRefs(boolean inheritRefs)
If true, pass all references to the new Ant project.
|
| void | setTarget(String target)
Set target to execute. |
Parameters: t Ant.TargetElement representing the target.
Since: Ant 1.6.3
Parameters: ps the PropertySet to pass.
Since: Ant 1.6
Parameters: r the specified Ant.Reference.
Since: Ant 1.5
Returns: a Property object.
Throws: BuildException on validation failure or if the target didn't execute.
Since: Ant 1.6
See Also: (byte[], int, int)
Parameters: inherit boolean flag.
Parameters: inheritRefs boolean flag.
Parameters: target the name of the target to execute.