ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HANDSCHMANN Robert <HANDSCHM...@scigames.at>
Subject AW: newbie question: javac not checking build dependencies?
Date Thu, 03 Jan 2002 16:29:40 GMT
I just want to add a reference to the optional ant task 'depend'
as an extension to choice #3 mentioned by Vlad.
I do not have experience with this task yet since choice #1 is 
sufficiently fast (at the moment).

- Robert

> -----Urspr√ľngliche Nachricht-----
> Von: vlad@trilogy.com [mailto:vlad@trilogy.com]
> Gesendet am: Donnerstag, 03. Jänner 2002 16:39
> An: Ant Users List
> Betreff: Re: newbie question: javac not checking build dependencies?
> 
> Your mistake was in assuming that  javac actually had this dependency 
> checking ability. It never did. That and Java just does not support 
> separate compilation units very well as a language [for many 
> different 
> reasons, including static linking for static final constants etc].
> 
> ANT compensates for that a little bit by doing file timestamp 
> checking, 
> like most make processors can. But that does not work in many 
> cases [like 
> yours: ANT can't know that one of your classes is an 
> extension of another 
> without parsing Java]. To do everything correctly, the 
> complete set of 
> dependencies needs to be extracted from Java class 
> definitions -- and that 
> amounts to pretty much parsing everything every time, rather 
> expensive. 
> 
> Your choices are:
> 
> - live with this javac limitation and always submit the full set of 
> classes to be recompiled.
> - use a different compiler with built-in dependency analysis 
> [jikes? The 
> compiler in IBM's Eclipse is pretty smart, too.]
> - use some sort of a Java dependecy manager tool. They all 
> differ in how 
> smart they are. For some useful reading, check out this link 
> [posted to 
> this list a while ago]: 
> http://www.experimentalstuff.com/Technologies/JavaMake/javamake.html
> 
> Vlad.
> 
> 
> Please respond to "Ant Users List" <ant-user@jakarta.apache.org>
> To:     "Ant Users List" <ant-user@jakarta.apache.org>
> cc: 
> 
> Subject:        newbie question: javac not checking build 
> dependencies?
> 
> 
> A quick question from someone who just started using Ant:
> 
> For some reason the javac task doesn't seem to check 
> dependencies after it
> builds. Let's say I modify a superclass to add a new abstract 
> method, and 
> I
> leave the subclass alone. When I run javac in the command 
> line, I get a
> compile-time error when I compile, saying that the subclass needs to
> implement the new method.
> 
> But when I run a javac task in Ant, it doesn't detect this. 
> (Until it gets
> to the junit task, at which point most everything fails.)
> 
> Obviously there's something really basic I'm doing wrong. Any 
> pointers to
> where I should look to figure out what to fix would be greatly 
> appreciated.
> 
> Thanks
> 
> Francis
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:ant-user-help@jakarta.apache.org>
> 

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