使用 Maven+Tycho 构建的 Eclipse 功能补丁

发布于 2025-01-10 01:51:00 字数 2317 浏览 0 评论 0原文

我目前正在开发一个 Eclipse RCP 应用程序,使用 Maven v3.8.4 和 Tycho v2.6.0 构建。 一切都按预期工作,除了修补原始 Eclipse 功能 org.eclipse.platform 的功能补丁之外。

这是功能 xml:

<feature
      id="com.eclipse.platform.patch"
      label="MAS Eclipse Platform Patch"
      version="0.0.1.qualifier"
      provider-name="MAS">

   <requires>
      <import feature="org.eclipse.platform" version="4.22.0.v20211124-1800" patch="true"/>
   </requires>

   <plugin
         id="org.eclipse.ui.navigator"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.ui.ide"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.ltk.ui.refactoring"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.ui.navigator.resources"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

</feature>

我必须将所包含插件的版本设置为比原始版本“更新”的版本,如 Eclipse 功能补丁不修补插件

但是,对于这些较新的版本,第谷构建失败。

例如,org.eclipse.ui.navigator原始版本是3.10.200.v20211009-1706< /代码>。我将其设置为 MANIFEST.MF 中的 3.10.201.qualifier 和 pom.xml 中的 3.10.201-SNAPSHOT

第谷抱怨找不到 3.10.200.v20211009-1706 依赖项:

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: mas.product 0.3.0.qualifier
[ERROR]   Missing requirement: org.eclipse.platform.feature.group 4.22.0.v20211124-1800 requires 'org.eclipse.equinox.p2.iu; org.eclipse.ui.navigator [3.10.200.v20211009-1706,3.10.200.v20211009-1706]' but it could not be found
[ERROR]   Cannot satisfy dependency: mas.product 0.3.0.qualifier depends on: org.eclipse.equinox.p2.iu; org.eclipse.platform.feature.group 0.0.0

我相信这一定与此错误相关 https://bugs.eclipse.org/bugs/show_bug.cgi?id=389698 我说得对吗?

有什么解决方案甚至解决方法吗? 谢谢你!

I'm currently developing an Eclipse RCP application, built with Maven v3.8.4 and Tycho v2.6.0.
Everything works as expected, except a feature patch that patches the original Eclipse feature org.eclipse.platform.

This is feature xml:

<feature
      id="com.eclipse.platform.patch"
      label="MAS Eclipse Platform Patch"
      version="0.0.1.qualifier"
      provider-name="MAS">

   <requires>
      <import feature="org.eclipse.platform" version="4.22.0.v20211124-1800" patch="true"/>
   </requires>

   <plugin
         id="org.eclipse.ui.navigator"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.ui.ide"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.ltk.ui.refactoring"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.ui.navigator.resources"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

</feature>

I have to set the version of the included plugins to something "newer" than the original, like described in Eclipse feature patch doesn't patch plugins.

BUT, with these newer versions, the tycho build fails.

For example the org.eclipse.ui.navigator original version is 3.10.200.v20211009-1706. I set it to 3.10.201.qualifier in the MANIFEST.MF and to 3.10.201-SNAPSHOT in the pom.xml.

And tycho complains about not find the 3.10.200.v20211009-1706 dependency:

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: mas.product 0.3.0.qualifier
[ERROR]   Missing requirement: org.eclipse.platform.feature.group 4.22.0.v20211124-1800 requires 'org.eclipse.equinox.p2.iu; org.eclipse.ui.navigator [3.10.200.v20211009-1706,3.10.200.v20211009-1706]' but it could not be found
[ERROR]   Cannot satisfy dependency: mas.product 0.3.0.qualifier depends on: org.eclipse.equinox.p2.iu; org.eclipse.platform.feature.group 0.0.0

I believe this must be something related to this bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=389698
am I right?

Any solutions or even workaround?
Thankyou!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夢归不見 2025-01-17 01:51:00

好的,至少就我而言,升级到 tycho v0.2.7 可以解决问题。现在构建会给出一些有关依赖项的警告:

[INFO] --- tycho-p2-repository-plugin:2.7.0:assemble-repository (default-assemble-repository) @ com.marchesini.mas.app.releng.product ---
[WARNING] Following dependencies were not found by the slicer (you can disregard this if it is intentional):
Unable to satisfy dependency from org.eclipse.platform.feature.group 4.22.0.v20211124-1800 to org.eclipse.equinox.p2.iu; org.eclipse.ltk.ui.refactoring [3.12.0.v20210618-1953,3.12.0.v20210618-1953].
Unable to satisfy dependency from org.eclipse.platform.feature.group 4.22.0.v20211124-1800 to org.eclipse.equinox.p2.iu; org.eclipse.ui.navigator [3.10.200.v20211009-1706,3.10.200.v20211009-1706].
Unable to satisfy dependency from org.eclipse.platform.feature.group 4.22.0.v20211124-1800 to org.eclipse.equinox.p2.iu; org.eclipse.ui.navigator.resources [3.8.300.v20210914-2004,3.8.300.v20210914-2004].
Unable to satisfy dependency from org.eclipse.platform.feature.group 4.22.0.v20211124-1800 to org.eclipse.equinox.p2.iu; org.eclipse.ui.ide [3.18.400.v20211026-0701,3.18.400.v20211026-0701].

但至少它不会失败!

OK, in my case at least, upgrading to tycho v0.2.7 fix the problem. Now the build gives some warnings about the dependencies:

[INFO] --- tycho-p2-repository-plugin:2.7.0:assemble-repository (default-assemble-repository) @ com.marchesini.mas.app.releng.product ---
[WARNING] Following dependencies were not found by the slicer (you can disregard this if it is intentional):
Unable to satisfy dependency from org.eclipse.platform.feature.group 4.22.0.v20211124-1800 to org.eclipse.equinox.p2.iu; org.eclipse.ltk.ui.refactoring [3.12.0.v20210618-1953,3.12.0.v20210618-1953].
Unable to satisfy dependency from org.eclipse.platform.feature.group 4.22.0.v20211124-1800 to org.eclipse.equinox.p2.iu; org.eclipse.ui.navigator [3.10.200.v20211009-1706,3.10.200.v20211009-1706].
Unable to satisfy dependency from org.eclipse.platform.feature.group 4.22.0.v20211124-1800 to org.eclipse.equinox.p2.iu; org.eclipse.ui.navigator.resources [3.8.300.v20210914-2004,3.8.300.v20210914-2004].
Unable to satisfy dependency from org.eclipse.platform.feature.group 4.22.0.v20211124-1800 to org.eclipse.equinox.p2.iu; org.eclipse.ui.ide [3.18.400.v20211026-0701,3.18.400.v20211026-0701].

but at least it doesn't fail!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文