0

I have the following structure in my project:

Product "P" is based on Feature "FA" which is based on Plugin "PA" which depends on Libray-Plugin "PL". I can export the whole product and everything works fine.

Now I want to install different modules via my update site. For example: Modul "M" which is actually a feature called "FB" which is based on Plugin "PB" which depends on Library-Plugin "PL". I am able to install the module (feature) initially. At this point the Library-Plugin has a version of "1.0.0".

When I change the module (feature) and increment the version of FB, PB and PL to 1.0.1 and then try to install it, p2 shows me the following error:

Cannot complete the install because of a conflicting dependency.
 Software being installed: Modul Feature B - FB 1.0.1
 Software currently installed: Product P with Feature A - FA 1.0.0
 Only one of the following can be installed at once: 
  Library-Plugin - PL 1.0.0
  Library-Plugin - PL 1.0.1
Cannot satisfy dependency:
 From: Modul Feature B - FB 1.0.1
 To: Library-Plugin - PL 1.0.1
Cannot satisfy dependency:
 From: Product P with Feature A - FA 1.0.0
 To: Library-Plugin - PL 1.0.0

What am I doing wrong? What can I do to deploy upgrades of feature modules which depend on the same library plugins as other installed features or the product?

4

1 回答 1

0

问题是您在功能 FA 和 FB 中包含插件的依赖项(即库插件 PL)。这样一来,每个功能都将 PL 的版本限制为一个确切的版本,因此如果您尝试独立更新 FA 或 FB,p2 将需要安装多个版本的 PL。对于大多数捆绑包来说这是不可能的(因为大多数捆绑包都是单例的)。

相反,您的功能应该只包含您自己的包 PA 和 PB。这样,产品 P 的安装仍然会包含 PL(因为使用 p2 创建的产品安装始终包含所有依赖项),但是您将不再收到 PL 插件的“一次只能安装以下一项”错误. 这是因为 PA 和 PB 通常依赖于具有版本范围的 PL(甚至可能根本没有版本限制),因此只要您的更新站点上有可用的新版本,PL 就可以由 p2 更新。

于 2013-02-20T12:19:52.490 回答