Take a look at the optional "depend" task. It has worked quite well for me. Chuck
> -----Original Message----- > From: vlad [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 03, 2002 9:39 AM > To: ant-user > Cc: vlad > Subject: 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" <[EMAIL PROTECTED]> > To: "Ant Users List" <[EMAIL PROTECTED]> > 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:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
