Nexus Repository Manager OSS 代理 p2 源


用maven管理構建Eclipse RCP項目時,可能會用到p2源: http://download.eclipse.org/releases/mars/

內網用戶肯定希望能通過nexus服務器代理,就像其它maven源一樣。

這個可以通過給nexus安裝p2插件實現 : “nexus-p2-repository-plugin”  和 “nexus-p2-bridge-plugin”

Nexus 專業版默認是有這兩個插件的,Nexus OSS版本需要手動下載。

------------------------------------------------------------------------------------------------------------------------------------------------------------

1. 下載插件

 訪問中央倉庫的搜索頁面 : https://search.maven.org/

    搜索 “nexus-p2”  ,可以看到搜索結果如下:

 

 分別點擊  “nexus-p2-repository-plugin”  和 “nexus-p2-bridge-plugin”  后面的 “all” ,然后下載最新的“bundle.zip”。以 “nexus-p2-repository-plugin” 為例:

此時會有兩個zip包 :  “nexus-p2-repository-plugin-2.12.1-01-bundle.zip” 和 “nexus-p2-bridge-plugin-2.12.1-01-bundle.zip” 

將這兩個包解壓到nexus的插件目錄 : ${nexus_installdir}/nexus/WEB-INF/plugin-repository

然后重啟nexus 服務:   service nexus restart             or            ./nexus restart

這樣p2的插件就安裝完成了。

 

2. 配置nexus代理Eclipse p2源

用管理員登陸nexus站點 ,添加新的代理倉庫(Proxy Repository):

 

修改以下內容:

Repository ID       : eclipse-p2-repo

Repository Name : eclipse-p2-repo

Provider                : P2

Remote Storage Location :  http://download.eclipse.org/releases/mars/

點擊 “save”按鈕完成P2代理倉庫的添加。

這個p2的代理倉庫會自動生成一個地址 ,例如:http://${IP}:8081/nexus/content/repositories/eclipse-p2-repo/

內網用戶可以通過這個地址訪問Eclipse p2源。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM