I need to copy only specific files using ant script. The number of files might vary and I want to configure this in the properties file.
For example, the following code copies all *.java files in ${src.dir}
<project default="compile">
<target name="compile">
<copy todir="c:\temp\output">
<fileset dir="${src.dir}" includes="*.java" />
</copy>
</target>
</project>
However, if I want only 3 files lets say A.java, B.java and C.java, I can not do that. I can ofcoure hard code those 3 filenames, but the number and filenames might change every time.
Is there some way so that I can pass the file names as parameters (or read from properties file) dynamically?
Any help in this regard is appreciated.