ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Abley <james.ab...@volantis.com>
Subject Re: Logging depending on return result from Java prog
Date Fri, 28 Oct 2005 11:57:37 GMT
On Fri, 2005-10-28 at 12:49, Ben Ryan wrote:
> Hi,
>     Apologies in advance if this is a trivial question.
>  
>     I have looked everywhere I can find, there are probably lots of
> other places, for an example of how to log an error message only when
> the prog run by a java task returns non-zero.
>     Can anybody help? 
>  
> Regards,
>     Ben
> 
> ------------------------------------------
> Dr Ben Ryan MBCS
> Technical Director
> Kainao Limited
> Tel (Direct): +44 1484 453306
> Tel (General): +44 1484 453303
> Fax: +44 1484 453343
> Web: http://www.kainao.com
> ------------------------------------------

I'd suggest using the resultproperty attribute of the java task, and
then a condition which sets a property when the resultproperty is not
equal to "0".

Targets can then run using unless or if which can fail or echo the
message as you require.

James

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


Mime
View raw message