ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject Re: Multiple classes in a single file (was: Re: Can someone tell me what is so great about Ant?)
Date Wed, 07 Feb 2001 14:00:40 GMT
Before you guys descend into a flame war, let me make a few observations.

If a java file produces a class file with a different name, it is very
difficult for Ant (and I would guess make or any other build tool) to
determine that file is missing and which java file it is required to
compile to generate the missing file. To "know" that fact you either have
to have remembered it from a previous compilation (presuming you can get
the compiler to tell you or you can work it out from the class files) or
you have to determine it by parsing the java file. You are half way to
compilation there. It doesn't matter if the missing class file is an inner

Ant 1.3 will include an optional <depend> task which can help to manage
your class dependencies, but it will not detect missing files like these.
I'll document this in a few days.

Richard, the style you have chosen is indeed.a valid Java style. I would
hope that javac would not produce the public class file without producing
the non-public classes too. In other words, javac's production of class
files should be atomic. Given however, that you are not seeing that,
perhaps that is not true. Anyway, I do not believe Ant should be a factor
in this compilation problem. Given all that, and the style you have chosen,
I think you may be forced to adopt a build style of complete rebuilds.


View raw message