Solved

Try Catch in ant scripts

Posted on 2007-11-22
5
1,631 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Automate PC's, Laptop to correct OU 4 55
Netbeans and org.apache.commons.lang3 issue 3 54
Powershell GUI 11 95
powershell script error 2 36
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 how to count occurrences of each item in an array.
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…

738 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