ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jing Xue <apa...@magicfat.lunarpages.com>
Subject Re: Return code from Ant
Date Tue, 28 Oct 2003 18:24:05 GMT
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%
1


--J.X.


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


Mime
View raw message