ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <>
Subject Re: incremental build using ant
Date Tue, 07 Aug 2001 07:45:18 GMT
----- Original Message -----
From: "Ramesh Donnipadu" <>
To: <>
Sent: Monday, August 06, 2001 6:27 PM
Subject: incremental build using ant

> I know ant can do incremental compilation/build based on time stamp of
> the surce and class files. But I am not aware whether ant is really
> smart and can figure out logical dependency among various class files by
> itself.

No, it can't. Of course there is a task "depend" that can help you to
accomplish that task. It tries to find dependencies between your classes and
simply deletes all class files that it thinks need a rebuild. But beware, it
will not find all the dependencies in your classes (for an example you might
get problems using "public final static int" constants) because of the way
these are handled by the compiler (the values are just copied to the class
where they are used and there is no simple way to know where the value comes
from - you could parse the sourcem but Ant is not doing that).

You can start to use <depend> by outting it just before your javac-task with
the same srcdir and destdir.

For simplier cases there is the "depend"-attribute for javac which will - if
your compiler supports it - enable the -depend option in the compiler.

> I am guessing this can be done using ant but we have to tell it using
> the "depends" key word. But maintaining the list of dependency class
> files up-to-date itself  becomes a nighmare in a large development
> effort involving 25 developers spread across different locations.

And where would you place this information?


View raw message