Home » Eclipse Projects » Eclipse Platform » How to define what version of a plugin my plugin depends on?
How to define what version of a plugin my plugin depends on? [message #245198] |
Tue, 25 May 2004 16:12  |
Eclipse User |
|
|
|
I see in the plugin.xml of all plugins in eclipse that they specify a
version="". What happens if my plugin is dropped in eclipse 3.0 but was
compiled against a 2.1 plugin? Other than the more than likely breakage, if
the EP my plugin provides an E for exists, but the interface the EP requires
has changed a bit, my E would break at runtime, most likely. However, is
there some way I can specify that I depend on 2.1 so that when deployed, it
wouldn't even work, thus preventing potential issues? I mean, if my plugin
provides a menu item, that when clicked uses a library from another plugin
that is now a different version... see what I mean? I looked in all the
plugins that come with 3.0 and I don't see any type of version="",
base-version="" or something like that for any of the EPs, E's, libraries,
etc.
I recall a while back someone said Eclipse can work with multiple versions
of the same plugin..is this true? I can load a 2.1 and 3.0 plugin into the
3.0 IDE/RCP and assuming the interfaces and such my plugin uses are still
there in 3.0, it should work? With the new OSGi core, I believe it is
possible to support multiple versions, so I am trying to figure out how this
is done so that I can apply it to my development of plugins.
Thank you.
|
|
|
Do plugin versions have any purpose, such as for updates? [message #245391 is a reply to message #245198] |
Wed, 26 May 2004 02:38   |
Eclipse User |
|
|
|
I am not quite sure I understand the use of a version tag in the plugin
manifest other than to give a version of the plugin itself. When I build a
plugin that extends a 3.0 plugin that comes with Eclipse, am I to assume
that it will ALWAYS work with 3.0 plugins, but if 3.1 comes out, my plugin
might break? What if my plugin extends another plugin that is then updated.
Does the version field within plugins serve any other purpose other than for
the version of the plugin itself, or is it used in updates somehow?
I ask because I do not see ANY version stuff within extension points,
extensions, requires, etc in any of the plugins within Eclipse. I thought
OSGi allow multiple versions of the same plugin to run, so how is this
handled, and if there are two versions of a plugin that my plugin adds an
extension to, how do I instruct my plugin to use one version over another?
Thanks
|
|
|
Re: Do plugin versions have any purpose, such as for updates? [message #245663 is a reply to message #245391] |
Wed, 26 May 2004 11:21   |
Eclipse User |
|
|
|
Anyone know about this? I have posted several different questions on version
stuff and nobody seems to asnwer. Is it not well defined, or does nobody
ever concern themselves with version related stuff?
"Kevin" <supreme_java_guru_1@yahoo.com> wrote in message
news:c91dhc$vsc$1@eclipse.org...
> I am not quite sure I understand the use of a version tag in the plugin
> manifest other than to give a version of the plugin itself. When I build a
> plugin that extends a 3.0 plugin that comes with Eclipse, am I to assume
> that it will ALWAYS work with 3.0 plugins, but if 3.1 comes out, my plugin
> might break? What if my plugin extends another plugin that is then
updated.
> Does the version field within plugins serve any other purpose other than
for
> the version of the plugin itself, or is it used in updates somehow?
>
> I ask because I do not see ANY version stuff within extension points,
> extensions, requires, etc in any of the plugins within Eclipse. I thought
> OSGi allow multiple versions of the same plugin to run, so how is this
> handled, and if there are two versions of a plugin that my plugin adds an
> extension to, how do I instruct my plugin to use one version over another?
>
> Thanks
>
>
|
|
|
Re: Do plugin versions have any purpose, such as for updates? [message #245750 is a reply to message #245391] |
Wed, 26 May 2004 13:13   |
Eclipse User |
|
|
|
Originally posted by: dorian.birsan.net
"Kevin" <supreme_java_guru_1@yahoo.com> wrote in message
news:c91dhc$vsc$1@eclipse.org...
> I am not quite sure I understand the use of a version tag in the plugin
> manifest other than to give a version of the plugin itself. When I build a
> plugin that extends a 3.0 plugin that comes with Eclipse, am I to assume
> that it will ALWAYS work with 3.0 plugins, but if 3.1 comes out, my plugin
> might break? What if my plugin extends another plugin that is then
updated.
> Does the version field within plugins serve any other purpose other than
for
> the version of the plugin itself, or is it used in updates somehow?
>
> I ask because I do not see ANY version stuff within extension points,
> extensions, requires, etc in any of the plugins within Eclipse. I thought
> OSGi allow multiple versions of the same plugin to run, so how is this
> handled, and if there are two versions of a plugin that my plugin adds an
> extension to, how do I instruct my plugin to use one version over another?
Use the "match" attribute. You can have exact match, greater-than, etc.
By default, the match is compatible.
Do a search in the online help for more details.
>
> Thanks
>
>
|
|
|
Re: Do plugin versions have any purpose, such as for updates? [message #245802 is a reply to message #245750] |
Wed, 26 May 2004 16:06   |
Eclipse User |
|
|
|
Thank you for the reply. What I am trying to get at is if there is a
specific plugin to plugin use for the version attribute, or if it is more of
a "this is version xxx of plugin y". In other words, if I release my product
1.0 with 10 plugins, and plugin A 1.0 uses plugin B 3.0, is there some where
I specify in plugin A that it MUST depend on plugin B 3.0? OR, does the
eclipse plugin engine work on the premise that ALL plugins deployed within
it "should" work together and the version attribute of each plugin is NOT
used to relate various plugin dependencies based on versions with one
another?
I see Eclipse 3.0 has mostly plugins with version="3.0.0" in it, but the ant
plugin says "1.6.1", which is the ant.jar version as well. Where doe sthe
ant.core and ant.ui plugins specify they need to use ant 1.6.1? OR is it
because the 3 ant plugins are released together with the 3.0 Eclipse
product, they work. Do I need to specify that my Extension must use plugin
A's EP with version 1.1?
Also, when updating plugins, say from 1.1 to 2.0, do other plugins that use
the 1.1 get notified that the plugin they were using/depended on (1.1) is
now 2.0 and they can either deactivate, unload, or is all this just a "by
chance" effort that at runtime MAY break other plugins and you don't really
know until you try running them?
Thanks.
"dorian birsan" <dorian@birsan.net> wrote in message
news:c92iom$sh5$1@eclipse.org...
>
> "Kevin" <supreme_java_guru_1@yahoo.com> wrote in message
> news:c91dhc$vsc$1@eclipse.org...
> > I am not quite sure I understand the use of a version tag in the plugin
> > manifest other than to give a version of the plugin itself. When I build
a
> > plugin that extends a 3.0 plugin that comes with Eclipse, am I to assume
> > that it will ALWAYS work with 3.0 plugins, but if 3.1 comes out, my
plugin
> > might break? What if my plugin extends another plugin that is then
> updated.
> > Does the version field within plugins serve any other purpose other than
> for
> > the version of the plugin itself, or is it used in updates somehow?
> >
> > I ask because I do not see ANY version stuff within extension points,
> > extensions, requires, etc in any of the plugins within Eclipse. I
thought
> > OSGi allow multiple versions of the same plugin to run, so how is this
> > handled, and if there are two versions of a plugin that my plugin adds
an
> > extension to, how do I instruct my plugin to use one version over
another?
>
> Use the "match" attribute. You can have exact match, greater-than, etc.
> By default, the match is compatible.
> Do a search in the online help for more details.
>
> >
> > Thanks
> >
> >
>
>
|
|
|
Re: Do plugin versions have any purpose, such as for updates? [message #246301 is a reply to message #245802] |
Thu, 27 May 2004 10:34  |
Eclipse User |
|
|
|
Originally posted by: dorian.birsan.net
"Kevin" <supreme_java_guru_1@yahoo.com> wrote in message
news:c92srk$a5g$1@eclipse.org...
> Thank you for the reply. What I am trying to get at is if there is a
> specific plugin to plugin use for the version attribute, or if it is more
of
> a "this is version xxx of plugin y". In other words, if I release my
product
> 1.0 with 10 plugins, and plugin A 1.0 uses plugin B 3.0, is there some
where
> I specify in plugin A that it MUST depend on plugin B 3.0? OR, does the
> eclipse plugin engine work on the premise that ALL plugins deployed within
> it "should" work together and the version attribute of each plugin is NOT
> used to relate various plugin dependencies based on versions with one
> another?
Each eclipse distribution is done with compatible plugins (if not specified,
match="compatible").
>
> I see Eclipse 3.0 has mostly plugins with version="3.0.0" in it, but the
ant
> plugin says "1.6.1", which is the ant.jar version as well. Where doe sthe
> ant.core and ant.ui plugins specify they need to use ant 1.6.1? OR is it
> because the 3 ant plugins are released together with the 3.0 Eclipse
> product, they work. Do I need to specify that my Extension must use plugin
> A's EP with version 1.1?
>
> Also, when updating plugins, say from 1.1 to 2.0, do other plugins that
use
> the 1.1 get notified that the plugin they were using/depended on (1.1) is
> now 2.0 and they can either deactivate, unload, or is all this just a "by
> chance" effort that at runtime MAY break other plugins and you don't
really
> know until you try running them?
Plugins are also grouped by features (see the eclipse/features directory),
so when you update a feature, old plugin versions are disabled, and the
newer versions installed. So, from an update manager perspective, plugin
versions are important.
If your installation has a proper feature setup, and you only use update
manager to install new features or to update existing ones, then the
requiements constraints are verified and features (thus, plugins) that break
the configuration will not be installed.
Now, these checks are done based on feature and plugin manifests, there is
no runtime verification. If your plugin listens for bundle lifecycle events,
you may be able to react and do something. I don't know the details of the
osgi notification for installing/uninstalling plugins, but the answer may be
hidden somewhere in the docs.
>
> Thanks.
>
>
> "dorian birsan" <dorian@birsan.net> wrote in message
> news:c92iom$sh5$1@eclipse.org...
> >
> > "Kevin" <supreme_java_guru_1@yahoo.com> wrote in message
> > news:c91dhc$vsc$1@eclipse.org...
> > > I am not quite sure I understand the use of a version tag in the
plugin
> > > manifest other than to give a version of the plugin itself. When I
build
> a
> > > plugin that extends a 3.0 plugin that comes with Eclipse, am I to
assume
> > > that it will ALWAYS work with 3.0 plugins, but if 3.1 comes out, my
> plugin
> > > might break? What if my plugin extends another plugin that is then
> > updated.
> > > Does the version field within plugins serve any other purpose other
than
> > for
> > > the version of the plugin itself, or is it used in updates somehow?
> > >
> > > I ask because I do not see ANY version stuff within extension points,
> > > extensions, requires, etc in any of the plugins within Eclipse. I
> thought
> > > OSGi allow multiple versions of the same plugin to run, so how is this
> > > handled, and if there are two versions of a plugin that my plugin adds
> an
> > > extension to, how do I instruct my plugin to use one version over
> another?
> >
> > Use the "match" attribute. You can have exact match, greater-than, etc.
> > By default, the match is compatible.
> > Do a search in the online help for more details.
> >
> > >
> > > Thanks
> > >
> > >
> >
> >
>
>
|
|
|
Goto Forum:
Current Time: Fri Jun 06 01:35:36 EDT 2025
Powered by FUDForum. Page generated in 0.05581 seconds
|