Bug 54186

Summary: ant.bat always 'succeeds' on windows
Product: Ant Reporter: Mark Sibly <blitzmunter>
Component: Wrapper scriptsAssignee: Ant Notifications List <notifications>
Status: NEW ---    
Severity: normal CC: jglick
Priority: P2 Keywords: PatchAvailable
Version: 1.9.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description Mark Sibly 2012-11-21 21:00:35 UTC
I'm using ant.bat to build Android apps.

However, it never seems to fail (ie: return a non-0 value) even if the java compile fails.

According to this post...

http://mail-archives.apache.org/mod_mbox/ant-user/200306.mbox/%3C20030610224905.52789.qmail@web11504.mail.yahoo.com%3E

It can be fixed by adding "|| if errorlevel 1 exit 1" to the %_JAVACMD% lines.

I've tried this and it works - please add!

Bye,
Mark
Comment 1 Antoine Levy-Lambert 2013-02-21 04:00:51 UTC
what is the value of the OS environment variable on your computer ?
the script should exit with the errorlevel returned by Java.
Is it possible that the value of "OS" is not "Windows_NT" ?

We could simplify the ant.bat by removing Windows 9x support from ant.bat.

The ant.bat is always the frightening piece of software to change because it does not have unit tests.