You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rick Mann <rm...@latencyzero.com> on 2005/06/11 02:15:05 UTC

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@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org