【问题标题】:Building Eclipse plugin with Tycho from mirrored P2 Repository in Nexus从 Nexus 中的镜像 P2 存储库中使用 Tycho 构建 Eclipse 插件
【发布时间】:2020-03-02 14:31:05
【问题描述】:

在无休止地阅读和测试不同的东西之后,我现在必须提出我的具体问题。

关于我的项目的一些信息: 我想用 Maven 构建一个 Eclipse 插件,以将其集成到我们的 CI/CD 流程中。 我们正在使用 Eclipse-2019-06。 我在一个单独的开发网络中,我只能通过代理访问互联网。 一个 Nexus 正在运行,它正在镜像所有需要的 Maven 存储库(Central 等)。

由于代理问题,我安装了 P2 Nexus 插件和网桥以在我们的 Nexus 中添加 Eclipse P2 存储库 https://download.eclipse.org/releases/2019-06/201906191000/ 以在本地镜像它。所以 Nexus 存储库现在从官方 P2 下载站点指向本地的http://nexus:8081/nexus/content/repositories/eclipse-repository 地址。

当时我尝试的第一件事是将更新站点http://nexus:8081/nexus/content/repositories/eclipse-repository 添加到正在运行的Eclipse 安装中以访问所有插件等。这很好用!

所以现在我正在尝试从https://github.com/eclipse/tycho-demo 构建官方的 Eclipse 插件 Tycho 演示 itp01。

问题来了:我将官方 pom.xml 中的存储库部分更改为

 <repositories>
   <repository>
     <id>eclipse-repo</id>
     <layout>p2</layout>
     <url>http://nexus:8081/nexus/content/repositories/eclipse-repository</url>
   </repository>
 </repositories>here

当我现在尝试构建 itp01 项目时,我遇到了常见的错误:

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: tycho.demo.itp01 1.0.0.qualifier
[ERROR]   Missing requirement: tycho.demo.itp01 1.0.0.qualifier requires 'osgi.bundle; org.eclipse.core.runtime 3.15.300' but it could not be found
[ERROR] 
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[ERROR] Cannot resolve dependencies of MavenProject: tycho.demo.itp01:tycho.demo.itp01:1.0.0-SNAPSHOT @ /home/frto100/git/org.eclipse.tycho-demo/itp01/tycho.demo.itp01/pom.xml: See log for details -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException

Tycho 似乎无法从 Nexus 的 P2 存储库中读取工件。 二手我不确定第谷是否甚至评估给定的存储库 URL。是否可以检查 Tycho 是否真的使用了正确的 URL?

有人能告诉我问题出在哪里吗?或者也许有人已经解决了这个问题。

非常感谢!

【问题讨论】:

    标签: eclipse maven nexus tycho


    【解决方案1】:

    如果您使用的是 Maven 3.6.1(嵌入在 Eclipse 2019-06 和 2019-09 中),您可能会遇到以下问题:

    使用不同于 3.6.1 的 Maven 版本应该可以解决问题。

    【讨论】:

    • 感谢您的回复。我真的用过 Maven 3.6.1。现在更新到 3.6.2,现在它说“P2 存储库的身份验证失败”。现在我必须检查这个问题。
    猜你喜欢
    • 2019-12-13
    • 1970-01-01
    • 2013-10-18
    • 2018-10-25
    • 2021-08-09
    • 2016-09-29
    • 2016-05-22
    • 2012-01-24
    • 1970-01-01
    相关资源
    最近更新 更多