-------- Original Message --------
Subject: How to combining patternset
From: Dave Cherkassky <[email protected]>
To: [email protected]
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}"/>
</patternset>
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
<patternset
includes="jade/content/**,**/*${yui.compression.js.source.suffix}"
id="whatever"/>
or use includesfile, where each line of that file
contains one includepattern
<patternset>
<includesfile name="foobar"/>
<includesfile name="foobaz"
if="testbuild"
/>
<patternset/>
Regards, Gilbert
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]