Eclipse:使用P2目录安装Virgo工具插件

时间:2017-06-06 17:59:03

标签: eclipse-plugin eclipse-virgo

我正在尝试使用P2安装目录安装Virgo工具Eclipse插件,因为我想直接从命令行而不是从GUI安装。我收到以下错误,似乎有一些依赖问题。我尝试解决依赖关系,但我仍面临同样的问题。我也在网上搜索过,但无法找到解决问题的好方法。

Cannot complete the install because one or more required items could not be found.
 Software being installed: Eclipse Virgo Tools 1.5.0.R01-RELEASE (org.eclipse.virgo.ide.feature.feature.group 1.5.0.R01-RELEASE)
 Missing requirement: Eclipse Virgo IDE (Server Core) 1.5.0.R01-RELEASE (org.eclipse.virgo.ide.runtime.core 1.5.0.R01-RELEASE) requires 'bundle org.json 0.0.0' but it could not be found
 Cannot satisfy dependency:
  From: Eclipse Virgo Tools 1.5.0.R01-RELEASE (org.eclipse.virgo.ide.feature.feature.group 1.5.0.R01-RELEASE)
  To: org.eclipse.virgo.ide.runtime.core [1.5.0.R01-RELEASE]

请注意,插件安装适用于Eclipse GUI。我还从命令行安装了其他插件,但只有问题与Virgo工具插件有关。

1 个答案:

答案 0 :(得分:0)

Virgo Tools依赖于Virgo服务器和其他几个Eclipse项目。使用p2 director从命令行安装时,您必须指定要安装的逗号分隔的功能列表以及包含此类功能(和依赖项)的p2存储库列表。

以下是从Neon RCP运行时分发开始创建Eclipse + Virgo Tools并添加JDT,egit,Web Tools等的示例。

我是从我的工作脚本创建的,删除了我使用的一些非常具体的插件。你可能想看看它作为一个例子,我不保证它在修改后有效。

如果您不是从Neon RCP开始,而是从Neon for JavaEE开发人员开始,您可以删除大多数功能和存储库。

#!/bin/sh

./eclipse -nosplash -debug -consolelog -application org.eclipse.equinox.p2.director\
 -i \
org.eclipse.recommenders.rcp.feature.feature.group,\
org.eclipse.recommenders.mylyn.rcp.feature.feature.group,\
org.eclipse.egit.feature.group,\
org.eclipse.egit.gitflow.feature.feature.group,\
org.eclipse.egit.mylyn.feature.group,\
org.eclipse.mylyn.github.feature.feature.group,\
org.eclipse.jdt.feature.group,\
org.eclipse.jst.enterprise_ui.feature.feature.group,\
org.eclipse.jst.web_ui.feature.feature.group,\
org.eclipse.virgo.ide.feature.feature.group,\
org.eclipse.wst.web_ui.feature.feature.group,\
org.eclipse.wst.xml_ui.feature.feature.group,\
org.eclipse.wst.xsl.feature.feature.group,\
org.eclipse.emf.sdk.feature.group,\
org.eclipse.wst.jsdt.feature.feature.group,\
org.eclipse.m2e.feature.feature.group,\
org.eclipse.epp.mpc.feature.group,\
org.eclipse.mylyn.hudson.feature.group,\
org.eclipse.mylyn.ide_feature.feature.group,\
org.eclipse.mylyn.java_feature.feature.group,\
org.eclipse.mylyn.pde_feature.feature.group,\
org.eclipse.mylyn.team_feature.feature.group,\
org.eclipse.mylyn.gerrit.feature.feature.group,\
org.eclipse.mylyn.gerrit.dashboard.feature.feature.group,\
org.eclipse.mylyn_feature.feature.group,\
org.eclipse.mylyn.context_feature.feature.group,\
org.eclipse.mylyn.bugzilla_feature.feature.group,\
org.eclipse.mylyn.git.feature.group,\
org.eclipse.mylyn.wikitext_feature.feature.group,\
org.eclipse.tm.terminal.feature.feature.group,\
org.sonatype.tycho.m2e.feature.feature.group,\
org.sonatype.m2e.egit.feature.feature.group,\
org.jboss.tools.m2e.jdt.feature.feature.group,\
org.sonatype.m2e.sisu.feature.feature.group,\
 -r \
http://download.eclipse.org/releases/neon,\
http://download.eclipse.org/virgo/release/tooling,\
http://download.eclipse.org/recommenders/updates/stable/,\
http://download.eclipse.org/technology/m2e/releases/,\
http://download.eclipse.org/tools/orbit/downloads/drops/R20160520211859/repository/,\
http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-egit/0.14.0/N/LATEST/,\
http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-tycho/0.8.0/N/LATEST/,\
http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-sisu/0.15.0/N/LATEST/,\
http://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-jdt-compiler/1.0.1-2012-09-20_05-03-18-H2/,\
http://download.eclipse.org/eclipse/updates/4.2/

评论:

  • 以上是* unix shell脚本(在MacOs上运行正常)。
  • 每行末尾的\字符是必需的,因为这是一个继续多行的shell命令
  • -i是用于指定要安装的要素的逗号分隔列表的p2参数
  • -r是用于指定用于查找要素和依赖项的以逗号分隔的存储库列表的p2参数

免责声明:我是Eclipse Virgo提交者。