Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » How to bind a feature to a specific Eclipse package/version(p2 composite repository and Eclipse package/version)
How to bind a feature to a specific Eclipse package/version [message #1764110] Thu, 25 May 2017 01:25 Go to next message
guy bonneau is currently offline guy bonneauFriend
Messages: 5
Registered: January 2015
Junior Member
I am trying to understand how to create a p2 composite repository to let many Eclipse "package" (Luna, Mars, Neon) and their associated release (r, sr1, sr2) to be updated with a new feature. Let call this new feature AddOnFeature. Each Eclipse package/version released has its own AddOnFeature feature tagged with an incremental version qualifier. My understanding after reading the p2 documentation is that the AddOnFeature should has a dependency with an Eclipse feature already installed with some versioning to match. This will let the P2 manager matches the AddOnFeature feature to be installed with it corresponding Eclipse "package/version" selected among the composite p2 repository.

To help the discussion let say the AddOnFeature install a new menu that display the Eclipse package/version with a message like: "Hello Eclipse Mars sr1" and that this message must be hardcoded (not to be discovered programmatically).

Now my question is what Eclipse feature dependency should I bind (or associate) to the AddOnFeature to have the p2 manager chose the appropriate p2 repository within the composite directory to have the appropriate AddOnFeature installed.

Thanks
GB
Re: How to bind a feature to a specific Eclipse package/version [message #1764214 is a reply to message #1764110] Fri, 26 May 2017 17:25 Go to previous messageGo to next message
Eclipse UserFriend
What you're describing is: how do I ask p2 to install something given what is currently installed.

I wonder if you could do that using p2's requirements and capabilities, where you provide requirements that specify a particular version of the platform (e.g., org.eclipse.platform).
Re: How to bind a feature to a specific Eclipse package/version [message #1764350 is a reply to message #1764214] Mon, 29 May 2017 00:15 Go to previous messageGo to next message
guy bonneau is currently offline guy bonneauFriend
Messages: 5
Registered: January 2015
Junior Member
Indeed and using a dependency between the platform version and the feature version work well. I tried.

P2 does the installation of the specific version of the plugin that matches what is currently installed.

However it is not quite what I would expect. P2 displays the latest version that is registered within the site.xml. Even if this version cannot be matched to actual Eclipse version which run. Then when you request P2 to install the feature P2 detects a mismatch between the latest version of the feature and the actual Eclipse version. P2 does some analysis and find the matched feature version that is dependent to the actual Eclipse version. A message is displayed saying the feature will be downgraded to another matched version.

Thus why P2 doesn't display the matched version of the feature to the current Eclipse version? For example if you install the CDT feature P2 doesn't seem to choose the latest version but go straight to the matched version. How can I do this?

Thanks
GB

[Updated on: Mon, 29 May 2017 00:21]

Report message to a moderator

Re: How to bind a feature to a specific Eclipse package/version [message #1764351 is a reply to message #1764214] Mon, 29 May 2017 00:15 Go to previous message
guy bonneau is currently offline guy bonneauFriend
Messages: 5
Registered: January 2015
Junior Member
No Message Body

[Updated on: Mon, 29 May 2017 00:19]

Report message to a moderator

Previous Topic:Eclipse Installer by oomph (Eclipse Indigo 3.7)
Next Topic:Plugin installation is really slow
Goto Forum:
  


Current Time: Thu Apr 25 17:25:49 GMT 2024

Powered by FUDForum. Page generated in 0.03391 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top