0

I have an ant script that does a headless build using the following ant code

<java jar="${equinoxjar}" fork="true" failonerror="true"  logerror="true">
        <arg line="-application org.eclipse.ant.core.antRunner -buildfile ${buildscript}" />

    </java>

However it seems that even if my code has compilation errors, the returncode from the java task does not return an error. Thus my builds in teamcity are still shown as successful, even though there are compilation errors.

How do i fix this? The version of eclipse I am using to do the build is 3.6.2

Konstantin Komissarchik
  • 28,879
  • 6
  • 61
  • 61
pdeva
  • 43,605
  • 46
  • 133
  • 171

1 Answers1

1

Are you 100% certain that you are building with 3.6.2? There was a bug like this in 3.6.0, but it was fixed in 3.6.1 release.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=321386

Konstantin Komissarchik
  • 28,879
  • 6
  • 61
  • 61
  • Yes. The value of ${equinoxjar} is C:\eclipses\target\eclipse3.6.2\plugins\org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar – pdeva Mar 08 '11 at 14:43
  • I do notice that if i add a property javacFailOnError= true in the build.properties file, then the build does fail. However I think it should fail without it too, if I am correct. – pdeva Mar 08 '11 at 14:44
  • Re javacFailOnError=true. Based on your comment I went looking closer at my build script and sure enough I set this property in the java task when calling into antRunner. – Konstantin Komissarchik Mar 08 '11 at 15:56
  • umm by the 'java task' you mean setting the property in the build.properties file right? The java task doesnt have a javacFailOnError property. – pdeva Mar 10 '11 at 14:16
  • in your invocation. – Konstantin Komissarchik Mar 10 '11 at 21:12