Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Cleanest way to allow plugin version ranges
Cleanest way to allow plugin version ranges [message #603125] Mon, 09 November 2009 21:54 Go to next message
michael.sacarny is currently offline michael.sacarnyFriend
Messages: 103
Registered: July 2009
Location: USA
Senior Member
We have a 3.5 product built headlessly with PDE and p2.gathering=true that includes our Feature. The Feature includes several of our plugins, with version set to "0.0.0".

The Product runs well, but I found that I could not update individual plugins via the Dropins folder. The updated plugins just seemed to be ignored. Making an update site of the plugins and then updating fails with error messages such as "Only one of the following can be installed at once" and "Can not satisfy dependency from <our Feature> to <updated plugins>.

My conclusion is that the Feature.xml file (and subsequent metadata) specify exactly the version of the plugins created at build time, rather than allowing a range.

What is the easiest, correct way to allow a range of plugin versions to be allowed in our Feature, so that the plugins in the Dropins folder would be accepted?

Thanks,
MSacarny
Re: Cleanest way to allow plugin version ranges [message #603149 is a reply to message #603125] Wed, 11 November 2009 16:03 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
There are two approaches, the first is to change the feature to require
the plug-in instead of include it. This gets you the old update style
ranges of equivalent[1.2.3, 1.3.0), compatible[1.2.3, 2.0.0), or
greaterOrEqual. However, PDE/Build currently only builds included
plug-ins, not required ones. So you would need to build the bundles
separately and then have them (and their metadata) available to the
product build.

The other and perhaps simpler option is for the feature to have a p2.inf
beside the feature.xml. The p2.inf can add requirements to the feature,
and they replace the generated requirements that came from included
plug-ins if the name and namespace are the same.

feature: include org.eclipse.foo 0.0.0
p2.inf:
requires.1.namespace = org.eclipse.equinox.p2.iu
requires.1.name = org.eclipse.foo
requires.1.range = [1.0.0, 2.0.0)


If you are changing the requirement ranges for include features,
remember that the name for a feature's IU has ".feature.group" appended
to it.

http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata

-Andrew

michael.sacarny@analog.com wrote:
> We have a 3.5 product built headlessly with PDE and p2.gathering=true
> that includes our Feature. The Feature includes several of our plugins,
> with version set to "0.0.0".
>
> The Product runs well, but I found that I could not update individual
> plugins via the Dropins folder. The updated plugins just seemed to be
> ignored. Making an update site of the plugins and then updating fails
> with error messages such as "Only one of the following can be installed
> at once" and "Can not satisfy dependency from <our Feature> to <updated
> plugins>.
>
> My conclusion is that the Feature.xml file (and subsequent metadata)
> specify exactly the version of the plugins created at build time, rather
> than allowing a range.
> What is the easiest, correct way to allow a range of plugin versions to
> be allowed in our Feature, so that the plugins in the Dropins folder
> would be accepted?
>
> Thanks,
> MSacarny
Previous Topic:Eclipse stopped treating plug-in project as a plug-in project - again!
Next Topic:Looking for guidelines in creating plug-in for unit tests
Goto Forum:
  


Current Time: Sun Sep 20 22:10:32 GMT 2020

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

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

Back to the top