I have an ant script that compile my program, build the jar and then run it. My program takes one argument that is a file.
In my run target I would like to be able to execute my jar with all the files that are in a specified folder, one by one, as argument.
Do I have to write all the different cases by hand like:
<target name="run" depends="jar">
<mkdir dir="${output.dir}" />
<java jar="${myjar}.jar" output="${output.dir}/${test1}" fork="true">
<arg value="${test.dir}/${test1}" />
</java>
<java jar="${myjar}.jar" output="${output.dir}/${test2}" fork="true">
<arg value="${test.dir}/${test2}" />
</java>
#and so on
</target>
or is there a way to maybe iterate over my test directory and save me the writing of 20 other cases?
Thanks.