zbb20190605 maven windows配置maven私服以及使用
1、下载 Nexus
1.1、https://www.sonatype.com/download-oss-sonatype

1.2 https://help.sonatype.com/repomanager3/download
2、启动
2.1 解压下载的压缩包进入目录 E:\azz\soft\nexus-3.16.2-01-win64\nexus-3.16.2-01\bin

2.2 启动 cmd 执行命令 nexus.exe /run

3 一些自定义配置,根据需求修改(使用默认配置则忽略)
3.1 启动地址端口配置

3.2 数据存储路径、访问根目录、内存大小

4 项目使用
4.1 maven 中配置本地私服帐号
<localRepository>E:/m3/repository</localRepository>
<servers>
<!--发布版-->
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<!--测试版-->
<server>
<id>snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>

4.2 配置POM项目中pom.xml文件,使项目发布到私服
project节点下配置如下,其中仓库对应的id要和上面server中配置的id一致,url就是nexus网站中Repositories下releases和snapshots


<distributionManagement>
<snapshotRepository>
<id>rdc-snapshots</id>
<name>Internal Snapshots</name>
<url>https://repo.rdc.aliyun.com/repository/29150-snapshot-xnpB4B/</url>
</snapshotRepository>
<repository>
<id>rdc-releases</id>
<name>Internal Release</name>
<url>https://repo.rdc.aliyun.com/repository/29150-release-Xy77jx/</url>
</repository>
</distributionManagement>

5 发布到私服
idea发布方式


浙公网安备 33010602011771号