ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <>
Subject Re: verifying build success via target return codes or parsing build output logs.
Date Thu, 28 Feb 2008 20:13:20 GMT
Lucas Albers wrote:
> 1.)What return codes generate a build failure?
> 	a.) Assumption: Calling an execution target that return a non-zero
> result will fail the owning project?

if you want to get a 'Build Failed' ALWAYS ! use
failonerror="true", btw. there's no consistency about
the default setting across several ant task, some have
true, others false as default, always consult the manual.

Or use the try/catch/finally construct
of antcontrib tasksuite

> 	b.) Target call's that returned a error (2) and did not appear to
> fail the project.

maybe because you didn't use failonerror="true" ?!

> 2.) When compiling I have been validated the result of a build by searching
> the build output for specific key words. 
> 	a.) Which is a better method, check the return codes or check a
> build output log?
> 	b.) Is there a cleaner method to check output?

catch your output in a property for further processing
in your ant workflow,
see ant manual <exec> task
outputproperty | resultproperty | errorproperty

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message