繁体   English   中英

使用来自 Nexus 中镜像 P2 存储库的 Tycho 构建 Eclipse 插件

[英]Building Eclipse plugin with Tycho from mirrored P2 Repository in Nexus

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

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

Because of the proxy problem I installed the P2 Nexus plugin and bridge to add the Eclipse P2 repository https://download.eclipse.org/releases/2019-06/201906191000/ in our Nexus to mirror it locally. 所以 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 Plugin Tycho demo 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?

有人可以给我一个提示问题可能出在哪里吗? 或者也许有人已经解决了这个问题。

非常感谢!

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM