ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject Re: Multiple patternsets in a fileset
Date Sun, 17 Feb 2002 23:57:49 GMT
----- Original Message -----
From: "Bruce Atherton" <>

> I've submitted what I considered (and still consider) a bug to Bugzilla
> ( and was told that
> the existing behaviour was by design.

Just to add more fuel to the fire - even if we were to change this behavior,
it could not be for Ant 1.x since that would break backwards compatibility.

> I'd like to challenge that design. To my mind, it is seriously broken, and
> saying "It's not a bug, it's a feature" is no answer.

I don't view it as broken, I just view it as "that is the way it is".

There are other glaringly difficult issues with other datatypes that cannot
be resolved in the 1.x codebase.  For example, why do filesets all have to
be from the same directory tree?  Why should I not be able to group all
files that are within a path, for instance, and copy those somewhere or
include them into a .zip easily?  At the moment I have to do each one
individually and know each files parent directory.  I would *love* to see
this particular thorn removed - but the fileset API simply does not allow
for that.

> Then test*.class and old*.java are excluded, despite the exclusions being
> in different patternsets.
> Not only is this counterintuitive behaviour for the user, it takes away
> functionality for no good reason.

Its only counterintuitive if you don't know how a fileset works with

> Consider the situation when you want to perform an exclusion on a
> tree, but you want one one subdirectory to be treated differently. This is
> not uncommon.

I agree that its currently not ideal, but the workaround Conor mentioned
handles this particular situation relatively painlessly and intuitively, at
least to me.

> Having separation in patternsets gives you this functionality. Then there
> is the question of what a user would expect. If you were encountering an
> ant build.xml file for the first time, would you expect old*.java to be
> excluded? Honestly?

I know how a fileset works, so yes I would expect that behavior.

> Just for some background on why I'm bringing this up: as I mentioned to
> list a couple of months ago, I think the best implementation of cullers is
> through making them elements of patternset. I've gone quite a ways down
> that path, and have a patch almost ready to submit for discussion. But in
> developing this, I've found that because of the mingling of patterns in a
> fileset, cullers would have to be applied across an entire fileset rather
> than to the specific files they were defined on.

I think your patch would still be a worthy feature to discuss adding even
given the current way patternsets work.

> So if in your distribution
> you want all the log files that weren't larger than a Meg, and all the JAR
> files regardless of size, you couldn't do:

You could with different filesets, one for log files, and one for JAR files.
That seems reasonable to me.

I'm all for you pushing the culler implementation and fighting the current
design of Ant 1.x. Perhaps there is some happy medium where Ant 1.x behavior
is not changed but enhanced by your cullers, and in Ant2 a much cleaner,
extensible implementation is built.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message