How do I specify a plugin version dependency in plugin manifest? [message #297324] |
Wed, 11 January 2006 17:25  |
Eclipse User |
|
|
|
In my plugin directory I have versioned-plugin_1.0.0 and versioned-plugin_1.0.1. What I'd like is for consumer-plugin to have a dependency on versioned-plugin_1.0.0 and *always* load that version, not 1.0.1. I tried setting the "Version" property in the manifest editor which gave me
versioned_plugin;bundle-version="1.0.0"
in my plugin manifest but when I run the IDE product it is pulling the 1.0.1 version. Is it possible to pull the old version?
I'm running Eclipse 3.1.1. The motivation behind this is how we can have a "release" version of the code and also development versions on newer plugins. If we have to debug our app I'd like for the app to state what version of plugin it was built upon and pull that from the developer's machine and not the latest.
|
|
|
|
|
|
|
|
|
Re: How do I specify a plugin version dependency in plugin manifest? [message #297532 is a reply to message #297502] |
Mon, 16 January 2006 20:09  |
Eclipse User |
|
|
|
Brad Reynolds wrote:
> I think maybe I'm just struggling with the IDE then. If I enter "[1.0.0,1.0.0)" as the version I receive the following error in the manifest editor:
>
>
>>"Invalid value for bundle-version attribute for versioned_plugin (there is no available bundle compatible with this bundle-version range)."
>
>
> If I look in the About Eclipse SDK Plugins dialog it shows that both versions, 1.0.0 and 1.0.1, exist. When I attempt to run a new Elipse Application that is the IDE it always selects the 1.0.1 version on the plugins tab.
I'm relatively new to this group, OSGi, and Equinox, but I think your
problem is in your version range specification itself; Equinox doesn't
have a bug.
In "plain English" a version range is
<lower limit type> <lower version> ',' <higher version> <higher limit type>
A square bracket limit type means "closed interval" and a parenthesis
limit type means an open interval. Remember that a closed interval
includes the endpoint and that an open interval does not.
A useful example: In common usage a change in major version number
implies that there may be a change that is not backwards-compatible. So
if you want to depend on any version of a plugin that is compatible with
version 1, then you would use the range
"[1.0.0,2.0.0)"
which means "the largest version greater than or equal to version 1 but
less than (but not equal to) version 2".
In your example, your wrote a version range of
"[1.0.0,1.0.0)"
Which means "the largest version greater than or equal to version 1 but
less than (but not equal to) version 1. This is an empty range that can
never be satisfied.
What to use depends on what you want.
If you want *precisely* version 1, then use "[1.0.0,1.0.0]".
If you want the latest version, but at least version 1, then use "1.0.0"
since by default, a version used as a version range means "at least this
version, but less than infinity".
If you want the latest version, and any version will do, then simply
don't include a version in your dependency.
I hope this helps!
/djk
|
|
|
Powered by
FUDForum. Page generated in 0.04114 seconds