nexus私服搭建及信息配置

下载

登录nexus官网下载nexus安装包https://help.sonatype.com/repomanager2/download/download-archives---repository-manager-oss

  • 我一开始在官网上没有成功的将安装包下载下来,所以使用的nexus的war包

启动服务

  • 使用war包形式,将nexus的war包放在tomcat webapps目录下,启动tomcat即可。



访问nexus服务

第一次访问时,是匿名用户登录,只能看到部分权限,需要切换到admin用户,默认密码是admin123

setting.xml文件配置

  1. <servers>
  2. <!-- 设置私库认证信息(访问) -->
  3. <server>
  4. <id>insuresmart-nexus</id>
  5. <username>admin</username>
  6. <password>admin123</password>
  7. </server>
  8. <!-- 设置私库认证信息(发布) -->
  9. <server>
  10. <id>insuresmart-nexus-releases</id>
  11. <username>admin</username>
  12. <password>admin123</password>
  13. </server>
  14. <server>
  15. <id>insuresmart-nexus-snapshots</id>
  16. <username>admin</username>
  17. <password>admin123</password>
  18. </server>
  19. </servers>
  20. <!--设置私库mirror 表示maven所有的请求都由nexus来处理 -->
  21. <mirror>
  22. <id>insuresmart-nexus</id>
  23. <name>Yitong Nexus Repository</name>
  24. <mirrorOf>*</mirrorOf>
  25. <url>http://localhost:8080/nexus/content/groups/public/</url>
  26. </mirror>
  27. <!--设置maven私库信息 -->
  28. <profile>
  29. <id>insuresmart-nexus</id>
  30. <repositories>
  31. <repository>
  32. <id>insuresmart-nexus</id>
  33. <name>insuresmart nexus repository</name>
  34. <url>http://localhost:8080/nexus/content/groups/public/</url>
  35. <snapshots>
  36. <enabled>true</enabled>
  37. </snapshots>
  38. <releases>
  39. <enabled>true</enabled>
  40. </releases>
  41. </repository>
  42. </repositories>
  43. <pluginRepositories>
  44. <pluginRepository>
  45. <id>insuresmart-nexus</id>
  46. <name>insuresmart nexus repository</name>
  47. <url>http://localhost:8080/nexus/content/groups/public/</url>
  48. <snapshots>
  49. <enabled>true</enabled>
  50. </snapshots>
  51. <releases>
  52. <enabled>true</enabled>
  53. </releases>
  54. </pluginRepository>
  55. </pluginRepositories>
  56. </profile>
  57. <!--覆盖maven中央仓库设置开启releases和snapshots版本的下载-->
  58. <profile>
  59. <id>central</id>
  60. <repositories>
  61. <repository>
  62. <id>central</id>
  63. <url>http://central</url>
  64. <releases>
  65. <enabled>true</enabled>
  66. </releases>
  67. <snapshots>
  68. <enabled>true</enabled>
  69. </snapshots>
  70. </repository>
  71. </repositories>
  72. <pluginRepositories>
  73. <pluginRepository>
  74. <id>central</id>
  75. <url>http://central</url>
  76. <releases>
  77. <enabled>true</enabled>
  78. </releases>
  79. <snapshots>
  80. <enabled>true</enabled>
  81. </snapshots>
  82. </pluginRepository>
  83. </pluginRepositories>
  84. </profile>
  85. </profiles>
  86. <!--激活私库信息的配置 -->
  87. <activeProfiles>
  88. <activeProfile>insuresmart-nexus</activeProfile>
  89. <activeProfile>central</activeProfile>
  90. </activeProfiles>

pom.xml文件配置

  1. <!--当前项目发布到远程仓库中-->
  2. <distributionManagement>
  3. <repository>
  4. <id>insuresmart-nexus-releases</id>
  5. <name>insuresmart-nexus-releases</name>
  6. <url>http://localhost:8080/nexus/content/repositories/releases/</url>
  7. </repository>
  8. <snapshotRepository>
  9. <id>insuresmart-nexus-snapshots</id>
  10. <name>insuresmart-nexus-snapshots</name>
  11. <url>http://localhost:8080/nexus/content/repositories/snapshots/</url>
  12. </snapshotRepository>
  13. </distributionManagement>

标签id的值必须与setting文件中server标签中的值一致。

  1. <server>
  2. <id>insuresmart-nexus-releases</id>
  3. <username>admin</username>
  4. <password>admin123</password>
  5. </server>
  6. <server>
  7. <id>insuresmart-nexus-snapshots</id>
  8. <username>admin</username>
  9. <password>admin123</password>
  10. </server>

