情况
- 我有一个使用 Tycho 使用 maven 构建的 Eclipse RCP 应用程序。
- 该应用程序是从命令行使用简单的
mvn install
. - 在构建期间,从 Nexus 代理存储库检索 p2 依赖项,镜像 Eclipse 的开普勒存储库。
问题
直到不久前,这个构建运行良好。所有依赖项都已正确解析和获取。
现在 Tycho OSGi 依赖解析器开始为版本 X 的平台插件添加依赖,而该插件的 Kepler 版本是版本 Y。
例如:
- 开普勒版本:org.eclipse.emf.ecore.xmi_2.9.0.v20130528-0742
- OSGi 依赖:org.eclipse.emf.ecore.xmi_2.9.1.v20130827-0309
生成的 Maven 输出为:
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: com.mycompany.products.myproduct:myproduct.gui.build:1.8.17-SNAPSHOT @ /home/myusername/programming/myproduct/gui/product-gui-1.8.x/gui/myproduct.gui.build/pom.xml
[INFO] Adding repository http://nexus.buildnet.mycompany.com/nexus/content/repositories/myproduct-releases/.meta/p2
[INFO] Adding repository http://nexus.buildnet.mycompany.com/nexus/content/repositories/myproduct-snapshots/.meta/p2
[INFO] Adding repository http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler
[INFO] Resolving dependencies of MavenProject: com.mycompany.products.myproduct:myproduct.gui.build:1.8.17-SNAPSHOT @ /home/myusername/programming/myproduct/gui/product-gui-1.8.x/gui/myproduct.gui.build/pom.xml
[INFO] Downloading org.eclipse.core.runtime
[INFO] Fetching org.eclipse.core.runtime_3.9.0.v20130326-1255.jar.pack.gz from http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler/plugins/ (0B of 31.5kB at 0B/s)
[INFO] Fetching org.eclipse.core.runtime_3.9.0.v20130326-1255.jar.pack.gz from http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler/plugins/ (4kB of 31.5kB at 0B/s)
[INFO] 1 operation remaining.
[INFO] Downloading org.eclipse.emf.ecore.xmi
[INFO] Downloading org.eclipse.ui.workbench
[INFO] Downloading org.eclipse.jface
...
<many are downloaded correctly>
...
[INFO] Downloading org.eclipse.rcp_root
[INFO] Downloading org.eclipse.swt.gtk.linux.x86
[ERROR] Internal error: java.lang.RuntimeException: "Messages while reading artifacts from child repositories": ["Problems while reading artifacts from http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler": ["Artifact not found: http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler/plugins/org.eclipse.emf.ecore.xmi_2.9.1.v20130827-0309.jar.", "Artifact not found: http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler/plugins/org.eclipse.ui.workbench_3.105.1.v20130821-1411.jar.", "Artifact not found: http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler/plugins/org.eclipse.jface_3.9.1.v20130725-1141.jar.", "Artifact not found: http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler/plugins/org.eclipse.core.resources_3.8.101.v20130717-0806.jar.",............]] -> [Help 1]
问题
第谷如何选择依赖版本?我在这里读到,我只需将 Kepler 存储库添加到我的项目中,即可将 Tycho 与 Kepler 目标平台相匹配。
第谷如何选择似乎没有存储在 Kepler 存储库中的版本。Tycho 依赖解析器在哪里找到这些非 Kepler 版本?