安装具有依赖项的插件时是否自动安装了必需的插件?

时间:2012-07-12 02:00:56

标签: eclipse-plugin

我正在开发一个依赖CodePro和Sonar插件的插件。我在Plug-in Manifest Editor的“Required Plug-ins”部分添加了这些插件。 当我尝试在一个新的Eclipse实例上安装我的插件时,我得到错误:“缺少要求:XYZ插件需要捆绑'ABC',但无法找到它。” 是否要求用户在安装插件之前必须手动安装这些必需的插件? 或者有一种方法可以让Update Manager自动下载并安装这些必需的插件吗? 如果有办法,我该怎么做?我读过很多很多文章,博客和论坛,但对此没有明确的回应。 我很感激任何帮助。

2 个答案:

答案 0 :(得分:7)

p2将遵循插件依赖关系来安装所有必需的插件(或功能,具体取决于配置的内容)。如果您使用Help>Install New Software,则必须提供所有插件的更新站点,并且必须选中“在安装期间联系所有更新站点以查找所需的软件”。

使用命令行p2 director时,您必须列出该命令行上所需的所有更新站点。例如:

eclipse/eclipse \
-application org.eclipse.equinox.p2.director \
-noSplash \
-repository \
http://download.eclipse.org/egit/updates-nightly,\
http://download.eclipse.org/e4/updates/0.12-I-builds,\
http://download.eclipse.org/releases/juno,\
file://$HOME/eclipseUpdate \
-installIUs \
org.eclipse.egit.feature.group,\
org.eclipse.egit.source.feature.group,\
org.eclipse.jgit.feature.group,\
org.eclipse.jgit.source.feature.group,\
org.eclipse.egit.fetchfactory.feature.group,\
org.eclipse.emf.sdk.feature.group,\
org.eclipse.xtext.sdk.feature.group,\
org.eclipse.wst.xml_ui.feature.feature.group,\
org.eclipse.pde.api.tools.ee.feature.feature.group,\
org.eclipse.e4.core.tools.feature.feature.group,\
org.eclipse.e4.tools.css.spy.feature.feature.group,\
org.eclipse.e4.tools.css.editor.feature.feature.group

答案 1 :(得分:7)

打开Feature Manifest编辑器,转到Information选项卡,转到Sites to Visit子选项卡。添加插件所依赖的插件的所有更新站点。安装插件时,请选中“在安装期间联系所有更新站点以查找所需软件”选项。