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

问题描述 投票:0回答:1

经过无数次阅读并测试了不同的东西之后,我现在不得不问我一个特定的问题。

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

由于代理问题,我安装了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存储库中读取工件。二手我不确定Tycho是否会评估给定的存储库URL。是否可以检查Tycho是否真的使用了正确的URL?

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

非常感谢!

eclipse maven nexus tycho
1个回答
0
投票

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

Tycho-based modules do not build with 3.6.1 (works with 3.6.0)

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

© www.soinside.com 2019 - 2024. All rights reserved.