A good example of how to do this is in the mvn.bat batch file.  Open it
up, search for "Start MAVEN2", and then notice how it checks the return
value.  Also notice that you'll need to set the environmental variable
MAVEN_TERMINATE_CMD for the batch file to return errors.

Andrew

> -----Original Message-----
> From: Mick Knutson [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 06, 2007 4:10 PM
> To: maven
> Subject: [m2] How to catch errors when running mvn?
> 
> I want to be able to catch an error in a batch script when I run the
> following command:
> 
> @call mvn clean install -e
> 
> so how could I do something like:
> 
> %local-error% = @call mvn clean install -e
> 
> then test %local-error% != 1
> 
> 
> 
> --
> 
> Thanks,
> Mick Knutson
> 
> http://www.baselogic.com
> http://www.blincmagazine.com
> http://www.djmick.com
> http://www.myspace.com/mickknutson
> http://www.myspace.com/djmick_dot_com
> http://www.myspace.com/sexybeotches
> http://www.thumpradio.com
> ---

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to