Eclipse p2 Director应用程序无法更新功能 [英] Eclipse p2 director application cannot update a feature
问题描述
我正在开发 Node.js脚本来安装Eclipse插件,方法是使用 Eclipse内置的p2 Director应用程序。而且p2-director在某些情况下无法更新功能。
I am developing Node.js script to install Eclipse plugins by using Eclipse built-in p2 director application. And p2-director fails to update features in some cases.
D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.ui\templates>node nodeclipse-install.js install -repository jar:file:/D:/Workspaces/Nodeclipse-DEV/nodeclipse-1/org.nodeclipse.site/target/org.nodeclipse.site-0.10.0-SNAPSHOT.zip!/ maven
Nodeclipse CLI Installer (Eclipse Plugin Manager epm)
starting eclipsec -nosplash -application org.eclipse.equinox.p2.director -repository jar:file:/D:/Workspaces/Nodeclipse-DEV/nodeclipse-1/org.nodeclipse.site/target/org.nodeclipse.site-0.10.0-SNAPSHOT.zip!/ -installIU org.nodeclipse.enide.maven.feature.feature.group -tag org.nodeclipse.enide.maven.feature.feature.group -vmargs -Declipse.p2.mirrors=false
Installing org.nodeclipse.enide.maven.feature.feature.group 0.10.0.201402180840.
Installation failed.
Cannot complete the install because of a conflicting dependency.
Software being installed: Enide Maven 0.10.0.201402180840 (org.nodeclipse.enide.maven.feature.feature.group 0.10.0.201402180840)
Software currently installed: Enide Maven 0.10.0.201402170319 (org.nodeclipse.enide.maven.feature.feature.group 0.10.0.201402170319)
Only one of the following can be installed at once:
Enide Maven 0.10.0.201402180840 (org.nodeclipse.enide.maven.feature.feature.jar 0.10.0.201402180840)
Enide Maven 0.10.0.201402170319 (org.nodeclipse.enide.maven.feature.feature.jar 0.10.0.201402170319)
Cannot satisfy dependency:
From: Enide Maven 0.10.0.201402170319 (org.nodeclipse.enide.maven.feature.feature.group 0.10.0.201402170319)
To: org.nodeclipse.enide.maven.feature.feature.jar [0.10.0.201402170319]
Cannot satisfy dependency:
From: Enide Maven 0.10.0.201402180840 (org.nodeclipse.enide.maven.feature.feature.group 0.10.0.201402180840)
To: org.nodeclipse.enide.maven.feature.feature.jar [0.10.0.201402180840]
Application failed, log file location: E:\Eclipse\Enide-Studio-2014-try2-win64\eclipse\configuration\1392717353881.log
eclipsec process exit code 13
我也尝试同时传递两个 .feature.jar
和 feature.group
。
I also tried passing both .feature.jar
and feature.group
.
eclipsec -nosplash -application org.eclipse.equinox.p2.director -repository jar:file:/D:/Workspaces/Nodeclipse-DEV/nodeclipse-1/org.nodeclipse.site/target/org.nodeclipse.site-0.10.0-SNAPSHOT.zip!/ -installIU org.nodeclipse.enide.maven.feature.feature.group -tag org.nodeclipse.enide.maven.feature.feature.group -vmargs -Declipse.p2.mirrors=false
这可能与 .maven
功能包括 .maven
和 .common
插件。 .common
插件也被其他功能使用。
但是,其他功能也存在这种情况,这些功能没有共享的依赖关系。 p2 Director帮助页面没有指定逻辑,也没有给出引用。
This maybe related to the fact that .maven
feature includes .maven
and .common
plugins. .common
plugin is also used by other features.
However this also happens with other features, that have no shared dependencies. p2 director help page does not specify the logic nor gives references.
推荐答案
在p2 Director级别上,没有更新操作。相反,您需要告诉控制器卸载和安装要更新的IU:
On the p2 director level, there is no 'update' operation. Instead, you need to tell the director to both 'uninstall' and 'install' the IU that you want to be updated:
eclipse -application org.eclipse.equinox.p2.director -uninstallIU org.nodeclipse.enide.maven.feature.feature.group -installIU org.nodeclipse.enide.maven.feature.feature.group -repository ...
这篇关于Eclipse p2 Director应用程序无法更新功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!