> I would definitely like the ability to combine filesets, personally... > it places less onus on the task creator to add explicit > support to reference files in different locations. > > I think that it is critical to support merging filesets with > different basedirs, given this is probably the most requested > feature for some tasks, such as the <zip> task - create a zip > including files from different folders... the path to the > file from the basedir is very important when determining the > retained path in the zip.
Ok, lets discuss that on "test-case" example: <fileset id="foo1" basedir="."> <include name="world.peace" /> <include name="*.war" /> </fileset> <fileset id="foo2" basedir="..\t2\"> <includesfileset refid="foo1" /> <include name="reefer.saddness" /> <include name="*.war" /> </fileset> both dirs includes 3 files: reefer.saddness world.peace world.war What should Scan() on foo2 return? It always returns full pathnames so I'd expect simply: c:\foo\t1\world.peace c:\foo\t1\world.war c:\foo\t2\world.war c:\foo\t2\reefer.saddness Not very handy for <zip> task, I think... Perhaps <zip> is better with filesetcollection (each with different basedir) as it is in current design. Some better ideas? ------------------ > Regarding includes/excludes conflicts, I think it would make > the most sense (ie- least support queries) to offer both: > > Logical intersection of two filesets - include all files > referenced in each fileset, regardless if that file is > excluded by the other > fileset: > <fileset> > <include fileset="fileset1"/> > <include fileset="fileset2"/> > </fileset> > Logical subtraction of two filesets - include those files in > fileset1 that are not in fileset2: > <fileset> > <include fileset="fileset1"/> > <exclude fileset="fileset2"/> > </fileset> > I'm not convinced it makes sense to include logical > intersection of two filesets. > Regarding determining "hits" between the contents of filesets > for subtraction, I would suggest comparison based on path to > the file relative to the containing fileset's basedir... so > the file /a/b/c/d with a basedir of /a/b and the file > /x/y/z/c/d with a basedir of /x/y/z would have the same relative path. First could be easy. For exclusion, we could compare full referenced (scanned) filenames. But what if I do this: <fileset> <include fileset="foo1"/> <exclude name="*.war"/> </fileset> ? Should be "c:\foo\t1\world.war" excluded from result fileset. What if basedir differs? Any ideas are welcomed (as always :-) Martin ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers