使用 Maven+Tycho 构建的 Eclipse 功能补丁
Eclipse feature patch with Maven+Tycho build
我目前正在开发 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 feature patch doesn't patch plugins 中所述。
但是,对于这些较新的版本,tycho 构建失败。
例如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
我说得对吗?
任何解决方案甚至解决方法?
谢谢!
好的,至少就我而言,升级到 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].
但至少它不会失败!
我目前正在开发 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 feature patch doesn't patch plugins 中所述。
但是,对于这些较新的版本,tycho 构建失败。
例如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 我说得对吗?
任何解决方案甚至解决方法? 谢谢!
好的,至少就我而言,升级到 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].
但至少它不会失败!