本文介绍了在 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:

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

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)

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

-configuration C:eclipseextensionsfooeclipseconfiguration
  path=C:/eclipse/extensions/foobar
C:eclipseextensionsareclipseconfigurationlinksfoo.link

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

07-29 19:55
查看更多