Folks,

It appears to me that the "depends" targets are evaluated/executed
regardless of the"if" test.  Is this correct or is this a case of pilot
error?  If this is the expected behavior, thats okay, I just wanted to
make sure.

thanks,
don.

Below is a sample.

<project name="test" default="build" basedir=".">
    <target name="init"><echo message="ran init"/></target>
    <target name="prepare" depends="init"><echo message="ran
prepare"/></target>
    <target name="build" if="dont.flag" depends="prepare" />
</project>

Here is the output:

G:\src>ant -buildfile test.xml build
Buildfile: test.xml

init:
     [echo] ran init

prepare:
     [echo] ran prepare

build:

BUILD SUCCESSFUL

Total time: 1 second

Reply via email to