Build tools: dependency checking, Ant and Javamake

K

Karsten Wutzke

Hello all!

Can anybody name the best dependency checkers for rebuilding Java files?
Some time ago, it was said, Ant had only decent dependency checking. A
"plugin" adapter class called Javamake

http://www.experimentalstuff.com/Technologies/JavaMake/index.html

seemed to do a *much* better job.

I looked at the page and there seem to be some incompatibilities with
Java 5. Furthermore, the project seems to be discontinued right now.
Only a version for Ant 1.5 is available, while Ant now is in Version 1.6.4.

How good is Eclipse's dependency checking?

Has Ant's depencency checking improved over the last versions?

Thanks for helping!

Karsten
 
H

Harald

Karsten Wutzke said:
Can anybody name the best dependency checkers for rebuilding Java
files? Some time ago, it was said, Ant had only decent dependency
checking. A "plugin" adapter class called Javamake

Risking to troll, I dare to suggest that the only 100% save way of
dependency checking requires nearly complete parsing of the source
file(s). And this does not even have to do with
import-dependencies. Every inner class results in a separate class
file. If, for whatever reason, such a class file is deleted, the
product is incomplete. But checking modification times of source files
against all class files will not reveal this.

Another observation is that the slow part of compilation is startup of
the compiler. I don't see (feel) much difference between compiling 1
or 100 source files.

So, if your number of source files is not a magnitude larger, your
best bet is to compile all source files as soon as any one of them was
touched.

This does not prevent the problem described above of losing the class
file of an inner class, but the argument is, that the inner class
problem undercuts every elaborate attempt to get dependencies 100%
right.

Sorry, my answer is not really to the point, as I don't know the
"best" dependency checker.

Harald.
 
T

Thomas Weidenfeller

Harald said:
This does not prevent the problem described above of losing the class
file of an inner class, but the argument is, that the inner class
problem undercuts every elaborate attempt to get dependencies 100%
right.

I have to disagree here. It is possible, but it requires much bigger
gear. There are (expensive) tools out there who can monitor file system
access. From that they can conclude which files have been produced by a
call to the compiler in a build, and flag them as implicit (sibling)
dependencies of the input to the compiler.

But, at least the system I know and happen to use daily adds a bunch of
new problems to the picture, e.g. it comes with an own version of make
which needs to be used to get the implicit dependency detection and many
other things working. Unfortunately, like all classic make variants that
make chokes on circular dependencies - and Java source typically has a
bunch of them.

/Thomas
 
D

Dale King

Karsten said:
Hello all!

Can anybody name the best dependency checkers for rebuilding Java files?
Some time ago, it was said, Ant had only decent dependency checking. A

Ant has woefully inadequate dependency checking. It is trivial to set up
a case where Ant completes without error, but the software crashes
because Ant did not build everything it needed. My philosophy is that if
you ever have to do a "make clean" operation in order to get a correct
build then your build system is broken.
"plugin" adapter class called Javamake

http://www.experimentalstuff.com/Technologies/JavaMake/index.html

seemed to do a *much* better job.

Javamake was the best that I know of for command line builds.
I looked at the page and there seem to be some incompatibilities with
Java 5. Furthermore, the project seems to be discontinued right now.
Only a version for Ant 1.5 is available, while Ant now is in Version 1.6.4.

It would be nice if they open source it. I've talked with the author
about it before because there are some things I would like to see added,
but then I no longer need a command line tool.
How good is Eclipse's dependency checking?

It is pretty much right on. I've never had a problem with it.
Has Ant's depencency checking improved over the last versions?

Doubtful. It seems hard to even convince the worshippers of Ant that
there is even a problem. In my opinion Ant is pretty much a glorified,
cross-platform batch file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top