Nexus Repository Manager OSS 代理 p2 源

用maven管理构建Eclipse RCP项目时,可能会用到p2源: http://download.eclipse.org/releases/mars/服务器

内网用户确定但愿能经过nexus服务器代理,就像其它maven源同样。eclipse

这个能够经过给nexus安装p2插件实现 : “nexus-p2-repository-plugin”  和 “nexus-p2-bridge-plugin”maven

Nexus 专业版默认是有这两个插件的,Nexus OSS版本须要手动下载。ide

------------------------------------------------------------------------------------------------------------------------------------------------------------spa

1. 下载插件.net

 访问中央仓库的搜索页面 : https://search.maven.org/插件

    搜索 “nexus-p2”  ,能够看到搜索结果以下:3d

 

 分别点击  “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” rest

将这两个包解压到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源。

相关文章
相关标签/搜索