ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject FileSet and FileList limitations summary
Date Wed, 12 Jun 2002 17:06:38 GMT
I have been searching the archives for a solution to a common problem in my
ant scripts: the desire to parameterize an ant script through properties.

The fundamental limitation comes when trying to populate FileList-like or
FileSet-like things on a Windows platform with files pulled from multiple
root directories.

For example, to support <war> task, I must collect all my dependent JAR
files into one or more local directories because the <war> task only
supports a nested FileSet-like collection of files for the library files.

To support this, I thought I would copy the files I need to a local
directory.  However, the <copy> task also only supports a FileSet for the
list of files to copy.

The problem comes because the files I need to copy (in order to be
flexible) may come from different file systems that are not all connected
by a common root.  On UNIX, this is tolerable since I can always fall back
on "/" as the base directory for the FIleSet.  On Windows, as has been
pointed out, this is not an option.

Once I have the FileSet I want, I can convert it to a Path easily enough,
but I can't start with a string path of absolute filenames (perfect for a
property file) and convert it to a FileSet.

I am glad to see 1.5Beta2 include number of new extensions, but it still
seems to fall short of providing some really useful improvements.

What I would like to see is something like a FileCollection that can be
arbitrarily constructed by any of a number of subtasks like FileSet,
FileList, Path, or whatever, and automatically converted to support the
view that makes sense to the task using it.  I scanned to Ant 2.0 reqs and
did not see any discussion of this capability there either.

Dr. Roger Cass, Architect
American Modern Insurance Group (

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message