Eclipse Tycho无法解析正确的依赖关系

时间:2013-04-26 05:06:02

标签: java maven eclipse-plugin tycho

我正在利用Eclipse Tycho来构建具有GMF依赖关系的RCP应用程序。

我收到以下错误 -

[ERROR] Internal error: java.lang.RuntimeException: Could not download artifacts from any repository
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.emf.core,1.4.1.v20120514-1615
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.emf.commands.core,1.4.0.v20120514-1615
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.emf.ui.properties,1.5.0.v20120514-1615
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui,1.6.0.v20120514-1615
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui.properties,1.4.2.v20120514-1615
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui.providers,1.5.0.v20120514-1615
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui.providers.ide,1.2.0.v20120514-1615
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui.render,1.6.0.v20120514-1615
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui.resources.editor,1.4.1.v20120514-1615
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,1.2.1.v20120514-1615

我在Manifest.MF中指定了以下依赖项 -

org.eclipse.gmf.runtime.emf.core;bundle-version="1.4.1",
 org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.4.0",
 org.eclipse.gmf.runtime.emf.ui.properties;bundle-version="1.5.0",
 org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
 org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.4.2",
 org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.5.0",
 org.eclipse.gmf.runtime.diagram.ui.providers.ide;bundle-version="1.2.0",
 org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.6.0",
 org.eclipse.gmf.runtime.lite.svg;bundle-version="1.0.0",
 org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.4.1",
 org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide;bundle-version="1.2.1",

我已将GMF包的存储库位置提供为 -

<repository>
  <id>gmf-runtime</id>
  <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/releases</url>
  <layout>p2</layout>
</repository>

P2存储库具有上述所有JAR。唯一的区别是,出于某种原因,Tycho正在寻找 .v20120514-1615 限定符。但是,P2存储库具有 .201302191707 限定符。不确定为什么Tycho正在寻找特定的限定符,而不是解决最新版本。

1 个答案:

答案 0 :(得分:2)

原来的P2 Repo似乎已损坏。问题是Tycho试图索引整个P2 repo,即使没有引用插件。要解决这个问题 -

  1. 打开.product文件并导出产品
  2. 从导出的产品工件中复制“repository”文件夹并将其放在共享位置
  3. 在Maven pom.xml中的标记中,如果是外部存储库,则提供此存储库的位置。所有未来的Tycho构建都将使用此存储库
  4. 这样,repo大小很小,所有构建问题都得到了解决。

相关问题