Community
Participate
Working Groups
To have a suitable build it is necessary to execute Eclipse AntRunner from within the Eclipse launcher in our build process. There are two ways to do this. (1) <exec executable="/eclipse/eclipse" dir="/eclipse" failonerror="true"> <arg line="-nosplash -application org.eclipse.ant.core.antRunner [...]"/> </exec> (2) <java classname="org.eclipse.core.launcher.Main" jvm="/eclipse/jre/bin/java" fork="true" dir="/eclipse" failonerror="true"> <arg line="-application org.eclipse.ant.core.antRunner [...]"/> <classpath> <pathelement path="/eclipse/startup.jar"/> </classpath> </java> The "failonerror" option is very important to recognice failures in the executed build scripts. This doesn't work because the error level (system exit code) is zero in both cases. May be the "org.eclipse.ant.core.antRunner" is involded too but I'm not sure.
Needs investigation
Not going to get to in M4
DJ, I am looking into this (finally :-) )and I have a few questions: where is the source for the classes in startup.jar? We are throwing an exception out of our "application" yet the system exit code indicates success?
It seems to me that InternalBootLoader.run(String, URL, String[], Runnable) has a flaw that it will always eat exceptions with the return statement in the finally block.
org.eclipse.core.launcher.Main is in the org.eclipse.platform plug-in project. Check out Main.basicRun. InternalBootloader.run should throw a wrapped exception (since the method sig doesn't permit exception throwing) and then the code in Main will catch it and throw the wrapped guy.
I am confused...InternalBootLoader run methods both claim to throw Exception? But with the return in the finally block, no exception, wrapped or otherwise will be thrown out of the method.
Oops...sorry, a case of it being too early in the morning and my editor not scrolling to the right to see the rest of the method sig. Yes, I see what you are saying now. Let me take a look at it and see what the scoop is but at first glance it looks like anyone not going through our Main class will be screwed because they'd be expecting an Exception, not their exception wrapped in an InvocationTargetException.
No, even going through the Main class...unless I am misreading the code, no exceptions will come out of the InternalBootLoader try block because of the return statement in the finally. Is "return result;" supposed to be in the finally block? try { result = runnable.run(applicationArgs); } catch (Throwable e) { e.printStackTrace(); throw new InvocationTargetException(e); } finally { shutdown(); return result; }
Every week I have "one of those days". Today is that day. :-) I have released the change and it will be included in this morning's RC1 candidate re-build.
Thanks DJ :-) I will check out the fix later today.
Verified fixed in build 20030221.