I'm guessing I'm too late, given the VOTE emails, but I'll throw this out
anyway.
I'd like to see <javac> implement dependency checking on it's own, instead
of relying on the compiler. Here's a simple example of how Java 1.2/Ant
dependency checking doesn't work:
class A
{
void foo() { }
}
class B extends A
{
void bar() { foo(); }
}
<project name="tmp" default="all" basedir=".">
<property name="build" value="./build/" />
<target name="all" >
<mkdir dir="${build}" />
<javac srcdir="${basedir}"
depend="on"
includes="A.java, B.java"
destdir="${build}"
classpath=".;${build}"
debug="on"
/>
</target>
</project>
If you change class A to
class A
{
void foo(int i) { }
}
and rebuild, only class A recompiles. If class B is used, then java throws
a java.lang.NoSuchMethodError.
NOTE: This example was taken directly from a post on the JDE mailing list,
where there's been quite an involved discussion on dependency checking. I
was labelled a "naive" user for crowing about Ant's benefits and not
understanding this rather basic limitation! :)
--
Mark Bucciareli <[EMAIL PROTECTED]>
voice: (413) 367-2864
fax : (978) 285-0299
Research & Development, Boston
Peregrine Systems, Inc.
http://www.peregrine.com