zoukankan      html  css  js  c++  java
  • 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源。

  • 相关阅读:
    几个概率题
    几个智力题。。
    [算法]各种二分查找
    深入 JavaScript 时间对象 Date
    Leaflet 调用百度瓦片地图服务
    JavaScript中进制和字符编码问题
    DOM事件流
    flex 弹性布局
    javascript 闭包内部机制
    HTML DOM setAttribute()、与createAttribute()
  • 原文地址:https://www.cnblogs.com/wzy5223/p/5383371.html
Copyright © 2011-2022 走看看