ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Brusseau <>
Subject Re: Question about failonerror
Date Tue, 03 Feb 2004 19:18:54 GMT
I will probably fail in these cases but I'd like to do
some exta stuff before failing.  One example of what
I'd like to do is if I'm in offline mode (i.e., have a set
property with the name is-offline) is send an email
to the builder before explicitly calling the fail target
when the compile fails.

I believe ant should be agnostic to whether or not  an
unsuccessful compile should warrant a failure of the
entire ant script to allow the build script author the
maximum flexibility. Having a failure-property that
gets set (like the junit task) seems like an ideal way
to allow the author to accomplish this.

Tony Brusseau

Dominique Devienne wrote:

>>From: Tony Brusseau []
>>I just wrote a target that calls junit and
>>has different behaviors depending on whether of
>>not junit succeeded. To do this I used the
>>following attributes:
>>	haltonfailure="off"
>>        failureproperty="test-failed"
>>I'd like to have the same behevior for
>>compling, cleaning, "cvsing", installing, etc.
>Why? Doesn't an unsuccessful compile warrant a failure?
>The only time I ever use failonerror="false" is to allow
>generating the testing report with <junitreport>, so that
>the developer can look at the failures in the report, and
>I then actually fail the build.
>That's it. Everything else that fails should fail the build,
>and you should reconsider doing anything different, IMHO. --DD
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message