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 ...
随机推荐
- 【C/C++开发】字符串操作
1)字符串操作 strcpy(p, p1) 复制字符串 strncpy(p, p1, n) 复制指定长度字符串 strcat(p, p1) 附加字符串 strncat(p, p1, n) 附加指 ...
- Linux下指定so共享库的加载路径
转载地址:https://blog.csdn.net/zorelemn/article/details/52596293,做了部分修改 一.库文件的搜索路径: 1.在配置文件/etc/ld.so.co ...
- [转帖]六种Socket I/O模型幽默讲解
六种Socket I/O模型幽默讲解 https://www.cnblogs.com/jikebiancheng/p/6225009.html 原贴已经找不到了.. 老陈有一个在外地工作的女儿,不能经 ...
- 基于DNN的推荐算法总结
1.早期的算法 深度学习在CTR预估应用的常见算法有Wide&Deep,DeepFM等. 这些方法一般的思路是:通过Embedding层,将高维离散特征转换为固定长度的连续特征,然后通过多个全 ...
- python爬虫-爬取你想要的小姐姐
一.准备 1. 原地址 2. 检查html发现,网页是有规则的分页, 最大图片的class为pic-large 二.代码 import requests import os from bs4 impo ...
- Python3遍历指定文件夹下所有文件及文件夹
采用os模块儿: import os def get_filelist(dir): for home, dirs, files in os.walk(dir): print("####### ...
- python检测挖矿特征的几种方式
电脑性能上: ①cpu和内存使用率(常见): python 实时得到cpu和内存的使用情况方法_python_脚本之家https://www.jb51.net/article/141835.htm ② ...
- Django model反向关联名称的方法(转)
原文:https://www.jb51.net/article/152825.htm
- HTTP无状态协议理解
TTP协议是无状态协议. 无状态是指协议对于事务处理没有记忆能力.缺少状态意味着如果后续处理需要前面的信息,则它必须重传,这样可能导致每次连接传送的数据量增大.另一方面,在服务器不需要先前信息时它的应 ...
- 在论坛中出现的比较难的sql问题:26(动态行专列+合并字符串、补足行数)
原文:在论坛中出现的比较难的sql问题:26(动态行专列+合并字符串.补足行数) 最近,在论坛中,遇到了不少比较难的sql问题,虽然自己都能解决,但发现过几天后,就记不起来了,也忘记解决的方法了. 所 ...