Solved

Try Catch in ant scripts

Posted on 2007-11-22
5
1,518 Views
Last Modified: 2012-05-05
Hello Experts,

I have an build.xml, i am running an target in which i have to configure the mails, when build gets failed or success the mail has to be sent to the user.

How will i handle this using try catch?

Thanks,
Shailesh
0
Comment
Question by:ShaileshShinde
5 Comments
 
LVL 92

Expert Comment

by:objects
ID: 20333497
set a failureproperty
0
 
LVL 1

Author Comment

by:ShaileshShinde
ID: 20333509
Hello Expert,

Can you pls suggest how to impliment this for below target....

<target name="test"
    depends="expand_includes"/>

Thanks,
Shailesh
0
 
LVL 92

Expert Comment

by:objects
ID: 20333519
<target name="send_email" unless="build.failed">
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 100 total points
ID: 20333696
See "How do I send an email with the result of my build process?"  at  http://ant.apache.org/faq.html
0
 
LVL 9

Accepted Solution

by:
ysnky earned 150 total points
ID: 20333777
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java string replace 11 46
How to create a textarea which saves text in HTML 8 37
Script to change all permissions to my user 7 35
Powershell File Sort 8 29
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
This video teaches viewers about errors in exception handling.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question