ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Performing a task besides e-mail upon failure
Date Wed, 20 Oct 2004 11:50:19 GMT
On Wed, 20 Oct 2004, R. Smith <onilollaig@hotmail.com> wrote:

> Hi.  I am trying to find out if you can use Ant to perform some
> alternative task besides e-mail if some of your main tasks fail.

Use a BuildListener - this will receive all events necessary to decide
what to do and can do whatever you want.  This is the pure Ant option.

> In Ant, is there a way to invoke some task at the end like "svnlook"
> if something has failed?

AntContrib <http://ant-contrib.sf.net/> offers an alternative in the
form of a trycatch task.  You could catch the exception and use normal
Ant task inside the catch block.  This is the less pure version.

Since you'll have to code your actions yourself anyway - like running
svnlook and parsing the result - a BuildListener seems to be the
cleaner approach to me.

Stefan

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


Mime
View raw message