ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Gugel" <alex.gu...@100world.de>
Subject Filesets
Date Thu, 06 Jun 2002 08:46:52 GMT
Hi,

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 ...>
   </copy>
</target>

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",
like:

<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"/>
  ...
</fileset>

Then we could simple write:

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


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

Thanks,
alex



----------------------------------------------------------
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      
alex.gugel@100world.com             www.100world.com
----------------------------------------------------------

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message