You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@bost.de> on 2000/07/31 15:45:38 UTC
element in task
Hi,
I'd like to make the nested src element a FileSet instead of a Path
(and add a <srcref> element to reference filesets used anywhere else).
This would change some things
(1) <src> would take different attributes and had no idea what
"a/b:c/d" would mean.
(2) Each <src> would have its own set of include/exclude patterns -
which might be a good thing or not. And we could reuse patterns
previously defined via fileset's <patternsetref> element.
(3) Classes invoking Javac.setSrc() directly would break.
(1) has the potential to break build files, (3) to break custom
tasks. But I think FileSet is the more natural choice than Path.
Comments?
Stefan
Re: element in task
Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "CM" == Conor MacNeill <co...@m64.com> writes:
>> (1) <src> would take different attributes and had no idea what
>> "a/b:c/d" would mean.
CM> sourcepaths may come from the external environment (although
CM> probably unlikely).
I've not thought of this, thanks.
>> (2) Each <src> would have its own set of include/exclude patterns
>> - which might be a good thing or not. And we could reuse patterns
>> previously defined via fileset's <patternsetref> element.
CM> This tends to move from compiling classes in the package space to
CM> compiling file in the filesystem. I wonder how, given a fileset,
CM> you can know where the package root is? (I'm not yet that
CM> familiar with filesets, though)
Each fileset has its own "dir" attribute, making up for a package root
of its own. It still lives in the package space - at least that's how
I've looked at it.
Stefan
RE: element in task
Posted by Conor MacNeill <co...@m64.com>.
Stefan,
I am a little unsure about this.
>
> I'd like to make the nested src element a FileSet instead of a Path
> (and add a <srcref> element to reference filesets used anywhere else).
>
> This would change some things
>
> (1) <src> would take different attributes and had no idea what
> "a/b:c/d" would mean.
sourcepaths may come from the external environment (although probably
unlikely).
>
> (2) Each <src> would have its own set of include/exclude patterns -
> which might be a good thing or not. And we could reuse patterns
> previously defined via fileset's <patternsetref> element.
This tends to move from compiling classes in the package space to compiling
file in the filesystem. I wonder how, given a fileset, you can know where
the package root is? (I'm not yet that familiar with filesets, though)
>
> (3) Classes invoking Javac.setSrc() directly would break.
>
> (1) has the potential to break build files, (3) to break custom
> tasks. But I think FileSet is the more natural choice than Path.
>
I'm not sure about. I guess it depends on whether you think in the java
namespace or the filesystem namespace. Perhaps we need separate <src> and
<sourcepath> elements. These are really separate concepts in javac.
Currently ant merges them and separating them might be good.
Conor