ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David McLeod" <>
Subject Dependent Tasks within a Single Target
Date Tue, 21 Jan 2003 20:20:59 GMT
I have a fairly simple compile target that looks something like this:

    <target name="compile" depends="speech, enterprise">
        <echo message="*** Compiling ${moduleName} module."/>
        <mkdir dir="${build}"/>
        <javac srcdir="${source}" destdir="${build}"
classpath="${myClassPath}" includes="${rootPath}/**/*.java"/>
        <echo message="${moduleName} compiled ${buildTimestamp}"

The problem is, I don't want the last <echo> task to be executed UNLESS the
prior <javac> task actually compiled something, and there doesn't seem to be
an easy way to detect whether any of the .class files have actually changed.

I understand about dependent TARGETS, but I can't seem to find any
information in the manuals or on the FAQ about dependent TASKS within a
single target.  I realize that I could write a special task to handle this
case, but I am hoping that there is already a mechanism somewhere in Ant
that I have just missed.  Any help would be greatly appreciated.

Thank you.

David McLeod

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message