<br><div><span class="gmail_quote">On 9/27/06, <b class="gmail_sendername">Koen Aers</b> <<a href="mailto:koen.aers@jboss.com">koen.aers@jboss.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>In fact this is not true. Eclipse features *are* a packaging mechanism.<br>A feature does not *need* anything by itself. Only the plugins in the<br>feature have dependencies on other plugins. See :<br><a href="http://dev.eclipse.org/viewcvs/index.cgi/*checkout*/platform-core-home/d">
http://dev.eclipse.org/viewcvs/index.cgi/*checkout*/platform-core-home/d</a><br>ocuments/plugin-versioning.html?rev=1.2 for a document stating this. The<br>fact that you will not find any Eclipse project that references plugins
<br>in the feature.xml is due to the fact that they are at the source and<br>perfectly capable of defining their own packaging units in which no<br>feature contains plugins that appear also somewhere else in other<br>features.
</blockquote><div><br>Yes, it is true that eclipse features are used for packaging, but the
feature itself also logically separates the idea of "your plugin" (or
"1st class plugin) from "external or dependency" plugin! There are many
problems with PDE build... one of the major ones being that the
distribution options are dismal at best, but not giving us clear separation is not one of those problems! All of that being said I think something has been lost in the debate. Dependencies that are declared in the feature.xml
should be features only. Technically it is possible to list plugin dependencies in the feature.xml (and there are features in Eclipse Platform that do it) , but I prefer that plugin dependencies are pulled from plugin.xml
, where they belong. Basically the only reason feature dependencies should be listed in feature.xml <import.../> is if you are trying to pull in more functionality than you necessarily need, or if you want the actual "feature" directory and "
feature.xml" that go along with that huge list of plugins in your distribution. JBossIDE Core does this because we want to re-distribute stuff that we don't necessarily "depend" on. Everything else should be in plugin dependencies.. ie.....
<br><br>feature.xml:<br><feature id="org.jbpm.gd.jpdl.feature"><br><plugin id="org.jbpm.gd.jpdl.ui" ../><br></feature><br><br>plugin.xml:<br><plugin id="org.jbpm.gd.jpdl.ui">
<br><requires><br><import plugin="org.eclipse.gef"/><br></requires><br></plugin><br><br>Instead of duplicating the "org.eclipse.gef" requirement as a <plugin/> in feature.xml
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">As a matter of fact after exploring the different Eclipse projects a bit<br>I have found evidence that what you say is not true. Have a look at the
<br>attached feature.xml files for the rcp feature and for the equinox<br>feature and see that they are exactly using the 'evil' way of doing<br>things. And I am sure that if I look a bit around I will be able to find<br>
plugin providers (that are not part of the Eclipse overall project) that<br>have also feature.xml files containing references to third party plugins<br>in the <plugin> tags.</blockquote><div><br><br>
IMO the two features that you have shown aren't adequate evidence...
both of these features are using what I consider to be "core" plugins
of the Eclipse SDK/RCP/platform. These plugins are mixed and matched
all over the place to create different configurations and feature sets
etc. To look at something more similar to our use case I think you need
to take a look at an WTP feature which has many "backward"
dependencies like we do. If we look at
features/org.eclipse.wst.xml.core/feature.xml I think we will see
something which is much more "common" place in 2nd/3rd tier features.<br>
<br>
I've attached the file for review (and if you look at pretty much any other WTP feature you will notice the same pattern).<br>
<br>
If you notice, only plugins that are actually 1st-tier are listed as
<plugin>. All dependencies are listed as "imports" via
feature-import (in this case Platform, RCP, EMF, XSD, etc). This, IMO
is the model we should be following since it is about as close as you
can get to our use case in a standard eclipse feature. </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> This thing we are doing here (with using <plugin> instead of
<br>> <import>) is actually in the same ballpark since it breaks<br>> updatemanagers and depedency checking.<br><br>Again, I have completely no evidence that this is happening. In fact,<br>the JIRA issue you mention is happening because the update manager is
<br>looking for particular versions of the plugins stated in the<br>feature.xml. But you don't have to state these versions in your<br>feature.xml explicitly. If you do not state them explicitly any version<br>that is available on the update site will satisfy the requirements.
</blockquote><div><br>Yes this specific bug is related to a "specific" version of a plugin listed in the plugin.xml. It should be noted that ever since 3.2, "0.0.0" for your plugin id is now updated at build time to be the "exact" version that was there at build time. It is no longer resolved at runtime meaning dependencies as <plugin/> should NEVER happen!
</div><br></div>There is *much* more granular control over dependency versioning in the <requires><import/> than in <plugin/>. Basically in the plugin tag you have 2 options:<br>1) A specific version (bad)
<br>2) 0.0.0 (change to specific version @ build time). (good -- but user still sees a specific version at the end of the day in their distribution which is *BAD BAD BAD* for dependencies)<br><br>In the import tag you have much more control:
<br>1) You don't have to specify a version at all, meaning it should work with *any* version of the plugin (there is no static version changing at build time here)<br>2) Specify a certain version, and use a "match" qualifier that can be "equivalent" "greater" "less", etc etc.... this gives us MUCH more control over what we work with and what we don't. This will allow users to upgrade to
i.e. 1.5.1 while we are still turning the gears on our next release.<br><br><br clear="all"><br>-- <br>Marshall Culpepper<br><a href="mailto:marshall.culpepper@jboss.com">marshall.culpepper@jboss.com</a><br>JBossIDE Team Lead
<br>JBoss, a division of Red Hat