Solved

Try Catch in ant scripts

Posted on 2007-11-22
5
1,655 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

615 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