ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: Dependency task
Date Thu, 02 Nov 2000 02:50:45 GMT

Is this based on the javad project? (

I haven't tried it.    The the nightly build working yet?

-- Glen Stampoultzis

"Conor MacNeill" <> on 28/10/2000 03:26:03 PM

Please respond to

To:   "Ant-Dev Apache." <>
cc:    (bcc: Glen Stampoultzis/ITD/MEL/Ansett/AU)
Subject:  Dependency task

I have commited an experimental dependency task. This task examines
class files produced by the compiler and determines their direct
dependency relationships. It then "inverts" this relationship to
determine which classes are affected when a given class file is out of
date. These class files are deleted which will force the compiler to
recompile them when the <javac> task is run.

Here is an example usage (on ant itself)
    <depend cache="deps" closure="yes"

The srcdir and destdir attributes correspond to those of the <javac>
task. The cache attribute identifies a directory where dependency
information is cached. This attribute is optional and if it is not
present, no caching is used.

The closure attribute is also optional. When this is set to yes, the
task will traverse dependency relationships deleting classes as it goes.
If it set to no, only direct relationships are followed. For example,
suppose class A depends on B which depends on C. If C is out of date,
class B will be deleted as it is directly related. class A will only be
deleted if closure = "yes" as there is no direct relationship between C
and A. Using the closure flag will result in the deletion of more files
and probably take longer. In most cases I don;t think this is necessary
but it is there for the paranoid.

I have found performance to be reasonable but I haven't tried it with a
really big project. On our ejb code, a clean build with javac takes 39
seconds, the dependency task takes 4.9 seconds without a cache and 2.2
with a cache.

Feedback is most welcome.


CAUTION - This message may contain privileged and confidential 
information intended only for the use of the addressee named above.
If you are not the intended recipient of this message you are hereby 
notified that any use, dissemination, distribution or reproduction 
of this message is prohibited. If you have received this message in 
error please notify Ansett Australia immediately. Any views expressed 
in this message are those of the individual sender and may not 
necessarily reflect the views of Ansett Australia.

ABN Ansett Australia Ltd	37 004 209 410
ABN Ansett International Ltd	72 060 622 460

View raw message