ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <j_a_fernan...@yahoo.com>
Subject Re: To fail or not to fail
Date Fri, 30 Nov 2001 21:23:41 GMT
From: "Steve Loughran" <steve_l@iseran.com>

> 
> I think adding if and unless tests to fail would suffice for much now.
> Complex conditions can go into a <condition> test which immediately preceeds
> the <fail>.
> 
> 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



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


Mime
View raw message