ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <>
Subject Re: How to combining patternset
Date Sat, 05 Mar 2011 12:25:17 GMT
-------- Original Message  --------
Subject: How to combining patternset
From: Dave Cherkassky <>
Date: Sat Mar 05 2011 06:21:14 GMT+0100 (CET)

> Dear ANT community:
> I have one patternset like this:
>   <patternset id='yui.compression.dirs'>
>     <include name="jade/content/**"/>
>   </patternset>
> And a second patterset like this:
>   <property name='yui.compression.js.source.suffix' value='-debug.js' />
>   <patternset id='yui.compression.files'>
>     <include name="**/*${yui.compression.js.source.suffix}"/>
>   </patternset>


> Note:  I *don't* want to write:
>   <patternset id='yui.compression.dirs'>
>     <include name="jade/content/**/*${yui.compression.js.source.suffix}"/>
>   </patternset>
> I want the '...' to somehow refer to the two patternsets at the top of
> this email.
> Is there a way to do this?

A patternset may have several nested <include name=../>,
each element contains one pattern, so why not combine your
patterns in one patternset ?

<patternset id="whatever">
 <include name="jade/content/**"/>
 <include name="**/*${yui.compression.js.source.suffix}"/>

note that include|exclude name="..." may be combined with
if|unless to control the use of a pattern via property, f.e
<include name="src/**"/ unless="prodbuild">

or use includes attribute with comma- or space-separated
list of patterns


or use includesfile, where each line of that file
contains one includepattern

 <includesfile name="foobar"/>
 <includesfile name="foobaz"

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message