ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tibor Strausz <Tibor.Stra...@tridion.com>
Subject RE: task results as conditionals
Date Fri, 23 Aug 2002 14:01:01 GMT
look interesting

> -----Original Message-----
> From: Ken Arnold [mailto:arnold@moonhill.org]
> Sent: Thursday, August 22, 2002 7:23 PM
> To: ant-user@jakarta.apache.org
> Subject: task results as conditionals
> 
> 
> I as running down the (apparently old) question of how to run 
> arbitrary 
> tasks whose failure doesn't stop the build.  I find that the idea of 
> putting "failonerror" on all tasks is considered the solution.  While 
> this will work for me, I tried something else first and it 
> seems to me 
> to be more powerful, and which I can't find in the mail archive.
> 
> If you consider an ant task's result to map to true on 
> success and false 
> on failure, then I could use <conditional> to do arbitrary 
> combinations, 
> as in:
> 
> <conditional>
>      <or>
>          <javac ..../>
>          <exec ..../>
>      </or>
> </conditional>
> 
> This would run javac, and if it failed, exec some program 
> (possibly to 
> analyze the error output)
> 
> The view would be that an arbitrary task in a conditional 
> would be run 
> for its result, and therefore it would be up to the 
> conditional (or its 
> user) to decide what to do with that failure.
> 
> I can imagine this being used in other contexts, and because of the 
> conditional logic, can be more powerful than a simple 
> fail/nofail on a 
> single target.
> 
> Possibly this comes from some conceptual error on my part, 
> but if so, I 
> figure I might as well go for public humiliation over private error.-)
> 
> 		Ken Arnold
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:ant-user-help@jakarta.apache.org>
> 

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


Mime
View raw message