ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Overriding filesets
Date Mon, 29 Jan 2007 17:14:20 GMT

--- Andre Dantas Rocha <andre.dantas.rocha@uol.com.br>
wrote:

> Hello,
> 
> Suppose I have this fileset:
> 
> <fileset dir="${lib.dir}" id="war.lib.jars">
>    <include name="*.jar"/>
> </fileset>
> 
> And I'd like to override it, including one more file
> (misc_${env}.jar):
> 
> <fileset dir="${lib.dir}" id="war.lib.jars">
>    <!- I have to repeat all jars! -->
>    <include name="*.jar"/>
>    <include name="misc/misc_${env}.jar"/>
> </fileset>
> 
> Is that a way to use the old definition and include
> only the new jar? somethig like it:
> 
> <fileset dir="${lib.dir}" id="war.lib.jars">
>    <fileset refid="MY_BUILD.war.lib.jars">
>    <include name="misc/misc_${env}.jar"/>
> </fileset>

Hi Andreas,
  In Ant 1.7 you can use:

  <union>
    <fileset refid="MY_BUILD.war.lib.jars" />
    <fileset dir="${lib.dir}"
             includes="misc/misc_${env}.jar" />
  </union>

However, your example here is simple enough that you
should actually be able to do this with patternset
refs in current and earlier versions of Ant.

HTH,
Matt

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



 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

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


Mime
View raw message