ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Scokart <gscok...@gmail.com>
Subject Re: <target>s unless/if: strangeness in default behaviour (imho) (ant 1.6.5)
Date Mon, 31 Aug 2009 10:59:53 GMT
This is indeed as designed, and it is pretty usefull because you can set the
property p in t1 or t2.  This pattern is quiet often used.


Gilles Scokart


2009/8/31 Francis GALIEGUE <fge@one2team.com>

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message