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源。

  • 相关阅读:
    【Redis破障之路】四:Jedis基本使用
    【JVM进阶之路】十二:字节码指令
    Java学习之Spring MVC路由映射
    Java安全之FastJson JdbcRowSetImpl 链分析
    Allatori混淆动态调试分析
    Java工具开发手记
    Java安全之JBoss反序列化漏洞分析
    docker 应用篇————swarm[二十]
    docker 应用篇————docker-compose[十九]
    docker 应用篇————docker 自定义网络[十八]
  • 原文地址:https://www.cnblogs.com/wzy5223/p/5383371.html
Copyright © 2011-2022 走看看