ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <...@schillbaer.de>
Subject Re: failonerror and forking
Date Tue, 15 Jul 2008 20:07:15 GMT
Gilbert Rebhan schrieb:
> rainer.luedtke@hsbcib.com schrieb:
>> Hello everybody,
>>
>> I am running a forked <java> task as part of my ant job using the 
>> following
>> <java classname="path.to.class" fork="true" failonerror="true"
>> dir="${config}"> arguments. When I run the job, ant ends with "BUILD
>> SUCCESSFULL" even if there was an exception raised in the forked task. 
>> But
>> I would need the job to end with an error code. Has anybody ever come
>> across this problem?


> try with explicitly System.exit(some int != 0), f.e.
> 
> ...
> try {
>     foobar()
> } catch (Exception exc {
>     System.exit(1)
> }
> ...

replace with =

use an explicit System.exit(some int != 0) in your class, f.e.

...
try {
     foobar()
} catch (Exception exc {
     System.exit(1)
}
...

Regards, Gilbert

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


Mime
View raw message