在 ECLIPSE_HOME/plugins 以外的目录中安装 Eclipse (3.4+) 插件 [英] Installing Eclipse (3.4+) plugins in a directory other than ECLIPSE_HOME/plugins

查看:39
本文介绍了在 ECLIPSE_HOME/plugins 以外的目录中安装 Eclipse (3.4+) 插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

曾经有一种方法可以做到这一点,但我在 Eclipse 3.4.1 安装中再也找不到这种方法了.有人知道怎么做吗?

解决方案

2014 年 5 月更新,Eclipse 4.x

正如 :

<小时>

为了更好地解决您的问题,您可能会发现以下文章很有趣:

p2:我如何在扩展位置安装插件(来自 Eclipse and Java Blog by MichaelScharf 博客)

<块引用>

以下过程说明如何使用p2 更新管理器和链接文件将插件安装到不同的扩展位置并在不同的 Eclipse 安装之间共享这些扩展位置.如需详细讨论,请参阅 bug 224145

(注意:p2是管理插件的新"方式,链接是在eclipse安装目录外引用插件的旧"方式)

<块引用>

我在 C:eclipseextensions 中保存了一组不同的扩展位置(每个扩展位置都在该目录的子目录中).
假设我想将 foo 安装到新的扩展位置 C:eclipseextensionsfoo.

  1. 我开始使用:

-configuration C:eclipseextensionsfooeclipseconfiguration

<块引用>

  1. 我使用更新管理器安装 foo.

  2. 现在我可以通过在 Eclipse 安装的链接目录中创建一个 foo.link 文件来使用扩展(您可能必须创建 [eclipse]links 目录) 包含:

 path=C:/eclipse/extensions/foobar

<块引用>

就是这样:-)

注意事项:

  • 您必须在链接文件中的窗口上使用正斜杠.
  • 此过程适用于 Eclipse 3.4 和 3.5.
  • 您不必创建由 -configuration 参数指定的任何目录.Eclipse 会为您做到这一点.
  • 对于-configuration"参数遵循模式EXTENSION_NAME/eclipse/configuration很重要,因为p2会将插件放在配置目录之上一个目录,并且<强>链接文件要求包含插件的目录称为 eclipse.
  • 使用这种结构,我可以通过使用 -configuration 运行 eclipse 将插件更新到扩展位置,然后进行更新.

高级使用:如果我想根据我的foo扩展安装bar,我在bar扩展位置链接目录下创建一个到foo的链接文件:

C:eclipseextensionsareclipseconfigurationlinksfoo.link

<块引用>

并遵循我上面描述的标准程序(可以在第一次运行 eclipse 之前填充链接目录)...

eclipse 3.4 的注意事项:如果您使用的是 eclipse 3.4 并且想要使用 eclipse 默认更新站点,则必须在没有-configuration"的情况下运行 eclipse 并导出它们(Help-> 软件更新-> 可用软件(选项卡)-> 管理站点-> 导出),因此您可以将它们导入-configuration" eclipse.

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?

解决方案

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)

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:eclipseextensions (each extension location is in a subdirectory of that directory).
Suppose I want to install foo into the new extension location C:eclipseextensionsfoo.

  1. I start eclipse with:

-configuration C:eclipseextensionsfooeclipseconfiguration

  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:eclipseextensionsareclipseconfigurationlinksfoo.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.

这篇关于在 ECLIPSE_HOME/plugins 以外的目录中安装 Eclipse (3.4+) 插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