You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Claude Brisson <cl...@renegat.net> on 2007/11/04 09:11:23 UTC

how to have execute a task on failure ?

Hi.

I need to execute a task when junit encounters an error or a failure.

Is there any way to do so?

If I set haltonerror/failure to false, is there a way to get junit
success status in a property, so that I can then trigger the subsequent
flow?

Thanks,

  Claude


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


Re: how to have execute a task on failure ?

Posted by Henk van Voorthuijsen <vo...@xs4all.nl>.
On Nov 4, 2007, at 9:11 AM, Claude Brisson wrote:

> Hi.
>
> I need to execute a task when junit encounters an error or a failure.
>
> Is there any way to do so?
>
> If I set haltonerror/failure to false, is there a way to get junit
> success status in a property, so that I can then trigger the  
> subsequent
> flow?
>

There is. You set the "errorproperty" or "failureproperty" attribute:

http://ant.apache.org/manual/OptionalTasks/junit.html

Henk

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