1.搭建maven的私服
    http://www.sonatype.org/nexus/downloads/
    搭建私服是团队开发的基础,才能实现组内或者组间的依赖共享,要搭建私服使用工具nexus
    搭建私服启动登陆之后,发现仓库类型可以分为三大类:
        hosted:表示主机,也就是当前这台服务器可以直接访问和操作的仓库,但是其他机器可以通过配置用户的方式来访问和修改
            release:表示释放版,也就是如果你的jar包版本是release版本,将上传到该仓库中
            snapshot:保存对应的快照版本的jar包
            3th party:表示第三方的仓库
        group:表示一个群组,方便进行仓库的统一管理
    私服搭建好之后,需要在我们的开发环境中使用
        在eclipse层面进行使用

 <!-- 配置远程仓库,指的是我们下载依赖时,可以从该私服来进行下载 --><repositories><repository><id>nexus</id><name>TeamNexus Repository</name><url>http://localhost:8081/nexus/content/groups/public</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository></repositories>配置上传的远程仓库的URL<distributionManagement><!-- 释放版的url配置 --><repository><id>repository-release</id><url>http://localhost:8081/nexus/content/repositories/releases/</url></repository><!-- 快照版的url配置 --><snapshotRepository><id>repository-snapshot</id><url>http://localhost:8081/nexus/content/repositories/snapshots/</url></snapshotRepository></distributionManagement>配置认证账户,在maven的setting配置文件<server><id>repository-release</id><username>deployment</username><password>deployment123</password></server><server><id>repository-snapshot</id><username>deployment</username><password>deployment123</password></server>在maven层面进行使用,使用更为方便在setting配置文件中添加关于私服的配置<!-- 配置私服仓库 --><profile><id>my-nexus</id><repositories>  <repository>  <id>nexus</id>  <name>nexus</name>  <url>http://localhost:8081/nexus/content/groups/public/</url>  <releases>  <enabled>true</enabled>  </releases>  <snapshots>  <enabled>true</enabled>  </snapshots>  </repository>  </repositories><pluginRepositories>  <pluginRepository>  <id>nexus</id>  <name>nexus</name>  <url>http://localhost:8081/nexus/content/groups/public/</url>  <releases>  <enabled>true</enabled>  </releases>  <snapshots>  <enabled>true</enabled>  </snapshots>  </pluginRepository>  </pluginRepositories>   </profile>需要激活配置<activeProfiles><activeProfile>jdk-1.8</activeProfile><activeProfile>my-nexus</activeProfile></activeProfiles>如果需要上传jar包给私服<distributionManagement><!-- 释放版的url配置 --><repository><id>repository-release</id><url>http://localhost:8081/nexus/content/repositories/releases/</url></repository><!-- 快照版的url配置 --><snapshotRepository><id>repository-snapshot</id><url>http://localhost:8081/nexus/content/repositories/snapshots/</url></snapshotRepository></distributionManagement>

2.维护私服索引
    首先需要下载私服的索引文件:http://repo1.maven.org/maven2/.index/,下载nexus-maven-repository-index.gz和nexus-maven-repository-index.properties
    索引文件采用特殊的压缩方式,不能使用解压缩软件来解压,需要特别下载一个解压缩工具:indexer-cli-5.1.0.jar
    解压缩:java -jar indexer-cli-5.1.0.jar -u nexus-maven-repository-index.gz -d indexer
    解压完成之后,就需要配置索引文件
        (1)停止nexus服务器
        (2)覆盖索引文件,将私服的indexer下的中央仓库的索引全部删除,将解压出来的文件覆盖进去
        (3)重启nexus的服务器,索引更新完成

