maven私服配置(sonatype nexus repository)添加私包及本地配置

一:下载地址

http://www.sonatype.org/nexus/go

根据自已的操作系统下载适合的版本(这里是oss 3.13.0-01)

二、安装nexus(略)

三、配值代理

               添加一个代理仓库

maven私服配置(sonatype nexus repository)添加私包及本地配置_第1张图片

 

我们创建maven代理maven2 proxy (hosted:本地jar包类,group为分组类)

maven私服配置(sonatype nexus repository)添加私包及本地配置_第2张图片

本地代理仓库的名字:test,远程代理库的地址:http://maven.aliyun.com/nexus/content/groups/public(这里写的阿里的)

maven私服配置(sonatype nexus repository)添加私包及本地配置_第3张图片

四、配值本地仓库(上传私有jar的地址)

               添加一个本地仓库(同上方法,选择的maven2 hosted)

maven私服配置(sonatype nexus repository)添加私包及本地配置_第4张图片

添加本地仓库名称

maven私服配置(sonatype nexus repository)添加私包及本地配置_第5张图片

五、仓库分给授权

maven私服配置(sonatype nexus repository)添加私包及本地配置_第6张图片

选中创建的本地及代理仓库从Available>>Members

URL处理的地址配值到maven项目里的pom.xml文件,同时把本地的seting.xml远程代理去除

maven私服配置(sonatype nexus repository)添加私包及本地配置_第7张图片

pom.xml配值

maven私服配置(sonatype nexus repository)添加私包及本地配置_第8张图片

你可能感兴趣的:(maven)