一、下载 Nexusmaven
1.一、https://www.sonatype.com/download-oss-sonatypeide
1.2 https://help.sonatype.com/repomanager3/download测试
二、启动网站
2.1 解压下载的压缩包进入目录 E:\azz\soft\nexus-3.16.2-01-win64\nexus-3.16.2-01\binurl
2.2 启动 cmd 执行命令 nexus.exe /runidea
3 一些自定义配置,根据需求修改(使用默认配置则忽略)spa
3.1 启动地址端口配置code
3.2 数据存储路径、访问根目录、内存大小server
4 项目使用xml
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发布方式