簡體   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