Tuesday, May 4, 2010

Learning Eclipse P2

Good intros: http://www.vogella.de/articles/EclipseP2Update/article.html ,
http://www.slideshare.net/irbull/p2-introduction.

Exporting a feature with P2 info from the IDE is quite straight forward.

When adding the P2 UI to the final product by adding the feature org.eclipse.equinox.p2.user.ui, I had strange problems under Eclipse 3.5.2:
Product wouldn't start, or not include the P2 UI, or not have much P2 information.
It only works halfway from within the IDE, and only after the run-configuration is deleted and re-created.

To export a working product:
Include org.eclipse.equinox.p2.user.ui with either the full version number, or use 0.0.0, but beware that this must be entered manually because of https://bugs.eclipse.org/bugs/show_bug.cgi?id=279480

This will provide a product with the P2 GUI, but About/Installation Details would be nearly empty, Configuration completely blank unless also exporting with metadata.
Checking the "metadata" option on export combined with source export, however, results in error "gather.sources" does not exist because of bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=286940.
Export with meta data but without sources works OK.

Info about plugins/features in general, based on the old update mechanism: http://www.eclipse.org/articles/article.php?file=Article-Update/index.html Includes tip to always end the update site link with "/"!

Merging repositories, for example a repository resulting from a new stable version into the 'main' repository on a web site:

Remaining issue:
  • OK to export product, based on features, into repository
  • OK to export additional feature into repository, then install into product via UI
  • OK to export update for that additional feature, and update product via UI
What doesn't seem to be possible:
  • Export update for feature in product to repository. Update fails with message regarding conflict between the new plugin from the updated feature and the original plugin that the product requires
Workaround: Always update the whole product, including version of the whole product, then the old product can update itself.

No comments:

Post a Comment