Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How do I specify a plugin version dependency in plugin manifest?
How do I specify a plugin version dependency in plugin manifest? [message #297324] Wed, 11 January 2006 17:25 Go to next message
Eclipse UserFriend
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 #297454 is a reply to message #297324] Fri, 13 January 2006 16:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: john.eclipsefaq.org

It is up to the consumer to specify the range of version numbers that it
will accept. The OSGi resolver will choose the highest version that
satisfies all constraints. I.e., if the consumer specifies:

Require-Bundle: versioned_plugin;bundle-version="[1.0.0,1.0.0)"

Then the 1.0.0 version will be selected rather than 1.0.1.
--

Brad Reynolds wrote:
> 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 #297455 is a reply to message #297454] Fri, 13 January 2006 17:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

BUT you have to be careful. If the manifest says singleton:=true then
there can only be one active plugin of that name. It will choose the
highest version then and 1.0.0 will not be found.

singlton:=true is needed if you have any extension points and extend any
extension points in your plugin.

--
Thanks,
Rich Kulp
Re: How do I specify a plugin version dependency in plugin manifest? [message #297502 is a reply to message #297454] Mon, 16 January 2006 09:51 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: How do I specify a plugin version dependency in plugin manifest? [message #297503 is a reply to message #297455] Mon, 16 January 2006 09:52 Go to previous messageGo to next message
Eclipse UserFriend
Thanks a lot for that, it's good to know. I didn't exactly know why singleton:=true was needed before but it makes sense.
Re: How do I specify a plugin version dependency in plugin manifest? [message #297519 is a reply to message #297502] Mon, 16 January 2006 12:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: john.eclipsefaq.org

Can you enter a bug report against Eclipse > Equinox > Framework for
this case? I'm not absolutely sure what right answer is - they will be
able to tell you if this is expected. If it's a bug, they will be eager
to hear about it.
--

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.
Re: How do I specify a plugin version dependency in plugin manifest? [message #297521 is a reply to message #297519] Mon, 16 January 2006 12:44 Go to previous messageGo to next message
Eclipse UserFriend
Done.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=123995

Should I have originally posted this in the Equinox group? I didn't post it there initially because I didn't think I was technically using Equinox yet as I am on 3.1.1.

Thanks for the help.
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Platform log errors?
Next Topic:Could I run some script after Update Manager finishes updating
Goto Forum:
  


Current Time: Fri May 09 14:37:20 EDT 2025

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

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

Back to the top