ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis GALIEGUE <...@one2team.com>
Subject <target>s unless/if: strangeness in default behaviour (imho) (ant 1.6.5)
Date Mon, 31 Aug 2009 08:53:56 GMT
Hello everyone,

I have noticed something strange in the if="" and unless="" attributes
of targets.

Let's say that I have:

<target name="t1"/>

<target name="t2" unless="p2"/>

<target name="t" unless="p" depends="t1, t2"/>

If I:

ant -Dp2=1

then, as expected, t1 triggers via t but not t2.

However, if I:

ant -Dp=1

I'd have expected none of t1 and t2 to execute, but both are executed!

Which means that the dependencies of a target are executed before even
any if="" or unless="" attributes are taken into account... This is
rather counterintuitive to my eyes. Is this really the expected
behaviour or is this a bug?


-- 

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message