Let me preface by saying that I'm new to ant, and I'm using version 1.6.5 if it matters.
I have a file with a list of files that I want to concatenate. The relevant part of my first attempt was this:
<target name="for-each">
<xmlproperty file="scripts.xml" collapseAttributes="true" />
<echo message="testing for-each"/>
<concat destfile="${out}" fixlastline="yes" eol="lf">
<foreach list="${scripts.src}" target="loop" param="var" delimiter=","/>
</concat>
</target>
<target name="loop">
<echo message="File :: ${var}"/>
<fileset file="${SRC_DIR}${var}" />
</target>
However, concat doesn't support the foreach element.
I don't simply want to cut and paste a fileset into the concat element because it's reused and may be changed in the original file often, so I want to programmaticly iterate over the script elements listed in my file instead.
What would the right syntax be or how would I accomplish this?