Eclipse keeps finding wrong version of plugin dependency - eclipse

I'm trying to add a plugin dependency to org.eclipse.emf.ecore, because I'm using Ecore to do some modeling for my plugin. The only problem is that when I try to add it, the only version that matches is 2.4 and I can't find that 2.4 jar anywhere on my system, so I have no idea why Eclipse can only find this version and where Eclipse finds it.
In Eclipse's own plugins directory, I have version 2.9, so why can't it find this version? I want to use v 2.9, but no clue how can get Eclipse to match that version.
Any help is welcome, this has me perplexed!

Eclipse resolves dependencies against the currently set target platform. Make sure you have the right taget platform set, that includes org.eclipse.emf.ecore v. 2.9.
If you have not worked with the target platform before, take a look at this tutorial from Lars Vogel.

Related

Eclipse plugin version conflict

I'm suffering from the version conflict on Eclipse.
I want to use the following two plugins in one Eclipse instance.
org.abc.plugin1a
has a dependency on org.eclipse.plugin1b_1.0.0
(works well only with version 1.0.0, not work with the newer version!)
impossible to be maintained because of a certain reason
org.eclipse.plugin2a
has a dependency on org.eclipse.plugin1b_2.0.0 (or newer)
Actually org.abc.plugin1a was developed experimentally by an ex-employee, not by me. The source codes are available but too complicated.
I found there are huge differences between org.eclipse.plugin1b_1.0.0 and 2.0.0.
So it is almost impossible for me to update org.abc.plugin1a to work with org.eclipse.plugin1b_2.0.0
Is there any answer to solve my problem?
Specify both the minimum and maximum version of the plugin in the Require-Bundle:
Require-Bundle: org.eclipse.plugin1b_1.0.0;bundle-version="[1.0.0,1.0.0]"
This will not work if plugin org.eclipse.plugin1b is marked as a singleton since in that case Eclipse will only load one version of the plugin.

eclipse xtext plugin versions compatibility with eclipse IDE

I made a plugin in eclipse juno using xtext, I package my plugin using the following tutorial: http://www.vogella.com/articles/EclipsePlugIn/article.html#p2deployplugin ... sec 6.Create update site for your plug-in and I install it in the same version of eclipse IDE and the installation was successful. I need install it in others versions of eclipse's (Helios, Galileo, etc.) but when i try to install in Helios appear the following message:
Cannot complete the install because one or more required items could not be found.
Software being installed: MView Source 1.0.0.201308011127 (MView.feature.group 1.0.0.201308011127)
Missing requirement: MView Source 1.0.0.201308011127 (MView.feature.group 1.0.0.201308011127) requires 'org.eclipse.xtext 2.0.0' but it could not be found.
I searched for org.eclipse.xtext 2.0.0 jar to add to the dependencies but i dont found it.
I don't know if this will work but I wanted to ask if there are some way to make my plugin compatible with various versions of eclipse IDE and how. compatible with backward versions and forward versions. I would appreciate any information about it. Sorry for my English Thank you very much. =)
If an Eclipse installation does not contain Xtext, you need to provide Eclipse with the URL of the plugin repository (sometimes called update site) where it is located. That will enable Eclipse to discover and install your dependencies when installing your plugin. You can find the URLs that you need on Xtext website.
http://www.eclipse.org/Xtext/download.html
Try to see the version of XTEXT plugin in both of eclipse instalations:
Help > About Eclipse > Installation Details.
In Plugins tab, search for Xtext UI Core
Sorry my english.
A complete overview on:
All XText versions
The dependent XText core component versions
The corresponding Eclipse platform version
Links to the appropriate download / update sites
can be found here: XText versions, dependencies and Eclipse platform matrix
An pretty useful example for a target platform configuration is there as well!

hadoop eclipse plugin latest version

I can easily find eclipse plugins for hadoop 20.1, however for 1.2, I cannot find the plugins so easily. The best I have found is a page that tells me to git some source code and then build the plugin from that. Does anyone know where to download any hadoop plugin for all releases including, especially, 1.2?
You can find the src for eclipse plugin(hadoop-1.1.2) here. And this is the page that can take you to the desired version.
HTH

How can I solve NetBeans plugin dependencies (user and not developer question)?

Within the context of upgrading plugins explain how to resolve plugin dependencies when NetBeans user interface's reports specific missing dependencies, yet these do not resolve with a google search or are unmentioned in the netbeans FAQ.
The practical example leading me to ask this question was when I attempted to install an in-development-plugin org-netbeans-modules-htmlprojects.nbm. It requires General Queries API v1.24 and I have v1.19.1.
Have a look at the bug report that mentions the nbm, it's for version 7. This also means that the mentioned version for GQA is also version 7 specific.
You best choice is probably to upgrade to version 7, it has some nice improvements over version 6.9 like HTML5 support. As a new install picks up the configuration of an installed previous version upgrading shouldn't be a lot of work.
EDIT based on restated question:
The short form: you cannot, it's not meant to work that way.
The long form: due to what happened here and the inner workings of Netbeans the error message was less clear than it could have been...
you downloaded a module for a higher version than the installed one
Netbeans' nbm deployment descriptor states dependencies on editor modules, not on editor versions - see inside the nbm which is actually a ZIP file Info/info.xml, manifest element, OpenIDE-Module-Module-Dependencies attribute.
Normally that error would not happen, as the version of the nbm will normally match the editor version, and the dependencies should either be satisfied or satisfiable by on-the-fly installation of the missing dependencies.

Eclipse: How to ensure jar in plugin is given priority over other versions elsewhere?

I am developing an eclipse plugin which contains a specific version of Lucene. I need to generate a search index and deploy it so that it can be read by another application which uses the same version of Lucene.
I recently upgraded eclipse to 3.4 and the search index is now not readable by the 2nd application. I see that eclipse 3.4 contains a newer version of Lucene and I am assuming that this version is used when generating the index.
How can I determine exactly which version of Lucene is being used at the time the index is generated? My plugin classpath begins with my bundled version of Lucene so I would have expected that my version should get priority.
TIA
You might want to give ClassPath Checker and ClassPath Helper a try.
You may be able that way to ascertain precisely what jar are used in your development environment, in order to compare those with jars present in your deployment environment, where Luce generates the index.
ClasPath Checker jar conflicts:
Classpath Helper Blocked (Obscured) Classes view:
Seems to work now. For those of you who are interested, this is what I had to do:
Removed the Lucene 1.4.3 jar from my plugin
Copied the old Lucene plugin from an older version of eclipse into version 3.4.
Deleted all the dependencies in the plugin.xml wizard. Now all the Lucene plugins are visible.
Selected version 1.4.xx and changed the properties to set a max version up to 1.5
Added the other plugin dependencies
Changed build path: removed old jar, added plugin dependency Lucene 1.4.3
Recalculated Run configuration. The Lucene 1.4.3 plugin was not added automatically so added it by hand.
Now when the index is generated, version 1.4.3 is loaded.
Hope this is useful to someone.
Since you're developing an Eclipse plug-in you should look into OSGi. Eclipse plug-ins are instances of OSGi bundles and OSGi has a strong model for handling dependencies and versioning between bundles.
I don't know your specific code, but if was planning to use Lucene in my plug-in I'd use OSGi's 'Import-Package' or 'Require-Bundle' functionality to express the dependency; I would not include the Lucene JAR in my plug-in. If every plug-in included their own Lucene JAR, you'd waste space, but more importantly, end up with incompatible versions (like you have).
OSGI's website is not the best place to start your OSGi journey (it's good for the OSGi specifications and Peter Kriens' blog). Better to start with something like Neil Bartlett's online book.