Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321877 - When using headless build, java process does not exit with exit code !=0 when build fails
Summary: When using headless build, java process does not exit with exit code !=0 when...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-05 09:59 EDT by Eike Thaden CLA
Modified: 2010-08-06 13:29 EDT (History)
1 user (show)

See Also:


Attachments
Example for headless build (34.39 KB, application/x-zip-compressed)
2010-08-05 11:06 EDT, Eike Thaden CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Thaden CLA 2010-08-05 09:59:25 EDT
Build Identifier: I20100608-0911

I want to use headless build of some eclipse plugins inside of my main build process (based on make). A command like the following is used to start the headless build:
/usr/bin/java -Djava.library.path=/usr/lib/jni:/usr/lib64:/usr/lib -jar $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -application org.eclipse.ant.core.antRunner -buildfile $ECLIPSE_HOME/plugins/org.eclipse.pde.build_3.6.0.v20100603/scripts/build.xml -DbuildDirectory="$HOME/workspace/Project/build/java_build" -DbaseLocation="$ECLIPSE_HOME"

If the build was successful, the java process exists with exit code=0 as expected. However whenever the build fails somewhere, the exit code is still zero. It seems that this bug was introduced in Helios first. With Galileo everything works just fine.

Reproducible: Always

Steps to Reproduce:
1. Prepare headless build
2. Insert syntax error into one java file
3. Run headless build and watch for the exit code of the java process.
Comment 1 Eike Thaden CLA 2010-08-05 11:06:14 EDT
Created attachment 175950 [details]
Example for headless build

Please import both projects into your workspace. Then edit the makefile variables and make sure, that the referenced jar files exist. After calling make you'll see, that Helios will always exit with error code 0 even if the compilation was not successful.
Comment 2 Eike Thaden CLA 2010-08-06 09:40:27 EDT
Works as expected when using nightly builds, e.g. I20100805-1700.
Comment 3 Andrew Niefer CLA 2010-08-06 11:50:03 EDT
There really hasn't been any change in PDE/Build for 3.7 that I can imagine would affect this.
Comment 4 Eike Thaden CLA 2010-08-06 13:29:31 EDT
Possibly the problem is in one of the parts of eclipse which call the PDE like the equinox launcher, the antRunner application, etc. At least one component does not forward the event that the compile process was unsuccessful.