You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Loughran <st...@iseran.com> on 2001/12/01 04:14:56 UTC

Re: To fail or not to fail

----- Original Message -----
From: "Jose Alberto Fernandez" <j_...@yahoo.com>
To: "Ant Developers List" <an...@jakarta.apache.org>
Sent: Friday, November 30, 2001 1:23 PM
Subject: Re: To fail or not to fail


From: "Steve Loughran" <st...@iseran.com>

>> Note that there is already a sort of hack to implement <fail if> by
virtue
>> of the fact that many tasks fail if the params are wrong. So if you set
up
>> the parameters right from a condition call you can force a conditional
>> failure:-
>>
>> <condition  name="sleeptime" value="-10" >
>>  <isset name="env.TOMCAT_HOME />
>> </condition>
>> <property name="sleeptime" value="0" />
>> <!-- fails if sleeptime is negative -->
>> <sleep seconds="${sleeptime}"/>
>>

>I cannot believe that build engineers will rely in hacks like that for a
build process.
>How can such code be maintainable or be able to give any reasonable
explanation about a failure.

>Jose Alberto

I am not aware of anybody using this. I was just demonstrating that there
effectively is a <fail if> implementation in the system, just a very
contrived one.

steve


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>