Teshte Teshte - 1 year ago 97
Java Question

Where should my plugin dependencies be located?

So here is my struggle..I am working on my first Eclipse Plugin.. On my PC, I have 2 eclipse versions, one where I developed the plugin, and another where I want to install the plugin.

Now my plugin works just fine, as I can easily test it by running it as a Eclipse Application using the eclipse that the plugin was developed in. This is how my plugin looks:

enter image description here

As you can see, I have quite a lot of so called "Plug-in Dependencies".

I also tried various ways to export the plugin, the latest (and by some other answers best way) approach is using this tutorial :

Points :

  1. Exercise: Create a feature for your plug-in

  2. Exercise: Create an update site your plug-in

However, after successfully installing it (it appears as a plugin in the "Installation Details") in the second Eclipse, the functionality is not the one expected(the one that I get when I test the plugin in the Eclipse used to develop it).

I have a hunch that the problem is with that list of dependencies from the first pic.. Because what gets exported is like ~14 KB, while some of the jars from the dependency list have more than 150 KB..
I searched in the installation Eclipse folder for some of those jars but couldn't find them..

What am I doing wrong?..What suggestions do you have for including those dependencies in the plugin export..


After exporting my Plugin, it looks similar to the folder structure from the second answer from here :
How to install plugin for Eclipse from .zip
But I think that there is a problem because in the "features" and "plugins" folder, I only have the jar for my plugin, and none of the dependencies (in the answer for the other question, there were a lot of Microsoft jars in those folders)

The problem was that I wasn't setting the dependencies in the
that I was exporting. This can be done by going into the
tab while editing the
feature file, and adding there the dependencies that you plugin needs (which are listed under
Plugin Dependencies
in the ecliplse project)

Answer Source

Those appear to all be standard Eclipse plugins, they don't need to be part of your export.

The plugin install will find and use the already installed plugins.

You would get an error from the install if there were missing dependencies.

If you think that the target Eclipse is not going to have some of the plugins you need create a Feature and list the required plugins or better still the required Eclipse features that you require. Use the Feature export rather than plugin export to export this. When you install this the installer will find the necessary plugins/features from the correct install sites.

What you never do is include standard plugins in your export because this can lead to version mismatches.

For example, this is feature.xml extract:


      <import feature="org.eclipse.e4.rcp" version="1.4.1.v20160212-1350" match="greaterOrEqual"/>


says that the feature requires the Eclipse org.eclipse.e4.rcp feature. The feature includes the greg.music.e4.rcp plugin.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download