搭建maven的私服nexus相关推荐

  1. 使用Nexus搭建Maven仓库私服的权限配置心得

    最近在学习Maven,学习到使用Nexus搭建私服,通过Nexus的权限机制可以实现较细粒度的权限控制,这对组织内部的团队开发很有帮助.通过实验,我总结了以下一些经验,可以实现一些权限控制的需求,在此 ...

  2. maven学习- 私服nexus搭建

    一.到nexus官网下载最新版 1.1 下载地址:http://www.sonatype.org/downloads/nexus-latest-bundle.zip (目前最新版本是2.7.2-03) ...

  3. 快速使用nexus搭建maven本地私服

    本地私服可以: 上传jar包共享,还可以上传项目共享,可供局域网使用 本文使用maven版本: 3.3.9 度盘链接:https://pan.baidu.com/s/1DpyEoav9FcJs2v4H ...

  4. 使用nexus搭建maven私服(一)安装启动

    文章目录 maven私服搭建 nexus简介 nexus下载 nexus的安装&启动 小小修改一下配置文件并启动 安装并启动的两种方式 方式一: 解压cmd启动 方式二: 安装启动建议3.x使 ...

  5. maven 私服nexus的公共仓库汇总

    先汇总一下maven的私服nexus 的公共仓库,供以后备用 1 codehaus仓库 网址:https://nexus.codehaus.org/snapshots/ 2 jboss_public_ ...

  6. 解决从自建的私服nexus中下载不下来需要的jar包的问题

    在日常工作中,公司都会搭建自己的私服nexus,经常有时候明明在私服上有想要的jar包,确一直下载不下来,即使你maven中的settings和idea上的maven配置都是正确的还是下载不下来. 下 ...

  7. linux设置nexus开机自启动_在linux中使用nexus搭建maven私服

    首先介绍下为什么要搭建maven私服,简单点说就是就是把项目工程中的Jar包放在一个服务器上,每次Jar包的修改都能去私服上面Down到本地.可以对整个项目组的人形成一个统一的管理. 2.下载完之后就 ...

  8. 如何使用Nexus搭建Maven私服

    如何使用Nexus搭建Maven私服 转载于:https://www.cnblogs.com/valuestack/p/nexus-and-maven.html

  9. Maven学习总结(九)——使用Nexus搭建Maven私服

    2019独角兽企业重金招聘Python工程师标准>>> Maven学习总结(九)--使用Nexus搭建Maven私服 一.搭建nexus私服的目的 为什么要搭建nexus私服,原因很 ...

最新文章

  1. 在疫情防控一线,技术能发挥什么作用?
  2. linux下oracle导出12705,llinux下Oracle数据库的单个表导出导入
  3. 为什么现在是升级到Java 8的最佳时机
  4. linux 监控mysql脚本_Linux系统MySQL主从同步监控shell脚本
  5. loj2537 「PKUWC2018」Minimax 【概率 + 线段树合并】
  6. python数据处理随笔总结
  7. HP-UX下做磁盘镜像
  8. boa+php 嵌入式,boa 0.94.13 在嵌入式平台的安装与配置
  9. 在线JSON转sarcastic工具
  10. 南航的计算机专业好考吗,南航计算机拟录取名单公布,各个专业都有倒数第一逆袭成功...
  11. Python编程实现点到直线距离计算
  12. OverFeat论文解析
  13. mysql number 类型_mysql number类型
  14. 开源私有云盘python_搭建Windows版Seafile开源私有云盘
  15. leetcode 306 累加数(js)
  16. linux keynav 鼠标可以扔掉了键盘控制鼠标
  17. ch2_8_2求解幸运数问题
  18. 稿定科技内推|稿定让设计更简单,只要你来,稿定就能给你无限可能
  19. 找零钱问题——贪心算法
  20. 谁能告诉我微信APP营销到底怎么做?

热门文章

  1. Android之PopupWindow弹出对话框
  2. 海量数据中找top K专题
  3. 「模拟赛20180306」回忆树 memory LCA+KMP+AC自动机+树状数组
  4. 【u249】新斯诺克
  5. C# ITextSharp pdf 自动打印
  6. 算法nodehdu 2112 hdu today
  7. 标准 mysql 数据库 jdbc 的两种写法 懒汉式 和 饿汉式
  8. C语言中的undefined behavior系列(2)-- lifetime of object
  9. SSH 命令常见用法
  10. vmware虚拟机安装CentOS8提示错误:section %package does not end with %end(可用)