ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Holmberg <mark...@acc.umu.se>
Subject Re: destdir included in classpath, why?
Date Fri, 29 Sep 2000 13:00:26 GMT
I now realized that the destination directory has to be included in the
classpath when using Ant because Ant might just include a subset of the
source files on the command line (as opposed to all when compiling
without ant). Therefore it needs the not included classes from the
destination directory. I didn't get that until now.. :)

The reason I asked why the destination directory was included in the
first place was that I had problems with the compiler not picking up up
changes I had made (old classes from the destination dir were taking
precedence I believe), which forced me to clean out the dest dir and do
a fresh recompile. But my memory might not serve me correct, it could
have been some other reason. It doesn't happen often though, so it's
ok.

Regards, Markus.


On Mon, Sep 25, 2000 at 12:04:12PM -0700, Diane Holt wrote:
> --- Markus Holmberg <markush@acc.umu.se> wrote:
> > Using a recent ant version from CVS, I noticed that the value of the
> > destdir attribute of the javac task is included in the classpath (as the
> > first path).
> > 
> > Is there a reason for it being included at all? (Without the user
> > specifying it).
> 
> Because, as your java files are getting compiled, you want the compiler to
> find the ones it's already done so it can resolve the references in the
> currently-being-compiled file. Same reason the srcdir is included -- if it
> can't find the classfile (in the output dir package hierarchy) that
> contains the references in the currently-being-compiled file, it will look
> for a source-file and (if it finds one) compile it, then use that
> just-compiled classfile (which it has put into the output dir package
> hierarchy) to get back to resolving the references in the
> currently-being-compiled file.
> 
> Assuming I (now) understand how java compilers works, that is --
> otherwise, this is completely wrong. :)  (And in which case, someone
> please correct me.)
> 
> Diane
> 
> 
> 
> =====
> (holtdl@yahoo.com)
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/

-- 

Markus Holmberg         |       Give me Unix or give me a typewriter.
markush@acc.umu.se      |       http://www.freebsd.org/

Mime
View raw message