Bug 54186 - ant.bat always 'succeeds' on windows
Summary: ant.bat always 'succeeds' on windows
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Wrapper scripts (show other bugs)
Version: 1.9.1
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2012-11-21 21:00 UTC by Mark Sibly
Modified: 2013-05-22 03:39 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.