ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: javac and fileset
Date Sat, 06 Apr 2002 03:31:56 GMT

----- Original Message -----
From: "Diane Holt" <holtdl@yahoo.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Friday, April 05, 2002 9:56 PM
Subject: Re: javac and fileset


> --- Erik Hatcher <jakarta-ant@ehatchersolutions.com> wrote:
> > Both are very much "path-like" (why the "like"?) structures.  Neither
> > are equivalent to the dir attribute of <fileset>.
>
> >From the <javac> page:
>   This task forms an implicit FileSet and supports all attributes of
>   <fileset> (dir becomes srcdir)
>
> > Sure, you can specify a dir, but also two, three, or more directories
> > also.
> >     srcdir="path1;path2;path3"
>
> Right -- that was my example in my previous post (except I only had two :)
>
> >     <src>
> >       <pathelement .../>
> >       <fileset refid="..."/>
> >     </src>
>
> But you can't use a <fileset>, because <src> (and 'srcdir') only accepts
> directories, and <fileset> only returns files. Now that there's a
> <dirset>, you should be able to use that -- but, since the original poster
> was trying to reuse a set of files, that's not really going to do what he
> was looking to do (nothing using <src> or 'srcdir' would, as far as I can
> see anyway).

As always, you're right!  (except that they are still path-like structures
internally).

I just stared at the code for a bit and set up an example (that I should
have done before speaking the first time :) that of course failed when I
tried a nested <fileset>.  It actually seems silly that it won't work with
files there, since you can of course use includes/excludes to pick and
choose files how you want.  I don't think it would be a tough modification
to have it allow files there though.  Things like this are fishy -when a
task supports a Path, yet doesn't support it fully.  I'm sure we have other
such weirdnesses like this though.

    Erik


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


Mime
View raw message