Try Catch in ant scripts

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
LVL 1
ShaileshShindeAsked:
Who is Participating?
 
objectsCommented:
set a failureproperty
0
 
ShaileshShindeAuthor Commented:
Hello Expert,

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

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

Thanks,
Shailesh
0
 
objectsCommented:
<target name="send_email" unless="build.failed">
0
 
CEHJConnect With a Mentor Commented:
See "How do I send an email with the result of my build process?"  at  http://ant.apache.org/faq.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.