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 ...
随机推荐
- 虚拟机VMWare的操作
软件测试工程师需要搭建测试环境——虚拟机操作. VMWare Workstation虚拟机:模拟真实的环境进行各种试验和操作,启动之后,会占用一部分的系统资源. 官网安装:http://www.vmw ...
- Android模拟器Genymotion安装使用教程详解
一.注册\登录 打开Genymotion官网,https://www.genymotion.com/ ,首先点击右上角的Sign in进行登录操作.如何登录就不细讲了,下面讲一下如何注册(备注:注册按 ...
- .net core中关于System.Text.Json的使用
在.Net Framework的时候序列化经常使用Newtonsoft.Json插件来使用,而在.Net Core中自带了System.Text.Json,号称性能更好,今天抽空就来捣鼓一下. 使用起 ...
- Djang简单使用
用户访问内容 用户能够访问的所有的资源,都是程序猿提前暴露的,如果没有暴露,用户是不能进行访问的. diango重启的问题 当我们更改django中的代码的时候,django内部会检测到我们更 ...
- [转帖]hadoop学习笔记:hadoop文件系统浅析
hadoop学习笔记:hadoop文件系统浅析 https://www.cnblogs.com/sharpxiajun/archive/2013/06/15/3137765.html 1.什么是分布式 ...
- MATLAB 求一个点周围 voronoi 边的顶点的坐标
本代码在[MATLAB 2015b] 下编写运行成功,不保证所有版本适用. x=[0 -.5 1 1 -1]; y=[0 -1 -.5 1 1]; voronoi(x,y);axis([-2 2 -2 ...
- python爬取盘搜的有效链接
因为盘搜搜索出来的链接有很多已经失效了,影响找数据的效率,因此想到了用爬虫来过滤出有效的链接,顺便练练手~ 这是本次爬取的目标网址http://www.pansou.com,首先先搜索个python, ...
- 20191106-基于Python的对字母基数排序
基数排序 概念 基数排序的算法过程是先将待排元素补位,使其长度一致,然后按照序列中的元素的每个位数进行分桶的一种算法. 比如待排序列是数字,则将所有待比较数值(正整数)统一为同样的数位长度,数位较短的 ...
- golang 单元测试(一)
单元测试函数类型 Test(功能测试) 函数规则: 函数名: TestXxxx , 以Test为前缀.Xxxx以大写字母开头 参数类型: *testing.T func TestXxxx(t *tes ...
- SQL 注入攻击案例
一.检测注入点 二.判断是否存在 SQL 注入可能 三.数据库爆破 四.字段爆破 五.数据库表爆破 六.用户名.密码爆破 七.总结 一.检测注入点 首先,在 http://120.203.13.75: ...