从 Eclipse Tycho p2-repository-plugin 中排除目标平台

Excluding Target Platforms From Eclipse Tycho p2-repository-plugin

我有一个正在使用 eclipse tycho 构建的 rcp 产品,并且我的 pom.xml 部分中包含所有不同的目标平台类型,构建项目大约需要 20 分钟。我只想为 Mac 和 Linux64 构建一个目标平台,但是当我在我的 pom.xml 文件的配置部分中删除其他环境时,我收到以下错误...

publishing result: [Included element org.eclipse.core.filesystem.win32.x86_64 0.0.0 is missing. Cannot determine filter for requirement to this element.; Included element org.eclipse.core.net.win32.x86_64 0.0.0 is missing. Cannot determine filter for requirement to this element.; Included element org.eclipse.core.resources.win32.x86_64 0.0.0 is missing. Cannot determine filter for requirement to this element.; Included element org.eclipse.equinox.launcher.win32.win32.x86_64 0.0.0 is missing. Cannot determine filter for requirement to this element.; Included element org.eclipse.equinox.security.win32.x86_64 0.0.0 is missing. Cannot determine filter for requirement to this element.; Included element org.eclipse.swt.win32.win32.x86_64 0.0.0 is missing. Cannot determine filter for requirement to this element.; Included element org.eclipse.ui.win32 0.0.0 is missing. Cannot determined >

我收到错误消息,当我不想为 windows 构建时,它仍在尝试为 win32 SWT 找到该插件,因为我想第谷不会将它添加到它构建的目标平台?如果我从我的 .product 文件中删除目标平台特定的依赖项,我会在哪里添加它们以及我将如何在 tycho 中仅针对特定目标平台时让它工作。谢谢你的帮助! - 邓肯克雷布斯

我想通了。问题是我的 .product 文件中有平台特定的插件依赖性,例如 org.eclipse.swt,因此当尝试使用 Tycho 进行构建时,它正在寻找这些插件,但它们不存在,因为我没有包含这些插件的目标环境我的 pom.xml 中的平台 在删除任何以 win_32 之类的平台特定约定结尾的插件并仅保留 org.eclipse.swt 之类的通用插件作为依赖项之后,我能够毫无错误地构建并且仅针对我感兴趣的平台。希望这对一路走来的人有所帮助。