ant-user mailing list archives

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

> -----Original Message-----
> From: Nathan Murphy []
> Sent: Saturday, 2 December 2000 7:00
> To:
> 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
> newer then b.class, recompiles b.class.
> 		However, the timestamp of 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
gives you some info on the task.


View raw message