ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: if/unless Attributes
Date Fri, 25 Sep 2009 04:06:29 GMT
On 2009-09-24, Matt Benson <gudnabrsam@yahoo.com> wrote:

> --- On Thu, 9/24/09, Peter Reilly <peter.kitt.reilly@gmail.com> wrote:

>> using <target name="x" if="${foo}">
>> seems to be very very strange..

> Maybe it seems that way, but taking into account you'd have to be
> deliberately using propertyhelper delegates to make proper use of
> this, it might look like:

> <target name="x" if="${boolean:${do-x}}" unless="${boolean:${skip-x}}">
>   <...>
> </target>

<target name="x" if="${||(${boolean:${arg1}},${boolean:${arg2}})}">

yes, it looks unwieldy.

It would be possible to remove the outer ${} so Matt's example could
become 

if="boolean:${do-x}"

This can be done without breaking backwards compatibility too much but
leaves us with a place where Ant suddenly expands properties without ${}
syntax - I'm not convinced this would be a good idea.

Stefan

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


Mime
View raw message