File Enumeration with ANT

Posted by 1ndivisible on Stack Overflow See other posts from Stack Overflow or by 1ndivisible
Published on 2010-05-14T11:40:57Z Indexed on 2010/05/14 11:44 UTC
Read the original article Hit count: 285

Filed under:
|

I feel like I'm missing something obvious at the moment. I want to collect a set of dirs / files together in ANT. I know I can do it using a fileset with an optional patternset inside it, but that involves searching for files based a specific criterior - filetype, name etc.

I already know the paths to the files I want to collect. I have n properties which reference these paths. I want a way to collect these paths in a fileset, though I cannot find a way to do it.

This represents what I want to achieve (I know it isn't valid code, but hopefully it will describe what I mean):

<fileset>
   <path>${src.dir}</path>
   <path>${test.dir}</path>
   <path>${third.party.src.dir}</path>
   <path>${bin.dir}</path>
   <path>${docs.build.txt}</path>
</fileset>

© Stack Overflow or respective owner

Related posts about ant

Related posts about fileset