Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Eclipse (3.4+) plugins in a directory other than ECLIPSE_HOME/plugins

Tags:

eclipse

ide

There used to be a way to do this, but I can no longer find this in Eclipse 3.4.1 installation I have. Does anyone know how to do this?

like image 768
Binil Thomas Avatar asked Feb 24 '09 16:02

Binil Thomas


People also ask

Where do Eclipse plugins get installed?

One way of finding out is to select Help > About Eclipse Platform >. From this dialog, click Plug-in Details to get a list of all installed plug-ins, along with vendor and version information.

Where is the Eclipse plugin directory in Windows?

You can find the installation folder in About Eclipse > Installation Details > Configurations.


2 Answers

Update May 2014, Eclipse 4.x

As oberlies kindly points out in the comments:

Dropins are deprecated! Don't use them!

Even though they are still documented (in Kepler 4.3 for instance), this thread adds:

One of the reasons that Eclipse does not recommend the dropins folder method of installation is that there is no feedback if something goes wrong. Any number of things could be getting in the way.

  • If you were using the install UI, you'd be informed of the problems before any changes are made.
  • With dropins, Eclipse tries to install and start as much as it can and you don't really know what's going on.

A Local deployment, as shown in this tutorial, would rather use File → Export → Plug-in Development → Deployable plug-ins and fragments.

But the final destination remains in ECLIPSE_HOME/plugins.


Original answer (2009, Eclipse 3.x)

You should add your plugins in ECLIPSE_HOME/dropins.

If you want to defined common plugins, use bundle pools (also introduced here)

http://2.bp.blogspot.com/_Xv6Yjx9z9no/SGftQroKv6I/AAAAAAAAAJc/JcPTai4GhiU/s400/p2+shared+verzeichnisse.png

You can also use an own extra dropins folder: simply add a parameter into eclipse.ini:

-Dorg.eclipse.equinox.p2.reconciler.dropins.directory= /your_path/e34shared_dropin

This extra dropins location can be used from more then one Eclipse installations - so you can use it as a shared dropins (watched directory).

For Bundle Pool, you have here a step by step procedure:


To better address your issue, you might find interesting the following article:

p2: how I install plugins in extension locations (from the Eclipse and Java Blog by Michael Scharf blog)

The following procedure explains how to install plugins into different extension locations and share those extension locations between different eclipse installations using the p2 update manager and link files. For a lengthly discussion see bug 224145

(Note: p2 is the "new" way to manage plugins, links is the "old" way to reference plugins outside the eclipse installation directory)

I keep a set of different extensions locations in C:\eclipse\extensions (each extension location is in a subdirectory of that directory).
Suppose I want to install foo into the new extension location C:\eclipse\extensions\foo.

  1. I start eclipse with:
-configuration C:\eclipse\extensions\foo\eclipse\configuration
  1. I install foo using the update manager.

  2. Now I can use the extension by creating a foo.link file inside the links directory of an eclipse installation (you might have to create the [eclipse]\links directory) containing:

  path=C:/eclipse/extensions/foobar

That's it :-)

Notes:

  • You have to the forward slashes on windows in the links file.
  • This procedure works for eclipse 3.4 and 3.5.
  • You don't have to create any directory specified by the -configuration parameter. Eclipse will do that for you.
  • It is important to follow the pattern EXTENSION_NAME/eclipse/configuration for the "-configuration" parameter because p2 will put the plugins one directory above the configuration directory and link files require that the directory that contains the plugins is called eclipse.
  • With this structure I can update plugins into the extension locations by running eclipse with the -configuration and then do the update.

Advanced use: If I want to install bar based on my foo extension, I create a link file to foo in the bar extension location links directory:

C:\eclipse\extensions\bar\eclipse\configuration\links\foo.link

and follow my standard procedure described above (the links directory can be populated before the first run of eclipse)...

Note for eclipse 3.4: If you are using eclipse 3.4 and you want to use the eclipse default update sites, you have to run eclipse without "-configuration" and export them (Help->Software Updates->Available Software (tab)->Manage Sites->Export), so you can import them into the "-configuration" eclipse.

like image 78
VonC Avatar answered Oct 18 '22 17:10

VonC


Not sure if this is what you are seeking, but if you manually obtain plugins (not via the loader, just as jars), you can use the dropins mechanism.

Go to ECLIPSE_HOME/dropins

Create a directory named "SomeNameForFunctionality" Create a subdirectory named "eclipse" underneath Create subdirectories named "features" and "plugins" underneath "Eclipse" Move the plugins and feature jars to the corresponding subdirectories.

Restart Eclipse and make sure it takes a few more seconds to load. Your plugin should still be there.

like image 42
Uri Avatar answered Oct 18 '22 16:10

Uri