ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Not - design clarification
Date Tue, 06 Oct 2009 11:56:19 GMT
On 2009-10-06, Raja Nagendra Kumar <Nagendra.Raja@tejasoft.com> wrote:

> Does org.apache.tools.ant.types.resources.selectors.Not support only one
> selector.. it does not seem to support zero or more than one as per the code
> too.

This is correct.

> Where as Or support more than one pattern.

Not is a logical negation.  I'm not clear what the logic negation of
more than one selection would be.  The single nested selector can itself
be a container like and or or.

> We want to get the same effect of includes and excludes of fileset on
> restrict. Could any one help on the equivalent one. We have many includes
> and many excludes to be added to restrict.

And and Or them together.

<include name="a"/>
<include name="b"/>
<exclude name="c"/>
<exclude name="d"/>

is the same as

<and>
  <or>
    <filenname name="a"/>
    <filenname name="b"/>
  </or>
  <not>
    <or>
      <filenname name="c"/>
      <filenname name="d"/>
    </or>
  </not>
</and>

Stefan

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


Mime
View raw message