views:

285

answers:

3

I have a product definition that includes one feature I wrote and the org.eclipse.feature. When I build this product from eclipse, it completes successfully. However, when I try to use the Headless build, the compilation process fails as it complains that it cannot find classes included in org.eclipse.ui. One of these classes, for example, is PlatformUI. The build process thus fails.

I've checked and the org.eclipse.ui is included in the org.eclipse.ui plugin. I've also tried to include this plugin explicitly in my custom feature, but to no avail.

I've also tried removing one of these plugins with problems, but the next that used org.eclipse.ui failed. So it seems to be definitively a classpath issue of some sowrt.

I've tried this headless build using version 3.3.2 of Eclipse.

A: 

Did you check your build.properties file?

Specifically the archivesFormat section

The archivesFormat property allows specifying the output format (zip, tar, and folder) of the build on a configuration basis.
The format of the property is <configuration> - <format>, where configuration is the same value than the one specified in the configs property.

if it specifies linux,gtk,x86-folder while you are trying to build with a win32 installation, it will not work.

VonC
Hi! I've checked this file. I actually had no entry. I've added the win32 entry but my problem is still the same.
Mario Ortegón
A: 

Unfortunately Eclipse shows different behaviour between exporting a product in the GUI and doing it headless. They are not quite the same.

One problem I've found in the past is that I needed the delta pack installed for the headless build to work, even if I was doing the build on the same architecture I was targeting (win32). Exporting the product from the GUI would work without the delta pack - doh!

hbunny
+1  A: 

The org.eclipse.ui.PlatformUI class is in the org.eclipse.ui.workbench plug-in.

org.eclipse.ui.workbench is required and re-exported by org.eclipse.ui. The "org.eclipse.ui" package is a split package.

If you are using Import-Package for this dependency, then you are only getting wired to one of the providers of the package. If you only need the classes from the ui.workbench, then you can add an attribute to your Import-Package statement:

Import-Package:org.eclipse.ui;ui.workbench=split

Or, you could just change to Require-Bundle

Andrew Niefer
I found the problem and it is related to what you mention. I had a bogus org.eclipse.ui.workbench plugin that was wreaking havoc with the build.
Mario Ortegón