nexus私服搭建及信息配置
nexus私服搭建及信息配置
下载
登录nexus官网下载nexus安装包https://help.sonatype.com/repomanager2/download/download-archives---repository-manager-oss
- 我一开始在官网上没有成功的将安装包下载下来,所以使用的nexus的war包
启动服务
使用war包形式,将nexus的war包放在tomcat webapps目录下,启动tomcat即可。
访问nexus服务
tomcat启动:http://localhost:8080/nexus/
XXX
第一次访问时,是匿名用户登录,只能看到部分权限,需要切换到admin用户,默认密码是admin123。
setting.xml文件配置
<servers>
<!-- 设置私库认证信息(访问) -->
<server>
<id>insuresmart-nexus</id>
<username>admin</username>
<password>admin123</password>
</server>
<!-- 设置私库认证信息(发布) -->
<server>
<id>insuresmart-nexus-releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>insuresmart-nexus-snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
<!--设置私库mirror 表示maven所有的请求都由nexus来处理 -->
<mirror>
<id>insuresmart-nexus</id>
<name>Yitong Nexus Repository</name>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8080/nexus/content/groups/public/</url>
</mirror>
<!--设置maven私库信息 -->
<profile>
<id>insuresmart-nexus</id>
<repositories>
<repository>
<id>insuresmart-nexus</id>
<name>insuresmart nexus repository</name>
<url>http://localhost:8080/nexus/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>insuresmart-nexus</id>
<name>insuresmart nexus repository</name>
<url>http://localhost:8080/nexus/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
<!--覆盖maven中央仓库设置开启releases和snapshots版本的下载-->
<profile>
<id>central</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<!--激活私库信息的配置 -->
<activeProfiles>
<activeProfile>insuresmart-nexus</activeProfile>
<activeProfile>central</activeProfile>
</activeProfiles>
pom.xml文件配置
<!--当前项目发布到远程仓库中-->
<distributionManagement>
<repository>
<id>insuresmart-nexus-releases</id>
<name>insuresmart-nexus-releases</name>
<url>http://localhost:8080/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>insuresmart-nexus-snapshots</id>
<name>insuresmart-nexus-snapshots</name>
<url>http://localhost:8080/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
标签id的值必须与setting文件中server标签中的值一致。
<server>
<id>insuresmart-nexus-releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>insuresmart-nexus-snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
nexus私服搭建及信息配置的更多相关文章
- Window下Nexus私服搭建
项目组大部分人员不能访问maven的central repository,因此在局域网里找一台有外网权限的机器,搭建nexus私服,然后开发人员连到这台私服上 环境是:nexus-2.1.1.mav ...
- ava Maven项目之Nexus私服搭建和版本管理应用
目录: Nexus介绍 环境.软件准备 Nexus服务搭建 Java Maven项目版本管理应用 FAQ 1.Nexus介绍 Nexus是一个强大的Maven仓库管理器,它极大地简化了自己内部仓库的维 ...
- Java Maven项目之Nexus私服搭建和版本管理应用
转载自:https://cloud.tencent.com/developer/article/1010603 1.Nexus介绍 Nexus是一个强大的Maven仓库管理器,它极大地简化了自己内部仓 ...
- Centos7.0下Nexus私服搭建
1.下载nexus wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar. ...
- Maven使用教程二:nexus私服搭建及使用
nexus安装 从nexus官网 下载最新的安装包 1.打开命令行,切换到nexus-3.2.1-01/bin目录下,回车.例:C:\Nexus\nexus-3.2.1-01\bin 2.输入:nex ...
- nexus私服搭建及maven生命周期
一.maven找库流程 从流程上看创建nexus私服,能够优化流程,而且更加快速 二.nexus下载.安装 1.nexus下载地址 https://sonatype-download.global.s ...
- Nexus私服搭建
maven私服的搭建 --> maven -->{ 1,本地仓库(从中央仓库下载保存到本地的或者自己到网上下载的jar文件包) 2,远程仓库 -->{ 1,中央仓库(maven官方j ...
- Nexus私服的安装与配置
Nexus的安装与配置 仅以此文,献给陷入懒癌晚期的小伙伴们. 本文基于nexus 3.xx .0. What?Why?When?Who?Where? Sonatype Nexus是一款maven仓库 ...
- Nexus私服搭建使用及发布jar包到私服上供团队其他成员使用
1.下载maven解压到指定目录,并配置环境变量 M2_HOME为maven解压目录 2.path中增加 %M2_HOME%\bin, 并确认 mvn -v 正确 3.下载nexus http://w ...
随机推荐
- 超详细的Tensorflow模型的保存和加载(理论与实战详解)
1.Tensorflow的模型到底是什么样的? Tensorflow模型主要包含网络的设计(图)和训练好的各参数的值等.所以,Tensorflow模型有两个主要的文件: a) Meta graph: ...
- 龙六网络科技有限公司(Dragon six Network Technology Co., Ltd.)
龙六网络科技有限公司(Dragon six Network Technology Co., Ltd.)
- TCP/IP学习笔记7--TCP/IP模型通信例子学习
"一位如蝴蝶般美丽的女子向我飞来,翩翩的舞姿如同云端轻盈的叶儿." -------------------------------------------------------- ...
- 【面试题】如何删除 ArrayList 中奇数位置的元素?
如何删除 ArrayList 中奇数位置的元素? 面试题携程 import java.util.ArrayList; import java.util.Iterator; import java.ut ...
- Python 编程入门
我喜欢直接了当, 这次主要是推荐蟒营大妈的 Python 入门课(https://py.101.camp), 还有不到一周就要开课了, 欢迎转发推荐~ 点击"夏日大作战:从小白到小能手的 P ...
- ILSVRC比赛带来的算法
李飞飞和它的团队搜集了ImageNet一个超过15 million的图像数据集,大约有22,000类.这个文件集合对深度卷积网络极大地推进深度学习各领域的发展. ILSVRC是对ImageNet进行分 ...
- Oracle 11g xe版本---总结1
一.创建用户和授予权限 1.1 环境: Oracle 11g xe 第三方图形客户端: PLSQL Windows 10 必须登录 HR 用户,下面的查询会使用到 HR 中的表. 1.2 SQL 语句 ...
- dotnet Core学习之旅(一):安装SDK
[重要:文中所有外链不能确保永久有效] >环境 .NET Core 包含两个部分 .NET Core Runtime 和 .NET Core SDK(包含Runtime) 点击此处到达下载页面( ...
- Vue $emit $event 传值(子to父)
事件名 始终使用 kebab-case 的事件名. 通过事件向父组件发送信息 子组件中EnFontsize.vue中$emit <button @click="$emit('enlar ...
- 写一个RD一般需要多久?在迭代中新增的需求如何处理?如何做好项目管理?
最近总是有些初入行的小伙们,经常会问我一些他们在工作工作的中疑问,我今天挑选出几个比较典型的问题和大家一起来讨论下. 问题如下: 写一个PRD一般需要多久? 在迭代中新增的需求如何处理? 如何做好项目 ...