Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
AW: How to use multiple filesets with classpath AND copy

AW: How to use multiple filesets with classpath AND copy

2005-06-13       - By Jan.Materne@(protected)
Reply:     1     2     3  

A fileset has a common base directory. There are no nested filesets.
Have you had a look at <path>s?

There are some tasks which dont support <path>s, and <copy> is one of them [1]
- oh, there
was some work ... maybe a nightly build would work :-)

Alternatively you could iterate over filesets
 <for param="fs.id" list="foodir,bardir">
     <sequential>
         <copy todir="...">
             <fileset refid="@{fs.id}"/>
         </copy>
     </sequential>
 </for>


Jan

[1] http://issues.apache.org/bugzilla/show_bug.cgi?id 635



>-----Urspr?ngliche Nachricht-----
>Von: Rick Mann [mailto:rmann@(protected)]
>Gesendet: Samstag, 11. Juni 2005 02:15
>An: user@(protected)
>Betreff: How to use multiple filesets with classpath AND copy
>
>Hi. I'm building a handful of Struts webapps, and would like to do
>this in my build scripts:
>
>I want to specify a collection of .jar files from several different
>directories, and I want to refer to the entire collection with a
>single id. Now, I can make a fileset or filelist for a directory,
>give it an ID and reference it in a classpath or a copy structure.
>But I need to make two or three of these. I don't want my copy tags
>or classpath tags to have to reference more than a single file-
>structure ID.
>
>I need some kind of nested fileset. Is there any other way to do it?
>I want the equivalent of the following (of course, using filelists or
>whatever inside). Any ideas?
>
>
>
><fileset id="myFileSet">
>     <fileset dir="foodir">
>         <include name="log4j-1.2.8.jar"/>
>         <include name="lucene-1.4.2.jar"/>
>     </fileset>
>
>     <fileset dir="bardir">
>         <include name="something.jar"/>
>         <include name="somethingelse.jar"/>
>     </fileset>
></fileset>
>
>...
>
>
><classpath>
>     <fileset refid="myFileSet"/>
></classpath>
>
>
>...
>
><copy todir="${app.build}" preservelastmodified="true">
>     <fileset refid="myFileSet"/>
></copy>
>
>
>Thanks!
>
>
>--
>Rick
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@(protected)
>For additional commands, e-mail: user-help@(protected)
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.