Hi,
I'm not sure if this is a RAP 2.0 or a Tycho issue but I guess it's related to RAP 2.0 since the Tycho build was working correctly with RAP 1.5. Anyway, somebody might have solved a similar problem already.
I have RAP-Scout feature (org.eclipse.scout.rt.rap) that depends on the features org.eclipse.rap.feature and org.eclipse.scout.rt.
In the feature org.eclipse.rap.feature there's a bundle org.eclipse.rap.rwt which exports the package org.eclipse.swt.
Inside the feature org.eclipse.scout.rt there's a fragment *swt.fragment requiring the bundle org.eclipse.swt as a dependency. This bundle does also export a package org.eclipse.swt.
When building the RAP-Scout feature with Tycho the build fails with the following error message:
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: org.eclipse.scout.rt.rap.feature.group 3.9.0.qualifier
[ERROR] Cannot satisfy dependency: org.eclipse.rap.feature.feature.group 2.0.0.20130205-1849 depends on: org.eclipse.swt 0.0.0
[ERROR] Cannot satisfy dependency: org.eclipse.scout.rt.feature.group 3.9.0.qualifier depends on: org.eclipse.scout.rt.ui.swing.browser.swt.fragment 0.0.0
[ERROR] Cannot satisfy dependency: org.eclipse.scout.rt.rap.feature.group 3.9.0.qualifier depends on: org.eclipse.rap.feature.feature.group [2.0.0,3.0.0)
[ERROR] Cannot satisfy dependency: org.eclipse.scout.rt.rap.feature.group 3.9.0.qualifier depends on: org.eclipse.scout.rt.feature.group [3.9.0,4.0.0)
[ERROR] Cannot satisfy dependency: org.eclipse.scout.rt.ui.swing.browser.swt.fragment 3.9.0.qualifier depends on: bundle org.eclipse.swt [3.4.0,4.0.0)
My guess why this error occurs is because Tycho resolves the org.eclipse.rap.feature first and finds out that the exported package org.eclipse.swt belongs to the bundle org.eclipse.rap.rwt. When the dependency of the
*swt.fragment is resolved, there might be a package name clash since the bundle org.eclipse.swt exports the same package.
However, in the *swt.fragment the bundle org.eclipse.swt is defined explicitly as a required plugin. So the package name clash should not be the reason.
I tried to remove the bundle org.eclipse.swt from the required plugins and set the package org.eclipse.swt under imported packages. In this case, I can see that the bundle org.eclipse.rap.rwt is used which is not the
desired plugin.
If I set a version constraint on the imported package e.g. minimum version 3.4.0 neither org.eclipse.swt nor org.eclipse.rap.rwt is imported.
Does anyone have an idea why this dependency cannot be resolved?
Used updatesites:
RAP 2.0 RC3: http://download.eclipse.org/rt/rap/2.0/RC3-20130205-1849.kepler
Kepler: http://download.eclipse.org/releases/kepler/
Thanks in advance,
Ken