ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Weiqi Gao <weiqi...@networkusa.net>
Subject Re: Return code from Ant
Date Tue, 28 Oct 2003 18:50:27 GMT
Jing Xue wrote:

> Quoting Stefan Bodewig <bodewig@apache.org>:
> 
> > On 27 Oct 2003, Weiqi Gao <weiqigao@networkusa.net> wrote:
> > 
> > 
> > > However in my testing I discovered that Ant's return code is always
> > > 0
> > 
> > Not in my case:
> 
> [snipped]
> 
> > This is Linux, /bin/sh is bash.
> > 
> 
> Not that it'd be directly helpful to the OP, just wanted to confirm that it 
> returns error codes on Windows as well:
> 
> c:\work\build>%ant_home%\bin\ant clean
> Buildfile: build.xml
> 
> clean:
>    [delete] Deleting directory c:\work\build\classes
> 
> BUILD SUCCESSFUL
> Total time: 1 second
> c:\work\build>echo %ERRORLEVEL%
> 0
> 
> c:\work\build>%ant_home%\bin\ant invalid-target
> Buildfile: build.xml
> 
> BUILD FAILED
> Target `invalid-target' does not exist in this project.
> 
> Total time: 0 seconds
> c:\work\build>echo %ERRORLEVEL%

Upon close inspection, the error comes out of the stcheckout (StarTeam 
Checkout) task, not from the delete task.  Sorry for the confusion.

--
Weiqi Gao
weiqigao@networkusa.net
http://www.weiqigao.com


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


Mime
View raw message