You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Alan Snyder <co...@cbfiddle.com> on 2016/11/19 20:15:14 UTC

differential pattern sets

I would like to define a file set containing files selected by one pattern set but excluding those defined by a second pattern set.

Is there a way to do this?

It would be nice if the following worked, but it does not:

      <patternset refid="compile.files"/>
      <not>
        <patternset refid="compile.files.1.9.dependent"/>
      </not>


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


Re: differential pattern sets

Posted by Alan Snyder <co...@cbfiddle.com>.
I guess I should be clearer on my use case. I want to use the differential file set to specify the source files in a javac task. As far as I can tell, the javac task accepts fileset elements but not filesets or resource collections. Is there a way to do this?

Thank you.

  Alan


> On Nov 19, 2016, at 9:08 PM, Stefan Bodewig <bo...@apache.org> wrote:
> 
> On 2016-11-19, Alan Snyder wrote:
> 
>> I would like to define a file set containing files selected by one pattern set but excluding those defined by a second pattern set.
> 
>> Is there a way to do this?
> 
> Kind of. You can get a resource colection by using <difference> on two
> <fileset>s each one with one of the pattern sets.
> 
> The alternative is to replace the <patternset>s with selectors, likely
> <filename>, and use some <or>s and <not>s. This will yield a <fileset>.
> 
> Stefan
> 


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


Re: differential pattern sets

Posted by Stefan Bodewig <bo...@apache.org>.
On 2016-11-19, Alan Snyder wrote:

> I would like to define a file set containing files selected by one pattern set but excluding those defined by a second pattern set.

> Is there a way to do this?

Kind of. You can get a resource colection by using <difference> on two
<fileset>s each one with one of the pattern sets.

The alternative is to replace the <patternset>s with selectors, likely
<filename>, and use some <or>s and <not>s. This will yield a <fileset>.

Stefan

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