ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Endriss <Frank.Endr...@bancos.com>
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 09:26:18 GMT
"Richard S. Hall" wrote:
> 
> Nico Seessle wrote:
> 
> > You mean you could have a single file named Foo.java which contains
> >
> > public class Foo {...}
> > class Bar {...}
> > class Baz {...}
> >
> > and Ant sometimes compiles only the class Foo? Is this reproducable? If yes,
> > can you tell us
> > 1. The OS
> > 2. The version of Ant
> > 3. The compiler you use
> > 4. If you can provide a testcase?
> 
> Yes, that's what I mean, except that it is only when I receive an error in a
> different file, it doesn't just do it if the build is successful -- that would
> be more annoying.  :^)

You can reproduce the fault by 
-compiling Foo.java
-removing Bar.class
-run ant: It wont compile Foo.java again, since Foo.class is up to date

> I just recently installed Ant 1.3beta1, so I haven't tried to reproduce it with
> that, but it happened quite regularly before that under the right conditions.
> The only downside, is that I might not be able to create a small example to
> demonstrate the problem...

All in all it is bad style to place more that one class in one java
source.
The most java-compilers do the simple check of file names. Obviously the
name Bar.class has nothing to do with the name Foo.java. 
However, you can use the "depends" Property to make ant know about this
dependency.

Note that the problem is not "really" ant related.



mfg Frank
> 
> I will let you know.
> 
> -> richard


Mime
View raw message