Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 442973

Summary: Ensure GEF4 components can be installed without any prerequisites
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: RelEngAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.10.0 (Mars) M2   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 443673    
Bug Blocks:    

Description Alexander Nyßen CLA 2014-08-31 23:41:06 EDT
When trying to install GEF4 components from the GEF4 update site, the Xtext and e(fx)clipse update-sites have to be manually added to the list of available sites, and e(fx)clipse core features has to be manually installed (as the org.eclipse.fx.osgi fragment, which will not be pulled in as a dependency).

We need to make use that both is not required, i.e. the list of related sites is made available and the necessary e(fx)clipse bundles are either re-bundled or specified via a feature reference.
Comment 1 Alexander Nyßen CLA 2014-09-07 10:01:19 EDT
Support for specifying referenced sites (as needed in our case) seems to have been added to p2/PDE as of bug #426531. However, Tycho-support seems to be still missing, as discussed in bug #391033 (while there seem to be workarounds).
Comment 2 Alexander Nyßen CLA 2014-09-10 02:29:04 EDT
In addition to the external update-site references, we will need to ensure that:

- com.google.inject (bundle)
- com.google.inject.multibindings (fragment)
- com.google.guava (bundle)
- org.eclipse.fx.javafx (singleton-bundle)
- org.eclipse.fx.osgi (fragment) 

are always installed with the respective GEF4 components that make use of them. 

Especially the fragments listed above are important, and we will thus have to include them in our own features or specify dependencies to other third-party features that bundle them.

Currently, the following GEF4 features bundle them: 

org.eclipse.gef4.common-feature:
- com.google.inject (bundle)
- com.google.inject.multibindings (fragment)

org.eclipse.gef4.mvc-feature:
- com.google.guava (bundle)

The last two are currently unbundled, and should - if possible - be included by the org.eclipse.gef4.fx-feature (but that may be problematic, as the same singleton-bundle is also bundled by e(fx)clipse), or pulled in by a feature dependency (to an e(fx)clipse feature).
Comment 3 Alexander Nyßen CLA 2014-09-10 04:33:00 EDT
I made use of the jboss-tools workaround to make ensure http://download.eclipse.org/releases/mars is a referenced repo.

This way, Xtext dependencies will be satisfied. Removing dependency on bug #391033.
Comment 4 Alexander Nyßen CLA 2014-09-10 04:35:04 EDT
In order to ensure that the two e(fx)clipse bundles (org.eclipse.fx.javafx and org.eclipse.fx.osgi) can be referenced via a feature dependency, I requested that e(fx)clipse provides a minimal runtime feature that bundles exactly those (see bug  #443673). As soon as this feature is available and is provided on the mars releases site, we should be able to achieve what I had in mind here.
Comment 5 Alexander Nyßen CLA 2014-09-10 11:33:30 EDT
I added the 'LUNA.target' and 'MARS.target' maven profiles also to the org.eclipse.gef4.repository pom.xml, which ensures that the respective Luna- or Mars- specific external repositories are referenced, depending on the target of the build.
Comment 6 Alexander Nyßen CLA 2014-09-27 07:32:40 EDT
Ensured Mars target contains e(fx)clipse minimal runtime feature:

<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
  <unit id="org.eclipse.fx.runtime.min.feature.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/efxclipse/runtime-shared-tagged/latest"/>

Added a dependency from o.e.g4.geometry.fx-feature to e(fx)clipse minimal runtime feature, because this is our "lowest" entry point for JavaFX (and all other JavaFX-dependent bundles have direct or indirect dependencies to it).

We should update the target to retrieve e(fx)clipse minimal runtime feature from the Mars simrel aggregator site (instead of http://download.eclipse.org/efxclipse/runtime-shared-tagged/latest) soon as M2 has been officially promoted to /releases/mars (the e(fx)clipse minimal runtime feature was not contained in Mars M1).
Comment 7 Alexander Nyßen CLA 2014-10-02 03:39:24 EDT
Verified that with the M2 staging sim-rel repo, all GEF4 features can be installed without prerequisites. Will have to test the same with our milestone site, as soon as the M2 sim-rel contents is available at the releases site.
Comment 8 Alexander Nyßen CLA 2014-11-11 11:10:29 EST
Verified that all GEF4 bundles can be installed from Mars M2 releases site into a clean RCP package (I did not find any classic or committer package) without any prerequisite.  Verified the MVC and Zest example view showed up properly. 

Resolving as fixed in 3.10.0M2.