Al Le
2017-06-03 21:20:47 UTC
Hello,
is it possible to define a task in Ant which would have some nested
elements? Sort of like how it's done with the macrodef task but with a
bit structure.
For example, I'd like to define a task which would be used as follows:
<mytask>
<paramA value="AAA1"/>
<paramA value="AAA2"/>
<paramB value="BBB"/>
</mytask>
This should internally translate to
<java classname="some.Class">
<arg value="-parameterA"/> <arg value="AAA1"/>
<arg value="-parameterA"/> <arg value="AAA2"/>
<arg value="-parameterB"/> <arg value="BBB"/>
</java>
I.e. a <paramA> in the custom task should result in two args for the
java task.
I know I could write a custom task in Java using an instance of the java
task in the implementation. But I'd like to know whether (and how) it's
possible to do this directly in Ant (possibly with javascript), i.e.
without having to have some external JARs.
Thank you for any hints!
AL
---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@ant.apache.org
For additional commands, e-mail: user-***@ant.apache.org
is it possible to define a task in Ant which would have some nested
elements? Sort of like how it's done with the macrodef task but with a
bit structure.
For example, I'd like to define a task which would be used as follows:
<mytask>
<paramA value="AAA1"/>
<paramA value="AAA2"/>
<paramB value="BBB"/>
</mytask>
This should internally translate to
<java classname="some.Class">
<arg value="-parameterA"/> <arg value="AAA1"/>
<arg value="-parameterA"/> <arg value="AAA2"/>
<arg value="-parameterB"/> <arg value="BBB"/>
</java>
I.e. a <paramA> in the custom task should result in two args for the
java task.
I know I could write a custom task in Java using an instance of the java
task in the implementation. But I'd like to know whether (and how) it's
possible to do this directly in Ant (possibly with javascript), i.e.
without having to have some external JARs.
Thank you for any hints!
AL
---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@ant.apache.org
For additional commands, e-mail: user-***@ant.apache.org