ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Gugel" <>
Subject Filesets
Date Thu, 06 Jun 2002 08:46:52 GMT

I think the fileset concept is great, but it has some limitations which
could be removed. Most of our build.xml files got generated by a tool.
The target to copy our libs to build/lib is something like this:

<target name="copy-libs-to-build-lib">
  <copy todir="build/lib">
    <fileset dir="${contrib}/jakarta/jaxp/v1.0/lib"/>
    <fileset dir="${contrib}/jakarta/oro/v1.0/lib"/>
    much other generated stuff
    <mapper ...>

Problem: Ant stops processing if a fileset-directory (specified with the
"dir"-attribute) does not exist. Why can't Ant simple create an empty
fileset? At the time the build.xml file gets generated we can't decide
whether a directory exists or not because it might get created later.

Furthermore it would be great to have some kind of  "super-file-set",

<fileset id="libs-to-copy">  // no directory specified here!
  <fileset dir="i-does-not-exist-but-it-doesnt-matter"/>
  <fileset dir="i-does-exist"/>
  <fileset dir="i-does-exist-but-nobody-wants-me"/>

Then we could simple write:

<copy todir="build/lib">
   <fileset refid="libs-to-copy/>
   <exclude name="**/i-does-exist-but-nobody-wants-me/**"/>

What do you think. Could that be a useful feature, or do I miss some
points in the existing capabilities of Ant 1.5?


Alexander Gugel                     100world AG
Dipl.-Inf. (FH)                     Vordere Cramergasse 11
Professional Services               D-90478 N├╝rnberg

Fon: +49 (0)911 4244-210            
Fax: +49 (0)911 4244-XXX   

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

View raw message