I would like to understand that is the following possible in Ant
-
Read a property
eg : ${for.loop.condition} -
Based on the above property value , create a for loop
-
And loop dynamically create a string from that value
I have read on the ant-contrib task , but not so sure whether that would help me out.
Any examples would help me
You can use a variable where a list of values are concatenated to control the iteration, so you can decide what to do with each value. Check this post it may help you to use the “for” tag.
You can also use the for-each tag to iterate through a set of values selected with a fileset tag.
Here’s another example about how to use foreach tag.