Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] AntRunner and detecting build script failure

How does one go about detecting that an Ant script executed by AntRunner has failed? The following Windows cmd file always prints out zero. I'm pretty sure in Ganymede, it prints out a non-zero value, thus allowing the cmd file to detect the failure.

test.cmd
==============
"C:\Program Files\Java\jdk1.6.0_16\jre\bin\java.exe" ^
   -cp ^
   C:\eclipse_3.6\plugins\org.eclipse.equinox.launcher_1.1.0.v20100507.jar ^
   org.eclipse.core.launcher.Main ^
   -application ^
   org.eclipse.ant.core.antRunner ^
   -buildfile ^
   c:\temp\test.xml
echo %ERRORLEVEL%

c:\temp\test.xml
=================

<project name="test" default="alwaysFail">
	<target name="alwaysFail">
		<fail message="no chance"/>
	</target>
</project>	







Back to the top