ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: If and unless
Date Mon, 05 Aug 2013 17:28:25 GMT
Hi, Tom.  The examples in the manual are wrong.  if/unless:set references a
property name as described, but for if/unless:true/blank the attribute
value should be the actual value you want to evaluate, e.g.
${has.css.overrides}.  Sorry for the trouble!  :)

Matt


On Mon, Aug 5, 2013 at 11:31 AM, Tom Cleghorn <tcleghorn@cambridge.org>wrote:

> Hi,
>
> I'm puzzled by the new if and unless functionality - it seems that in
> 1.9.2, the following, where ${id}.css *does* exist:
> <available filepath="${toString:input}" file="${id}.css"
> property="has.css.overrides"/>
>
> ...will set $has.css.overrides to 'true' as expected, but the property
> won't then evaluate as (boolean) true for this:
> <echo if:true="has.css.overrides" message="--- CSS override found ---"/>
>
> Is this expected behaviour? If I use if:set, then the echo task runs as
> I'd expected, but if possible I'd like to be able to distinguish between
> 'true' and 'false', as well as between 'true' and 'not set'.
>
> Any advice most appreciated!
>
> ---------------------------------------------------------------------
> 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