Define a list or a set of variables in ant
ant, for-loop, java, list
Solution
Not sure if this is what you meant:
<echo message="The first five letters of the alphabet are:"/>
<for list="a,b,c,d,e" param="letter">
<sequential>
<echo>Letter @{letter}</echo>
</sequential>
</for>
Problem
I'd like to define a list of variables in ant build file in order to use for loop with this list in my tasks. How can I do that? p.s.: It should be something like the following: ``` <varlist name="mylist"> <!-- Actually, there is no such tag in Ant --> <item>someThing</item> <item>anotherThing</item> </varlist> ... <for param="item" list="${mylist}"> <sequential> <echo>@{item}</echo> </sequential> </for> ```