How to dynamically generate a fileset based on user input?
Given this directories :
root
--dir1
----filesA.txt
----subdir1_1
--dir2
----filesB.xml
--dir3
----filesC.java
----subdir3_1
--dir4
----filesD.txt
----subdir4_1
------subdir4_1_1
and that command-line call :
ant -Ddirectory="dir1 dir3"
<target name="zip">
<zip destfile="${root}/archive.zip">
<fileset dir="${root}">
<include name="**/*"/>
</fileset>
</zip>
</target>
I want to zip only the directory (and theirs subfiles) specified by the user. I have thought using the PropertyRegex tasks but I thought that's an ugly way to do it.