Community
Participate
Working Groups
After having removed the unconstraint (no version) javax.annotation package imports as of #441359, when installing GEF4 into Luna SR2, org.eclipse.gef4.fx, org.eclipse.gef4.mvc, and org.eclipse.gef4.mvc.fx will cause uses constraint violations because of conflicting indirect dependencies to javax.annotation, as listed below (for o.e.g4.mvc.fx), which does not arise with Mars M6. I do not want to include the java.annotation imports into the code we release for Mars, while I also do not want to loose backwards compatibility with Luna. It will probably be best to create some patch-features that can be applied to achieve backwards compatibility. !ENTRY org.eclipse.gef4.dot.ui 4 0 2015-04-28 12:41:47.530 !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: Could not resolve module: org.eclipse.gef4.dot.ui [280] Unresolved requirement: Require-Bundle: org.eclipse.gef4.mvc.fx; bundle-version="0.1.0" -> Bundle-SymbolicName: org.eclipse.gef4.mvc.fx; bundle-version="0.1.0.201504280601" org.eclipse.gef4.mvc.fx [297] No resolution report for the bundle. Unresolved requirement: Require-Bundle: org.eclipse.gef4.zest.fx; bundle-version="0.1.0" -> Bundle-SymbolicName: org.eclipse.gef4.zest.fx; bundle-version="0.1.0.201504280601" org.eclipse.gef4.zest.fx [304] Unresolved requirement: Require-Bundle: org.eclipse.gef4.mvc.fx; bundle-version="0.1.0" -> Bundle-SymbolicName: org.eclipse.gef4.mvc.fx; bundle-version="0.1.0.201504280601" Unresolved requirement: Require-Bundle: org.eclipse.gef4.zest.fx.ui; bundle-version="0.1.0" -> Bundle-SymbolicName: org.eclipse.gef4.zest.fx.ui; bundle-version="0.1.0.201504280601"; singleton:="true" org.eclipse.gef4.zest.fx.ui [305] Unresolved requirement: Require-Bundle: org.eclipse.gef4.zest.fx; bundle-version="0.1.0" -> Bundle-SymbolicName: org.eclipse.gef4.zest.fx; bundle-version="0.1.0.201504280601" Unresolved requirement: Require-Bundle: org.eclipse.gef4.mvc.fx.ui; bundle-version="0.1.0" -> Bundle-SymbolicName: org.eclipse.gef4.mvc.fx.ui; bundle-version="0.1.0.201504280601" org.eclipse.gef4.mvc.fx.ui [298] Unresolved requirement: Require-Bundle: org.eclipse.gef4.mvc.fx; bundle-version="0.1.0" -> Bundle-SymbolicName: org.eclipse.gef4.mvc.fx; bundle-version="0.1.0.201504280601" Unresolved requirement: Require-Bundle: org.eclipse.gef4.mvc.fx; bundle-version="0.1.0" -> Bundle-SymbolicName: org.eclipse.gef4.mvc.fx; bundle-version="0.1.0.201504280601" Unresolved requirement: Require-Bundle: org.eclipse.gef4.mvc.fx.ui; bundle-version="0.1.0" -> Bundle-SymbolicName: org.eclipse.gef4.mvc.fx.ui; bundle-version="0.1.0.201504280601" Bundle was not resolved because of a uses contraint violation. org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.gef4.mvc.fx [osgi.identity; osgi.identity="org.eclipse.gef4.mvc.fx"; type="osgi.bundle"; version:Version="0.1.0.201504280601"] because it is exposed to package 'javax.annotation' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.2.v20150203-1939"; singleton:="true"] and javax.annotation [osgi.identity; osgi.identity="javax.annotation"; type="osgi.bundle"; version:Version="1.2.0.v201401042248"] via two dependency chains. Chain 1: org.eclipse.gef4.mvc.fx [osgi.identity; osgi.identity="org.eclipse.gef4.mvc.fx"; type="osgi.bundle"; version:Version="0.1.0.201504280601"] require: (&(osgi.wiring.bundle=org.eclipse.osgi)(&(bundle-version>=3.10.0)(!(bundle-version>=4.0.0)))) | provide: osgi.wiring.bundle: [org.eclipse.osgi, system.bundle] org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.2.v20150203-1939"; singleton:="true"] Chain 2: org.eclipse.gef4.mvc.fx [osgi.identity; osgi.identity="org.eclipse.gef4.mvc.fx"; type="osgi.bundle"; version:Version="0.1.0.201504280601"] import: (&(osgi.wiring.package=com.google.common.reflect)(&(version>=12.0.0)(!(version>=16.0.0)))) | export: osgi.wiring.package=com.google.common.reflect; uses:=javax.annotation com.google.guava [osgi.identity; osgi.identity="com.google.guava"; type="osgi.bundle"; version:Version="15.0.0.v201403281430"] import: (osgi.wiring.package=javax.annotation) | export: osgi.wiring.package: javax.annotation javax.annotation [osgi.identity; osgi.identity="javax.annotation"; type="osgi.bundle"; version:Version="1.2.0.v201401042248"] at org.eclipse.osgi.container.Module.start(Module.java:434) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
The same holds for Zest.FX.
I implemented the following changes: - Added o.e.g4.fx.compatibility.luna, o.e.g4.mvc.compatibility.luna, o.e.g4.mvc.fx.compatibility.luna, and o.e.g4.zest.fx.compatibility.luna fragments that add version-unconstrained javax.annotation package imports to their respective host bundles (o.e.g4.fx, o.e.g4.mvc, o.e.g4.mvc.fx, and o.e.g4.zest.fx). - Added o.e.g4.fx.compatibility.luna-feature, o.e.g4.mvc.compatibility.luna-feature, o.e.g4.mvc.fx.compatibility.luna-feature, and o.e.g4.zestfx.compatibility.luna-feature to bundle these fragments - Integrated the compatibility features on our update-site (will be promoted with M7) in a new category (GEF4 (FX, MVC, MVC.FX, Zest.FX) Luna Compatibility Patches). I opened https://dev.eclipse.org/ipzilla/show_bug.cgi?id=9613 to legitimate the pre-req dependency to javax.annotation that is introduced by the compatibility fragments.
CQ9613 has been resolved, thus resolving this as fixed in 3.10.0M7.
I've had errors about missing src/ folders in the compatibility fragments after importing them into an M7 Mars SDK. Removing the src/ entries from the .classpath and build.properties files resulted in build errors during source bundle generation, so I've added empty src/ folders instead: http://git.eclipse.org/c/gef/org.eclipse.gef4.git/commit/?id=7b05361c3d867 To make Git actually add these folders, I've added hidden '.empty' files, as Git won't version empty folders. I guess this is how the issue came up (local empty src/ folders made it work fine, but were never added to the Git repo).
(In reply to Fabian Steeg from comment #4) > I've had errors about missing src/ folders in the compatibility fragments > after importing them into an M7 Mars SDK. Removing the src/ entries from the > .classpath and build.properties files resulted in build errors during source > bundle generation, so I've added empty src/ folders instead: > > http://git.eclipse.org/c/gef/org.eclipse.gef4.git/commit/?id=7b05361c3d867 > > To make Git actually add these folders, I've added hidden '.empty' files, as > Git won't version empty folders. I guess this is how the issue came up > (local empty src/ folders made it work fine, but were never added to the Git > repo). Thanks for having investigated this, Fabian. However, I think there's an easier solution for this, namely suppressing the source generation within the compatibility features. This is what we already do for the doc features. The trick is adding the following to the pom.xml files of the features: <build> <plugins> <plugin> <groupId>org.eclipse.tycho.extras</groupId> <artifactId>tycho-source-feature-plugin</artifactId> <version>${tycho-extras-version}</version> <configuration> <skip>true</skip> </configuration> </plugin> </plugins> </build>
I changed that accordingly, so source feature generation is now skipped and the src folders should also be gone: http://git.eclipse.org/c/gef/org.eclipse.gef4.git/commit/?id=9c3bf40f99fcd12e4d35c9b9f7977406748aa68b