Can I write an ant task which takes parameters when being executed from another ant task?
What I try to achieve in general, is re-using existing tasks with different parameters.
What I don't know is:
- is there something such a sub-task in ant?
- can it take parameters?
- how and where such sub-task is specified?
Concept of what I need to achieve:
Sub Ant task, which takes parameters param1 and param2:
<someAntCommand att="$param1"/>
<someOtherAntCommand att="$param2"/>
Main Ant task, which executes the sub task:
<doSomethingToExecSubTask somePointerToTaskOrFile="...">
<param name="param1"> hello </param>
<param name="param2"> world </param>
</doSomethingToExecSubTask>
<doSomethingToExecSubTask somePointerToTaskOrFile="...">
<param name="param1"> hello </param>
<param name="param2"> universe </param>
</doSomethingToExecSubTask>