Combine filesets using Ant -



Combine filesets using Ant -

i have 2 different filesets defined in ant follows:

<fileset id="fileset1" dir="${classes.dir}"> </fileset> <zipfileset id="fileset2" src="myarchive.zip" includes="**/*.class"> </zipfileset>

i want create 3rd fileset union of both above filesets

<fileset id="merged"> </fileset>

can tell me how ? possible ? in advance!

one way ant resource collections, in particular union.

<fileset id="fileset1" dir="${classes.dir}" /> <zipfileset id="fileset2" src="myarchive.zip" includes="**/*.class" /> <union id="onion"> <resources refid="fileset1" /> <resources refid="fileset2" /> </union>

then can refer 'onion' anywhere might utilize fileset, e.g.

<copy todir="dest"> <resources refid="onion" /> </copy>

i recommend using generic resources elements rather filesets maximum flexibility.

ant

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -