1, download Nexus
1.1, https://www.sonatype.com/download-oss-sonatype
1.2 https://help.sonatype.com/repomanager3/download
2, start
2.1 Extract the downloaded archive into the directory E: \ azz \ soft \ nexus-3.16.2-01-win64 \ nexus-3.16.2-01 \ bin
2.2 Start cmd execute the command nexus.exe / run
3 Some custom configuration, according to the needs modification (using the default configuration is ignored)
3.1 Starting Address Port Configuration
3.2 Data storage path, access the root directory, the memory size
4 Use Project
4.1 maven configure a local account, PW
<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发布方式