RCP p2更新:一次只能安装以下其中一项

时间:2012-10-11 07:34:56

标签: java eclipse eclipse-rcp p2

我创建了一个启用p2的RCP应用程序。添加了ui,也可以添加更新。

但添加新软件(已安装),会发生这种情况:

Your original request has been modified.
  "Help" is already installed, so an update will be performed instead.
Cannot complete the install because of a conflicting dependency.
  Software being installed: Help 1.0.0.201210110844 (smartapps.smartsignature.features.help.feature.group 1.0.0.201210110844)
  Software currently installed: SmartSignature 1.0.0.201210110831 (smartapps.smartsignature.application.product 1.0.0.201210110831)
  Only one of the following can be installed at once: 
    Help 1.0.0.201210110844 (smartapps.smartsignature.features.help.feature.jar 1.0.0.201210110844)
    Help 1.0.0.201210110831 (smartapps.smartsignature.features.help.feature.jar 1.0.0.201210110831)
  Cannot satisfy dependency:
    From: SmartSignature 1.0.0.201210110831 (smartapps.smartsignature.application.product 1.0.0.201210110831)
    To: smartapps.smartsignature.features.help.feature.group [1.0.0.201210110831]
  Cannot satisfy dependency:
    From: Help 1.0.0.201210110831 (smartapps.smartsignature.features.help.feature.group 1.0.0.201210110831)
    To: smartapps.smartsignature.features.help.feature.jar [1.0.0.201210110831]
  Cannot satisfy dependency:
    From: Help 1.0.0.201210110844 (smartapps.smartsignature.features.help.feature.group 1.0.0.201210110844)
    To: smartapps.smartsignature.features.help.feature.jar [1.0.0.201210110844]

那就是p2的全部内容......我认为有一件事可能导致错误,但我不知道如何解决它。

存储库中的功能是否可能与基本RCP应用程序中安装的功能不同?在安装p2时检测到它是相同的功能,但仍然认为它是不同的,因为它有不同的来源?这有什么意义吗?

3 个答案:

答案 0 :(得分:1)

问题可能是您的匹配器值是完美/等效/兼容的。然后旧版本不接受您的更新,因为依赖项不兼容。

查看您的功能并检查是否有类似的内容:

<import plugin="smartapps.smartsignature.features.help.feature.group" version="1.0.0.201210110831" match="..."/>

匹配的可能值为:

 (perfect | equivalent | compatible | greaterOrEqual)

确保它是greaterOrEquals。这应该可以解决你的问题。

答案 1 :(得分:1)

“一次只能安装以下其中一项”意味着您尝试安装的工件不能在一个安装配置文件中共存。

这很可能是由“Bundle-SymbolicName”OSGi清单头的“singleton:= true”指令引起的,该指令不允许在一个环境中多次安装(或声明)Eclipse扩展点的bundle

答案 2 :(得分:0)

好吧我明白了......这只是一个依赖问题。

我的应用产品基于这些功能和版本。所以安装另一个版本失败了。

我刚刚添加了我的应用功能作为产品的依赖项,并包含了此应用功能中的所有(可更新)功能。包含它们时,您可以将功能设置为可选。

将此功能设置为可选仍包含在您的产品版本中,但它允许您一次只执行1个功能的独立更新!