You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Venkatesh Babu <ve...@yahoo.com> on 2006/07/11 16:41:38 UTC

Knowing the build fail status of ant in batch script

Hello All,

I'm calling an ant target from within my batch script
as follows:

cmd/C ant -f mailer.xml sendmail

My problem is that if the sendmail target fails, I
have to stop execution of my batch script. For that I
tried adding the following statement after the ant
call:

if %ERRORLEVEL% != 0 goto END

This is not working because the ERRORLEVEL is set to 0
even if the ant target fails. May I know what is the
best way to capture the BUILD success/failure status
of ant target ??? Is there any environment variable
that we can access to know this status?

Thank you,
Venkatesh


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Knowing the build fail status of ant in batch script

Posted by Jeffrey E Care <ca...@us.ibm.com>.
Please do not use the Ant user mailing list for personal correspondence.

____________________________________________________________________________________________ 

Jeffrey E. (Jeff) Care 
carej@us.ibm.com 
IBM WebSphere Application Server Development 
WAS Pyxis Lead Release Engineer 




ilango <il...@yahoo.com> wrote on 07/11/2006 11:04:32 AM:

> Hi Venkatesh
> I have a friend called Venkatesh babu and he is from bangalore. Just
> wondering if you were the person I know
> 
> Venkatesh Babu <ve...@yahoo.com> wrote: Hello All,
> 
> I'm calling an ant target from within my batch script
> as follows:
> 
> cmd/C ant -f mailer.xml sendmail
> 
> My problem is that if the sendmail target fails, I
> have to stop execution of my batch script. For that I
> tried adding the following statement after the ant
> call:
> 
> if %ERRORLEVEL% != 0 goto END
> 
> This is not working because the ERRORLEVEL is set to 0
> even if the ant target fails. May I know what is the
> best way to capture the BUILD success/failure status
> of ant target ??? Is there any environment variable
> that we can access to know this status?
> 
> Thank you,
> Venkatesh
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------
> Want to be your own boss? Learn how on  Yahoo! Small Business. 

Re: Knowing the build fail status of ant in batch script

Posted by ilango <il...@yahoo.com>.
Hi Venkatesh
I have a friend called Venkatesh babu and he is from bangalore. Just wondering if you were the person I know

Venkatesh Babu <ve...@yahoo.com> wrote: Hello All,

I'm calling an ant target from within my batch script
as follows:

cmd/C ant -f mailer.xml sendmail

My problem is that if the sendmail target fails, I
have to stop execution of my batch script. For that I
tried adding the following statement after the ant
call:

if %ERRORLEVEL% != 0 goto END

This is not working because the ERRORLEVEL is set to 0
even if the ant target fails. May I know what is the
best way to capture the BUILD success/failure status
of ant target ??? Is there any environment variable
that we can access to know this status?

Thank you,
Venkatesh


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org






 		
---------------------------------
Want to be your own boss? Learn how on  Yahoo! Small Business.