ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <>
Subject Re: Conditional (Target) Execution
Date Fri, 08 Oct 2004 16:09:22 GMT
There is an <if/> task in ant-contrib that does this:
   <isset property="prop"/>
       <echo>Prop is set</echo>


Phil Weighill-Smith wrote:

>A while back there was a discussion about having a syntax for use in the if and unless
attributes of targets. It has occurred to me that perhaps we just need a task akin to "sequential"
that can have a condition data type as its first "child". This condition would determine whether
the further content of the task would be "executed".
>This might look like:
><target name="something">
>    <conditional>
>        <condition>
>            <isset property=""/>
>        </condition>
>        <copy .../>
>        ...
>    </conditional>
>This example would be equivalent to using the if attribute, but the full power of condition
could be applied.
>In addition, this would allow any sub-part of a target (including the default target)
to be made conditional without resorting to the use of properties.
>Have I missed an existing Ant capability, or would this be a worthy enhancement?
>Phil Weighill-Smith
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message