You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Andreas Guther <an...@netfuel.com> on 2001/12/20 01:44:29 UTC
Catching Results of exec
Hi:
I wonder how I can catch the result of an exec and then fire
a specific target.
I have a build file that calls a lots of make files with exec.
I have failonerror="false" and the output goes into a log
file.
In case the exec returns e.g. 2 I still want to continue the build
but I would like then fire a mail target for that log file
in order to send the log file to the unit owner.
In case the return code is available from a property, I could
imagine to evaluate that with a condition but I still have
no idea how to get the return code.
Is there a way to catch that return code?
Andreas
Andreas Guther
NetFuel, Inc
http://www.netfuel.com/contact/
Re: Catching Results of exec
Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Andreas Guther" <an...@netfuel.com>
To: <an...@jakarta.apache.org>
Sent: Wednesday, December 19, 2001 16:44
Subject: Catching Results of exec
> Hi:
>
> I wonder how I can catch the result of an exec and then fire
> a specific target.
>
> I have a build file that calls a lots of make files with exec.
> I have failonerror="false" and the output goes into a log
> file.
>
> In case the exec returns e.g. 2 I still want to continue the build
> but I would like then fire a mail target for that log file
> in order to send the log file to the unit owner.
>
> In case the return code is available from a property, I could
> imagine to evaluate that with a condition but I still have
> no idea how to get the return code.
>
> Is there a way to catch that return code?
yeah, we stuck that in to <exec> about three/four weeks ago. Get the source
from CVS and build it and then you can save the return code of <exec> into
the property named with the resultproperty attribute.
-steve
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>