ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Nilsson <peter.nils...@axis.com>
Subject RE: ant is incompatible with JDK javac 1.3
Date Tue, 20 Feb 2001 19:40:33 GMT
> Is the "build" dir intended to be relative?  I have mine set 
> to D:\build and
> it works fine.

I thought it made sense to make it relative to the property "basedir" which also works fine,
but that's not the problem here of course. (The problem is that ant:s <javac> seems
to be unaware of the fact that jdk javac puts the class files in sub directories of the build
directory, not in the build directory itself)

>  And this is with jdk1.3, modern compile.  
> Plus, ant doesn't
> do any recompilation checking in the <javac> task.  My 
> understanding is that
> it is all handled by javac.

Really? You seem to run jdk on Windows, I actually run it on Linux and for 1.3 all options
regarding recompilation are disabled (the non-standard -X options). I have never used those
options but at least I can say that without them I couldn't find any way to make javac do
recompilation checking. All it does is to compile java files implicitly during the type search
if necessary. However, if I help ant:s <javac> out a bit and copy the class files into
the build directoty (from the sub directories created by javac), <javac> is smart enough
not to recompile.

/PN

> 
> K.C.
> 
> > -----Original Message-----
> > From: Peter Nilsson [mailto:peter.nilsson@axis.com]
> > Sent: Tuesday, February 20, 2001 9:18 AM
> > To: 'ant-user@jakarta.apache.org'
> > Subject: ant is incompatible with JDK javac 1.3
> > 
> > 
> > ant's built in target "javac" is incompatible with javac 1.3 
> > (at least). If I set the its attribute "destdir" to build 
> > directory "build", JDK javac 1.3 will, since its given the 
> > parameter '-d build', create sub directories matching the 
> > package name under "build" and put the compiled class files 
> > in there. However, ant assumes the class files are put 
> > directly under "build" and will therefore recompile everytime 
> > it's invoked since no class files is ever found during its 
> > "up-to-date" check.
> > Is there a work around except for omitting the "destdir" 
> > attribute and clutter the src directory with class files
> > (in which case javac doesn't create sub directories)?
> > /Peter
> > 
> > 
> > Don't miss the opportunity to stay ahead of the latest developments!
> > Visit Axis at CeBIT - Hall 11 - Stand G62
> > March 22 - 28, 2001- Hannover, Germany
> > 
> > Get your hands on and evaluate the latest networking 
> > solutions for the 
> > converging world of wired and wireless. All in one place, 
> at one time!
> > 
> > For more information www.axis.com 
> > 
> 

Mime
View raw message