You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Sizemore Berry-E50314 <be...@motorola.com> on 2005/12/15 23:16:27 UTC
ant return status
I'm charged with learning more about ant return status variables. I have no clue where to start. Links to documentation that will help me understand it would be most welcome. Pointing to specific sections of documentation would be helpful. To clarify my interest: I am interested in capturing whether or not ant has successfully completed execution or if there was a failure.
Thanks,
Berry Sizemore
Deployment Engineer II
direct +1.206.664.9655
mobile +1.206.257.9095
Motorola
Seattle, WA
<blocked::http://www.motorola.com/> www.motorola.com
RE: ant return status
Posted by Stephen McConnell <mc...@dpml.net>.
> -----Original Message-----
> From: Sizemore Berry-E50314 [mailto:berry.sizemore@motorola.com]
> Sent: Friday, 16 December 2005 8:46 AM
> To: user@ant.apache.org
> Subject: ant return status
>
> I'm charged with learning more about ant return status
> variables. I have no clue where to start. Links to
> documentation that will help me understand it would be most
> welcome. Pointing to specific sections of documentation
> would be helpful. To clarify my interest: I am interested
> in capturing whether or not ant has successfully completed
> execution or if there was a failure.
The ant commandline script under windows (NT/XP/etc.) returns either 0 or 1.
A zero value indicates that the build was successful. A value of 1
indicates an error. Under Windows you can use the ERRORLEVEL variable to
test the result of invoking ant. For example:
CALL :execute-my-ant-build
IF ERRORLEVEL 1 GOTO :exit
:execute-my-ant-build
PUSHD my-dir\my-subdir
CALL ant %*
POPD
GOTO :EOF
:exit
IF ERRORLEVEL 1 ECHO WOOPS, SOMETHING FAILED
GOTO :EOF
Cheers, Steve.
--------------------------
Stephen McConnell
mailto:mcconnell@dpml.net
http://www.dpml.net
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org