ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: fileset with multiple source directories?
Date Mon, 12 May 2003 21:07:12 GMT

Ok, but how do I derive the individual directories for each fileset without 
looping through the colon-separated list of directories?

So, from...

contrib/subdir1 : contrib/subdir2 : contrib/subdir3

How to I create separate filesets corresponding to each of the dirs 
above?  Am I missing something?  And why the extra <path> elements.  The 
refid for <pathconvert> is said to take a refid for a <fileset>, so why not 
just use that directly by adding an id to each fileset?

I also can't hardcode the <fileset> or <pathconvert> statements.  I need to 
be able to run this on as many (or as few) paths as there exist 
colon-separated directories.

Am I just being very dense today or is your solution not quite matching 
what I need?


At 02:46 PM 5/12/2003 -0500, you wrote:
> > Or did you mean
> > create individual filesets and then create one fileset that contains all
> > those filesets?
>yes, call pathconvert for all filesets (u can create these filesets rite 
>?) and
>incrementally build the property that concatenates all of them to have a final
>property containing all the files under all ur dirs:
><path id="path1">
><fileset dir="dir1">
><path id="path2">
><fileset dir="dir2">
><pathconvert property="p1" refid="path1">
><pathconvert property="p2" refid="path2">
>assign global property to p1,p2,p3 ....
>then convert ur global property into a fileset using the includes attribute.
>if do so, u don't need to use the foreach since ur copy task will already 
>be in
>fileset format.
>also note that if this list is directly the list of subdirs under one dir 
>then u
>can compute it dynamically with the same dirset/pathconvert strategy, if 
>not then
>hardcode the list (as u wd have to do anyway with for-each)
>To unsubscribe, e-mail:
>For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message