> -----Original Message-----
> From: Steve Loughran [mailto:[EMAIL PROTECTED] 

> >>
> >>The ant commandline script under windows (NT/XP/etc.) 
> >>returns either 0 or 1.
> >>A zero value indicates that the build was successful.  A value of 1 
> >>indicates an error. Under Windows you can use the 
> >>ERRORLEVEL variable to test the result of invoking ant.
> >>For example:
> 
> 
> I'm not sure that ant.bat does this, for backwards compat with win98. 
> The perl and python runant scripts work though.

The error status is established in the value passed to System.exit( int )
which is handled in the org.apache.tools.ant.Main class startAnt method.
The JVM establishes the ERRORLEVEL on exit before returning to the script -
in other words - the ant.bat file doesn't need to handle this - however - if
you have a bat file that invokes a series of ant builds you can trap success
(or failure) using ERRORLEVEL and handle things like early exit. 

Cheers, Steve.


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

Reply via email to