dcsimg
Exception handling with Ant - alternatives?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Adrian_Micu
Posted On:   Tuesday, June 4, 2002 08:22 AM

How can I check, at the end of a project, if the build was a success or there was an error someplace?

Adding a last task in the build only solves the successfull end, if the build fails previously, all the remaining tasks are not executed.

One possibility would be to use 2 different projects, such as:


			
call ant -f mybuild.xml ...
call ant -f check.xml ...

Is there another way?

Thanks

Re: Exception handling with Ant - alternatives?

Posted By:   Erik_Hatcher  
Posted On:   Tuesday, June 4, 2002 07:07 PM

The real way to do this is to use a BuildListener (or BuildLogger). What do you want to happen after the build completes? Check Ant's documentation (version 1.5 preferably) for more details, particularly the Log4jListener and the MailLogger.
About | Sitemap | Contact