ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Path, refid, <src>
Date Fri, 26 Apr 2002 19:13:45 GMT
--- Gurdev Parmar <gparmar@versant.com> wrote:
> But did you notice that I had used a <fileset> tag inside
> path to describe a set of files?

Yes, I did -- but I also noticed that the files pointed to by that
<fileset> wouldn't make much sense inside a <path>, and certainly not one
destined to be referenced in a nested <src> element for the <javac> task,
since that's used to point to source directories and can't contain any
files at all (not even ones that could conceivably be in a <path>, such as
.jar and .zip files), which is why it barked at you about the .java file
not being a directory.

> This is the example that ant documentation gives, on the basis
> of which I was working on:

But note that the documentation example shows jar files being included in
the path, not .java source files.

If the only place you intend to reference the set of files you're trying
to group together is in your <javac> task, you can skip the whole thing
and just specify them in your <javac> task directly -- but not within a
nested <src> element. Assuming all the files you want to compile live in
subdirs down from a single common directory, just point the 'srcdir'
attribute to the top of your package hierarchy and use nested <include>
elements to specify the files you want. If you need to specify more than
one directory under which the source files are to be found, then you can
either do that by listing them in 'srcdir' as a path-type list (eg.,
srcdir="dir1:dir2") or by using nested <src> elements -- eg:
  <src path="dir1"/>
  <src path="dir2"/>
or as a 'refid' to a (valid) <path>.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

--
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