You can do this by configuring the maillogger in your startscript:

ant build_ant.xml -logger org.apache.tools.ant.listener.MailLogger 

Then you have to set the following properties
MailLogger.mailhost=
MailLogger.from=
MailLogger.failure.subject=failed
MailLogger.success.subject=successfull
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Then you will send the output of Ant to the specifies addresses.

Another strategy (big solution) is using CruiseControl






-- 
Jürgen Knuplesch
-----Ursprüngliche Nachricht-----
Von: p2008 [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 23. Juli 2008 00:35
An: user@ant.apache.org
Betreff: How to run an ant target on success/failed build


I need to be able to trigger running a specific ant target when the build 
succeeds, and another one when it fails.  This will be used to send out an 
email indicating the status of the build.

I have done this in the past in nant (.NET) which has a built in property 
called nant.onsuccess and one called nant.onfailure.  

Is there something similar in ant, or any does anybody know how to do this?

Thanks!
--
View this message in context: 
http://www.nabble.com/How-to-run-an-ant-target-on-success-failed-build-tp18600235p18600235.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to