You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by nissea <ni...@ngai.se> on 2007/10/08 17:25:43 UTC

Echo message when build fail

Hi 

I would like to echo out a message when i command fails, my code is as
follows: 
<exec executable="cmd" failonerror="true" > 
   <arg value="xxx"/> 
</exec> 

When this command fails the build fails, but I would like to echo out a
message to the user about what happend. How do I do this? thank you 

-- 
View this message in context: http://www.nabble.com/Echo-message-when-build-fail-tf4588764.html#a13098422
Sent from the Ant - Dev mailing list archive at Nabble.com.


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


Re: Echo message when build fail

Posted by Steve Loughran <st...@apache.org>.
nissea wrote:
> Hi 
> 
> I would like to echo out a message when i command fails, my code is as
> follows: 
> <exec executable="cmd" failonerror="true" > 
>    <arg value="xxx"/> 
> </exec> 
> 
> When this command fails the build fails, but I would like to echo out a
> message to the user about what happend. How do I do this? thank you 
> 

1. please ask this kind of question on Ant's user mailing list. There 
are more people on it.

2. get the exit value of the exec, pass it in to a conditional <fail if> 
task

-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

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