2

在创建示例时,我注意到非常奇怪的行为,因此我有些卡住了。我将在 2 个场景中解释问题

情景 1。

  • 创建两个插件。
  • 创建两个特征。
  • 创建一种产品并仅包含一项功能。
  • 创建一个类别并包含这两个功能。
  • 导出产品并使用生成的启动器对其进行测试。一切正常。

现在导出可部署功能并将生成的文件复制到网络服务器中。
打开安装新软件选项并使用 URL 安装第二个功能。
该功能已安装,甚至在每次构建时都会更新。

方案 2

  • 创建两个插件。
  • 创建两个特征。
  • 创建一个产品并包含两个功能。(这与第一种情况不同,第一种情况只包括一个功能。)
  • 创建一个类别并包含这两个功能。

导出产品并使用生成的启动器对其进行测试。一切正常。

现在导出可部署功能并将生成的文件复制到网络服务器中。
打开安装新软件选项并使用 URL 更新应用程序。
更新程序抱怨该功能已安装,将改为执行更新。
不幸的是,更新不起作用,该步骤显示错误为:

Your original request has been modified.
  "Mail Protection" is already installed, so an update will be performed instead.
  "Core" is already installed, so an update will be performed instead.
Cannot complete the install because of a conflicting dependency.
  Software being installed: Mail Protection 1.0.0.201103061657 (com.example.mail.protection.feature.group 1.0.0.201103061657)
  Software currently installed: RCP Product 1.0.0.201103061656 (com.example.mail.product 1.0.0.201103061656)
  Only one of the following can be installed at once: 
    Mail Protection 1.0.0.201103061656 (com.example.mail.protection.feature.jar 1.0.0.201103061656)
    Mail Protection 1.0.0.201103061657 (com.example.mail.protection.feature.jar 1.0.0.201103061657)
  Cannot satisfy dependency:
    From: RCP Product 1.0.0.201103061656 (com.example.mail.product 1.0.0.201103061656)
    To: com.example.mail.protection.feature.group [1.0.0.201103061656]
  Cannot satisfy dependency:
    From: Mail Protection 1.0.0.201103061656 (com.example.mail.protection.feature.group 1.0.0.201103061656)
    To: com.example.mail.protection.feature.jar [1.0.0.201103061656]
  Cannot satisfy dependency:
    From: Mail Protection 1.0.0.201103061657 (com.example.mail.protection.feature.group 1.0.0.201103061657)
    To: com.example.mail.protection.feature.jar [1.0.0.201103061657]

这似乎令人惊讶,因为当我在产品导出后安装该功能时更新有效。
但是,如果该功能已与产品捆绑在一起,则该功能的更新将不起作用。

你知道为什么吗?

4

2 回答 2

2

我有同样的问题,但我想通了。问题是与产品捆绑在一起的基本插件如果我们将它们导出为可部署的功能或通过更新站点构建它们,则无法更新它们。唯一的方法是重新导出您的产品(从产品配置中)并将所需的基本插件和功能从导出文件夹复制到 Web 服务器。现在再次检查更新,您将在列表中看到更新的基本功能和更新的产品版本。您不能只更新您的基本功能,您必须同时更新(功能和产品)。这是表演的终结者,现在它对我有用。

于 2012-02-27T06:42:22.933 回答
1

我在独立于我的产品更新我的功能时遇到了同样的问题。解决方案是您需要通过将其设置为“根级功能”来使您的功能具有可更新性</p>

 <features>
  <feature id="org.eclipse.e4.rcp"/>
  <feature id="org.eclipse.platform"/>
  <feature id="com.codeandme.tycho.plugin.feature" installMode="root"/>
  <feature id="com.codeandme.tycho.product.feature"/>
  <feature id="org.eclipse.help" installMode="root"/>
  <feature id="org.eclipse.emf.ecore"/>
  <feature id="org.eclipse.equinox.p2.core.feature"/>
  <feature id="org.eclipse.emf.common"/>
  <feature id="org.eclipse.equinox.p2.rcp.feature"/>
  <feature id="org.eclipse.equinox.p2.user.ui"/>
  <feature id="org.eclipse.rcp"/>
  <feature id="org.eclipse.equinox.p2.extras.feature"/>
 </features>

我从http://codeandme.blogspot.com/2014/06/tycho-11-install-root-level-features.htmlhttp://www.lorenzobettini.it/2015/03/build-找到了这个解决方案你自己的自定义日食/

于 2019-05-17T08:07:04.937 回答