场合
mvn install
从命令行构建应用程序。问题
直到不久前,这个版本运行良好。所有依赖项都已解析并正确获取。
现在Tycho OSGi依赖项解析器开始向X版的Platform插件添加依赖项,而该插件的Kepler版本是版本Y.
例如:
生成的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]
问题
Tycho如何选择依赖版本?我读了here,我只需要将Kepler存储库添加到我的项目中,以便将Tycho与Kepler目标平台相匹配。
Tycho如何选择似乎不存储在Kepler存储库中的版本。 Tycho依赖解析器在哪里找到这些非Kepler版本?
答案 0 :(得分:2)
正如greg-449所指出的,Kepler Service Release 1最近被添加到Kepler p2存储库http://download.eclipse.org/releases/kepler/。因此,新版本的org.eclipse.emf.ecore.xmi等实际上是Kepler存储库的一部分。
Tycho无法下载新版本的工件这一事实似乎是您的Nexus p2存储库代理设置中的一个问题。工件org.eclipse.emf.ecore.xmi_2.9.1.v20130827-0309.jar在原始存储库中可用(逻辑上根据p2索引和physical)。根据我的经验,Nexus p2存储库代理无法与复合p2存储库(如Kepler)一起可靠地工作。
可以选择仅使用6月发布的Kepler版本:只需用http://download.eclipse.org/releases/kepler/201306260900/替换Kepler p2存储库URL。此p2存储库是构成完整Kepler存储库的子存储库之一。 (要查看Kepler存储库中的所有子存储库,请查看repository's compositeContent.jar。)