I'm using Ant to invoke Eclipse PDE Build to make a headless build of an RCP application. As I understand it PDE Build itself calls Ant to build the application, so we're essentially running an Ant build in Ant.
The problem is this: when the PDE Build fails due to compilation errors from the Java compiler, the error is not propagated back to my parent Ant script that started the PDE Build. This means that the build is said to have been successful even though it wasn't. However it does fail properly when there are other errors, such as when a plugin is missing so that dependencies can't be resolved.
This is the task that I call to build an Eclipse feature:
<target name="feature_build">
<exec executable="java" failonerror="true">
<arg value="-Xmx512m" />
<arg value="-jar" />
<arg value="${equinox.launcher}" />
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-buildfile" />
<arg value="${pde.build.dir}/scripts/build.xml" />
</exec>
</target>
Am I doing something obviously wrong, or could this be a bug in PDE Build? I'm building for Eclipse E4 M5, and according to the build output the version of PDE Build is 3.9.0-v20131003-1506.