ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: FileSet within FileSet
Date Fri, 05 Dec 2003 14:04:20 GMT
On Fri, 05 Dec 2003, Thomas Lionel SMETS <tsmets@netscape.net> wrote:

>     <fileset id="compiled.files"
>          dir="${build.dir}">
>         <patternset refid="pattern.class.files" />
>     </fileset>
> 
>     <!-- The list with all the jars /  libraries -->
>     <fileset id="lib.files"
>          dir="${lib.dir}" >
>         <patternset refid="pattern.lib.files" />     
>     </fileset>          
>
> Now for creating my jar, the would like to include both file sets
> defined here above, to have something like : 
>
>    <!-- The files to be jarred -->
>    <fileset id="jarred.files">
>        <include refid="compiled.files" />
>        <include refid="lib.files" />   
>        <include refid="java.files" unless="${prod.flag}" />    
>    </fileset>

which doesn't work as you can't nest filesets into filesets - as
filesets are rooted in a common dir by (Ant's) definition.

You could simply use

<jar ...>
  <fileset refid="compiled.files" />
  <fileset refid="lib.files" />   
  <fileset refid="java.files" unless="${prod.flag}" />    
</jar>

but I assume you want to pass the collection of filesets around (or is
there any other reason you don't want to place them under <jar>?).
What are the "other things" you intended to do with your jarred.files
fileset?

Stefan

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


Mime
View raw message