gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 07:04:50 25 4
gpt4 key购买 nike

我正在利用 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。唯一的区别是,出于某种原因,第谷正在寻找 .v20120514-1615 限定符。但是,P2 存储库具有 .201302191707 限定符。不知道为什么第谷正在寻找特定的限定符而不是解析到最新版本。

最佳答案

原始 P2 Repo 似乎已损坏。问题是,即使没有引用插件,Tycho 也会尝试对整个 P2 存储库建立索引。为了解决这个问题,所做的是 -

  1. 打开 .product 文件并导出产品
  2. 从导出的产品 Artifact 中复制“存储库”文件夹并将其放置在共享位置
  3. 在 Maven pom.xml 的标签中给出此存储库的位置,而不是外部存储库。所有 future 的 Tycho 版本都将使用此存储库

这样,存储库的大小就很小,并且所有构建问题都得到了解决。

关于java - Eclipse Tycho 无法解析正确的依赖关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16229129/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com