ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: Combining PatternSets with Path elements
Date Mon, 13 Nov 2000 09:19:52 GMT
Matt Conway <Matt_Conway@i2.com> wrote:

> This is sortof what I want as well - to be able to re-use a
> "generic" patternset with a more specific include pattern -
> i.e. reapply the include pattern to all the existing pattern, so a
> previous pattern like "com/foo/bar/+" would become
> "com/foo/bar/*.class" in a statement like given below
> 
> <patternset id="packages">
>   <include name="com/foo/util/+" />
>   <include name="com/foo/bar/+" />
> </patternset>
> 
> <patternset refid="packages">
>   <include name="*.class" />
> </patternset>
> 
> This re-uses the patternset "packages" which is generic - by generic
> I mean that it has a '+' in it which is taken to mean that the +
> will get replaced with whatever you include when you reuse the
> patternset.  Obviously, there are more details to be worked out =)

I can see the benefit of restricting include patterns, but I'm not
sure how to tackle this.

The include patterns are additive and I think they should remain
additive. The same holds for exclude patterns. 

What you are asking for is a way to refine a generic patternset for
different use cases, I wouldn't go and overload the meaning of include
for something like this. <restrict>? 

I'm not sure I'd want to add something like this as one probably needs
one for the opposite action as well (exclude this package and that
package but (only|not) the .bar files in them). This is one of the
points where one starts trading convenience for complexity.

Stefan

Mime
View raw message