Community
Participate
Working Groups
Created attachment 284123 [details] stacktrace It looks like the core builder starts the UI. We are running a headless build which ends in error because cdt.ui is started in this process: The offending statement that starts the UI is: org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder$CfgBuildInfo.getConsole(CommonBuilder.java:177) The full stacktrace is attached.
If you are doing a headless build, but not with the headless builder there are some manual setup steps you need to perform. For this issue you need to set the console to use for build output, otherwise the UI bundle's provided one is used. System.setProperty("org.eclipse.cdt.core.console", "org.eclipse.cdt.core.systemConsole"); //$NON-NLS-1$ //$NON-NLS-2$ should do it. If it does, please let me know and I can close off this bug. See org.eclipse.cdt.managedbuilder.internal.core.HeadlessBuilder.start(IApplicationContext) for what the headless builder does.
@jonah FYI this is the issue you are looking into for Sloeber.
(In reply to Jonah Graham from comment #1) > If you are doing a headless build, but not with the headless builder there > are some manual setup steps you need to perform. > > For this issue you need to set the console to use for build output, > otherwise the UI bundle's provided one is used. > > System.setProperty("org.eclipse.cdt.core.console", > "org.eclipse.cdt.core.systemConsole"); //$NON-NLS-1$ //$NON-NLS-2$ > > should do it. If it does, please let me know and I can close off this bug. > > See > org.eclipse.cdt.managedbuilder.internal.core.HeadlessBuilder. > start(IApplicationContext) for what the headless builder does. Thanks for the quick response, Jonah. I will try this.
As Jonah suggested: Adding System.setProperty("org.eclipse.cdt.core.console", "org.eclipse.cdt.core.systemConsole"); //$NON-NLS-1$ //$NON-NLS-2$ to the unit setup code fixed (on my system) the error in the log file during the maven build.