ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Festa" <kali...@bellatlantic.net>
Subject failure to re-build dependent targets ??
Date Sun, 10 Dec 2000 15:45:52 GMT
I'm a novice Ant user, so thanks in advance for your patience if I'm missing
something obvious here.

In this example, the build file, Java sources, and Java class files all
reside in the same directory. Both Java classes are members of the 'global'
Java package. If I modify 'CallMe.java' -- for example, change a method
signature, and then run 'ant Caller.class', Ant properly detects the change
to 'CallMe.java' and rebuilds it, but does *not* rebuild 'Caller.class'
which depends on it. Is this expected behavior or am I doing something
wrong?

<project    name="AntTest" default="Caller.class" basedir="." >

    <target name="CallMe.class" depends="CallMe.java" >
        <javac  srcdir="${basedir}" destdir="${basedir}"
classpath="${basedir}" >
            <include name="CallMe.java" />
        </javac>
    </target>

    <target name="Caller.class" depends="Caller.java,CallMe.class" >
        <javac  srcdir="${basedir}" destdir="${basedir}"
classpath="${basedir}" >
            <include name="Caller.java" />
        </javac>
    </target>

    <target name="CallMe.java" />
    <target name="Caller.java" />
</project>


Mime
View raw message