Background: I read names from an XML file and want to map them to source and target paths for a build task. I am not an experienced Ant user and I'm looking for a way to that is
- ”readable”
- robust and
- can be used to determine if targets are out of date (preferably using tasks from Ant or Ant Contrib).
Sample xml:
<list><value>The first name<value><value>The second name</value></list>
Desired resultset:
${dir}/The first name.${ext}
${dir}/The second name.${ext}
I can build the path to each file using pathconvert
or mappedresources
but I haven't been able to map either result back to a collection of file resources that I can use in a dependset
. Is there an elegant solution to this problem?
ANT is not a programming language. Easy to embed groovy.
Example
Run as follows
sample.xml
build.xml