ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Bucciarelli <>
Subject Ant 2 Request
Date Wed, 21 Mar 2001 23:07:01 GMT
I'm guessing I'm too late, given the VOTE emails, but I'll throw this out

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}"

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 <>
voice: (413) 367-2864
fax  : (978) 285-0299
Research & Development, Boston
Peregrine Systems, Inc.


View raw message