Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 38421 invoked from network); 3 Jan 2002 16:27:23 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 3 Jan 2002 16:27:23 -0000 Received: (qmail 7136 invoked by uid 97); 3 Jan 2002 16:27:16 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 7102 invoked by uid 97); 3 Jan 2002 16:27:15 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 7091 invoked from network); 3 Jan 2002 16:27:14 -0000 Message-ID: <24BA7A5373B10144B867B94BC53A60E9069E5B@SGMAIL.scigames.at> From: HANDSCHMANN Robert To: 'Ant Users List' Subject: AW: newbie question: javac not checking build dependencies? Date: Thu, 3 Jan 2002 17:29:40 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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=20 sufficiently fast (at the moment). - Robert > -----Urspr=FCngliche Nachricht----- > Von: vlad@trilogy.com [mailto:vlad@trilogy.com] > Gesendet am: Donnerstag, 03. J=E4nner 2002 16:39 > An: Ant Users List > Betreff: Re: newbie question: javac not checking build dependencies? >=20 > Your mistake was in assuming that javac actually had this dependency = > checking ability. It never did. That and Java just does not support=20 > separate compilation units very well as a language [for many=20 > different=20 > reasons, including static linking for static final constants etc]. >=20 > ANT compensates for that a little bit by doing file timestamp=20 > checking,=20 > like most make processors can. But that does not work in many=20 > cases [like=20 > yours: ANT can't know that one of your classes is an=20 > extension of another=20 > without parsing Java]. To do everything correctly, the=20 > complete set of=20 > dependencies needs to be extracted from Java class=20 > definitions -- and that=20 > amounts to pretty much parsing everything every time, rather=20 > expensive.=20 >=20 > Your choices are: >=20 > - live with this javac limitation and always submit the full set of=20 > classes to be recompiled. > - use a different compiler with built-in dependency analysis=20 > [jikes? The=20 > compiler in IBM's Eclipse is pretty smart, too.] > - use some sort of a Java dependecy manager tool. They all=20 > differ in how=20 > smart they are. For some useful reading, check out this link=20 > [posted to=20 > this list a while ago]:=20 > http://www.experimentalstuff.com/Technologies/JavaMake/javamake.html >=20 > Vlad. >=20 >=20 > Please respond to "Ant Users List" > To: "Ant Users List" > cc:=20 >=20 > Subject: newbie question: javac not checking build=20 > dependencies? >=20 >=20 > A quick question from someone who just started using Ant: >=20 > For some reason the javac task doesn't seem to check=20 > dependencies after it > builds. Let's say I modify a superclass to add a new abstract=20 > method, and=20 > I > leave the subclass alone. When I run javac in the command=20 > line, I get a > compile-time error when I compile, saying that the subclass needs to > implement the new method. >=20 > But when I run a javac task in Ant, it doesn't detect this.=20 > (Until it gets > to the junit task, at which point most everything fails.) >=20 > Obviously there's something really basic I'm doing wrong. Any=20 > pointers to > where I should look to figure out what to fix would be greatly=20 > appreciated. >=20 > Thanks >=20 > Francis >=20 >=20 > -- > To unsubscribe, e-mail: =20 > > For additional commands, e-mail:=20 > >=20 >=20 >=20 >=20 >=20 > -- > To unsubscribe, e-mail: =20 > > For additional commands, e-mail:=20 > >=20 -- To unsubscribe, e-mail: For additional commands, e-mail: