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.
Constructor and Description |
---|
CallTarget() |
Modifier and Type | Method and Description |
---|---|
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)
Handle error output.
|
void |
handleErrorOutput(String output)
Handle error output.
|
void |
handleFlush(String output)
Handles output.
|
int |
handleInput(byte[] buffer,
int offset,
int length)
Handles input.
|
void |
handleOutput(String output)
Handles 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.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
public void addConfiguredTarget(Ant.TargetElement t)
t
- Ant.TargetElement
representing the target.public void addPropertyset(PropertySet ps)
ps
- the PropertySet
to pass.public void addReference(Ant.Reference r)
r
- the specified Ant.Reference
.public Property createParam()
Property
object.public void execute() throws BuildException
execute
in class Task
BuildException
- on validation failure or if the target didn't
execute.public void handleErrorFlush(String output)
handleErrorFlush
in class Task
output
- The string to output.Task.handleErrorFlush(String)
public void handleErrorOutput(String output)
handleErrorOutput
in class Task
output
- The string to output.Task.handleErrorOutput(String)
public void handleFlush(String output)
handleFlush
in class Task
output
- The string to output.Task.handleFlush(String)
public int handleInput(byte[] buffer, int offset, int length) throws IOException
handleInput
in class Task
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.IOException
- if the data cannot be read.Task.handleInput(byte[], int, int)
public void handleOutput(String output)
handleOutput
in class Task
output
- The string output to output.Task.handleOutput(String)
public void init()
public void setInheritAll(boolean inherit)
inherit
- boolean
flag.public void setInheritRefs(boolean inheritRefs)
inheritRefs
- boolean
flag.public void setTarget(String target)
target
- the name of the target to execute.