ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@m64.com>
Subject RE: Dependancies in the javac task
Date Fri, 01 Dec 2000 23:25:34 GMT
Nathan,

> -----Original Message-----
> From: Nathan Murphy [mailto:nathan.murphy@zucotto.com]
> Sent: Saturday, 2 December 2000 7:00
> To: ant-user@jakarta.apache.org
> Subject: Dependancies in the javac task
>
>
> Scanning through the source code of the Javac ant task, I see
> the scanDir
> function that makes use of timestamp dependancies.  What I
> don't seem to
> find is compilation do to interfile dependancies.
>
> i.e.
>
> 	Class a creates an instance of class b.
> 	The developer changes the constructor for b.
> 	The user makes their load but does not remove all the old class
> files:
> 		Javac ant task checks timestamp dependancies and seeing
> b.java newer then b.class, recompiles b.class.
> 		However, the timestamp of a.java and a.class
> are unchanged
> so a.class is not recompiled.
> 		No compilation time errors are produced.
> 	The user now runs the main function of their java class
> and gets a
> runtime error.
>

This is a common enough question. One solution is to use a compiler that
does a better job of dependency management that javac, such as Jikes.
Another is to use the <depend> task. This is not part of ant 1.2 but is
available in the nightly builds.

The link http://marc.theaimsgroup.com/?l=ant-dev&m=97271084914574&w=2
gives you some info on the task.

Conor




Mime
View raw message