You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by William Ferguson <wi...@verveinc.com> on 2000/11/13 06:28:21 UTC

PatternSets

Stefan,

I think you hinted at this in a previous post. How do I define a patternset
with project wide scope but allow it to use properties that are set in the
init target?

Is this the problem with defining patternsets at same level as targets?
And we can't define them within a target? Except for within a fileset etc.

SO how do I do it? Creat a dummy task that defines the patternset (but
somehow does nothing) that I am sure is called everytime, but after my
property definitions. So a dummy task in the init target ..


There seems to be some understandable confusion surrounding
patternsets/filesets and path-like structures. Perhaps a cleanup in the doco
for each of these so that the distinction between each is more obvious. It
would also be a good time to fix up the attribute/description tables for
patternsets & filesets so that they list include & exclude instead of
includes & excludes.

William


RE: PatternSets

Posted by William Ferguson <wi...@verveinc.com>.
> This is a workaround. Another one would be to not use <property> in an
> init target but put them as children of <project> directly as well.

Had forgotten that this was legal.I always use to set properties in <init>
when properties were evaluated at load time.
This will work just fine.


> > It would also be a good time to fix up the attribute/description
> > tables for patternsets & filesets so that they list include &
> > exclude instead of includes & excludes.
>
> include*s* and exclude*s* are the _attributes_ of patternset, the
> nested _children_ are include and exclude. Is the documentation to XML
> centric or what's wrong with it (not saying the documentation couldn't
> be improved, quite the opposite).

My bad. I have since found the line referring to the nested elements, as
opposed to the inline versions.

I still think the doco could use a cleanup. I don't think its too XML
centric.
I just think that the relationships between patternsets/filsets and
path-like structures is not clearly defined. In some respects the naming and
layout (of the doco) seemd to suggest (at least to me) that there was some
kind
of inheritance relationship between a patternset and a fileset, but this is
not so, at least from a use case point of view.

William


Re: PatternSets

Posted by Stefan Bodewig <bo...@bost.de>.
William Ferguson <wi...@verveinc.com> wrote:

> Is this the problem with defining patternsets at same level as
> targets?  And we can't define them within a target? Except for
> within a fileset etc.

Right, unfortunately.

> SO how do I do it? Creat a dummy task that defines the patternset
> (but somehow does nothing) that I am sure is called everytime, but
> after my property definitions. So a dummy task in the init target ..

This is a workaround. Another one would be to not use <property> in an
init target but put them as children of <project> directly as well.

> It would also be a good time to fix up the attribute/description
> tables for patternsets & filesets so that they list include &
> exclude instead of includes & excludes.

include*s* and exclude*s* are the _attributes_ of patternset, the
nested _children_ are include and exclude. Is the documentation to XML
centric or what's wrong with it (not saying the documentation couldn't
be improved, quite the opposite).

Stefan