nexus私服搭建及信息配置的更多相关文章

  1. Window下Nexus私服搭建

    项目组大部分人员不能访问maven的central repository,因此在局域网里找一台有外网权限的机器,搭建nexus私服,然后开发人员连到这台私服上  环境是:nexus-2.1.1.mav ...

  2. ava Maven项目之Nexus私服搭建和版本管理应用

    目录: Nexus介绍 环境.软件准备 Nexus服务搭建 Java Maven项目版本管理应用 FAQ 1.Nexus介绍 Nexus是一个强大的Maven仓库管理器,它极大地简化了自己内部仓库的维 ...

  3. Java Maven项目之Nexus私服搭建和版本管理应用

    转载自:https://cloud.tencent.com/developer/article/1010603 1.Nexus介绍 Nexus是一个强大的Maven仓库管理器,它极大地简化了自己内部仓 ...

  4. Centos7.0下Nexus私服搭建

    1.下载nexus wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar. ...

  5. Maven使用教程二:nexus私服搭建及使用

    nexus安装 从nexus官网 下载最新的安装包 1.打开命令行,切换到nexus-3.2.1-01/bin目录下,回车.例:C:\Nexus\nexus-3.2.1-01\bin 2.输入:nex ...

  6. nexus私服搭建及maven生命周期

    一.maven找库流程 从流程上看创建nexus私服,能够优化流程,而且更加快速 二.nexus下载.安装 1.nexus下载地址 https://sonatype-download.global.s ...

  7. Nexus私服搭建

    maven私服的搭建 --> maven -->{ 1,本地仓库(从中央仓库下载保存到本地的或者自己到网上下载的jar文件包) 2,远程仓库 -->{ 1,中央仓库(maven官方j ...

  8. Nexus私服的安装与配置

    Nexus的安装与配置 仅以此文,献给陷入懒癌晚期的小伙伴们. 本文基于nexus 3.xx .0. What?Why?When?Who?Where? Sonatype Nexus是一款maven仓库 ...

  9. Nexus私服搭建使用及发布jar包到私服上供团队其他成员使用

    1.下载maven解压到指定目录,并配置环境变量 M2_HOME为maven解压目录 2.path中增加 %M2_HOME%\bin, 并确认 mvn -v 正确 3.下载nexus http://w ...

随机推荐

  1. 超详细的Tensorflow模型的保存和加载(理论与实战详解)

    1.Tensorflow的模型到底是什么样的? Tensorflow模型主要包含网络的设计(图)和训练好的各参数的值等.所以,Tensorflow模型有两个主要的文件: a) Meta graph: ...

  2. 龙六网络科技有限公司(Dragon six Network Technology Co., Ltd.)

    龙六网络科技有限公司(Dragon six Network Technology Co., Ltd.)

  3. TCP/IP学习笔记7--TCP/IP模型通信例子学习

    "一位如蝴蝶般美丽的女子向我飞来,翩翩的舞姿如同云端轻盈的叶儿." -------------------------------------------------------- ...

  4. 【面试题】如何删除 ArrayList 中奇数位置的元素?

    如何删除 ArrayList 中奇数位置的元素? 面试题携程 import java.util.ArrayList; import java.util.Iterator; import java.ut ...

  5. Python 编程入门

    我喜欢直接了当, 这次主要是推荐蟒营大妈的 Python 入门课(https://py.101.camp), 还有不到一周就要开课了, 欢迎转发推荐~ 点击"夏日大作战:从小白到小能手的 P ...

  6. ILSVRC比赛带来的算法

    李飞飞和它的团队搜集了ImageNet一个超过15 million的图像数据集,大约有22,000类.这个文件集合对深度卷积网络极大地推进深度学习各领域的发展. ILSVRC是对ImageNet进行分 ...

  7. Oracle 11g xe版本---总结1

    一.创建用户和授予权限 1.1 环境: Oracle 11g xe 第三方图形客户端: PLSQL Windows 10 必须登录 HR 用户,下面的查询会使用到 HR 中的表. 1.2 SQL 语句 ...

  8. dotnet Core学习之旅(一):安装SDK

    [重要:文中所有外链不能确保永久有效] >环境 .NET Core 包含两个部分 .NET Core Runtime 和 .NET Core SDK(包含Runtime) 点击此处到达下载页面( ...

  9. Vue $emit $event 传值(子to父)

    事件名 始终使用 kebab-case 的事件名. 通过事件向父组件发送信息 子组件中EnFontsize.vue中$emit <button @click="$emit('enlar ...

  10. 写一个RD一般需要多久?在迭代中新增的需求如何处理?如何做好项目管理?

    最近总是有些初入行的小伙们,经常会问我一些他们在工作工作的中疑问,我今天挑选出几个比较典型的问题和大家一起来讨论下. 问题如下: 写一个PRD一般需要多久? 在迭代中新增的需求如何处理? 如何做好项目 ...