ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: proposed <fail> enhancement (implementation attached)
Date Wed, 21 Mar 2001 13:18:04 GMT
Tim Dawson <> wrote:

> Hello,
> I'd like to submit a change for Ant 1.4 to add "if" and "unless"
> attributes to the <fail> task,

Michael McCallum has submitted a similar task a few weeks back.  And
he's not been the first 8-)

Personally I wouldn't like to add if/unless attributes to some tasks
but not to all. If we agree that this is a good thing, it should be a
core thing IMHO - otherwise we'll find ourselves adding if/unless to
yet another task every once in a while.

>>* Task level if and unless attributes.

is on the list of things to discuss for Ant2.

>   <target name="init">
>     <available property="junit.available"
>                file="${junit.jar}" />
>   </target>
>   <target name="checkJUnit" unless="junit.available"> 
>      <fail ... />
>   </target>

> Anything that wants to ensure that junit has been provided must
> depend on BOTH init and checkJUnit.

No, just on checkJUnit, when you make checkJunit depend on init.

> This gets even more messy when there's a laundry list of things that
> are required.

yep, therefore there's a <condition> task that would set a single
property from multiple conditions that could be combined by boolean
operations on the Ant2 list.


View raw message