Well, that basically worked. But I had to put the "exclude" not in the 
PatternSet itself, but in the FileSet that referenced the PatternSet, like this:
<FileSet dir=".">
   <PatternSet refid="other-jars"/>
   <exclude name="*" unless="support.abc"/>
</FileSet>

Not totally ideal, maybe, but it does work. I think what you said would work 
with the incomplete example I gave, but I also was using the PatternSet 
sometimes in conjunction with other PatternSets and the exclude in those cases 
messed me up (excluded everything when I didn't want to).  But the idea does 
work in that having both the include and the exclude gives a non-empty file 
list always, whether the feature is enabled or not, which avoids the problem of 
an empty list implying "copy everything". 

So, thank you very much!

~Roger Whitcomb


> On May 14, 2014, at 9:04 PM, Antoine Levy Lambert <anto...@gmx.de> wrote:
> 
> Hi,
> 
> you can try this  (untested):
> 
>> <PatternSet id="other-jars">
>>   <include name="abc*.jar" if="support.abc”/>
>      <exclude name=“**/*” unless=“support.abc”/>
>> </PatternSet>
> 
> The idea is to add an exclude element which fill fire only if support.abc is 
> not set.
> 
> Regards,
> 
> Antoine
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
> 
> 

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

Reply via email to