Environment of this article
- nexus-3.55.0-01, Nexus is installed on the local server http://localhost:8081/
- maven-3.9.2
release steps
- Configure the Nexus account/password in the Maven settings.xml of the project machine. Add a node
in the settings.xml node , and configure the Nexus login account and password. This is using the admin/123456 login.<servers>
<server>
<server>
<id>osxm-nexus</id>
<username>admin</username>
<password>123456</password>
</server>
The effect after configuration is as follows:
- Configure the address of the published private library in the pom.xml of the project
Configure the distributionManagement node in pom.xml as follows:
<distributionManagement>
<repository>
<id>osxm-nexus</id>
<name>Osxm Nexus Releases Repository</name>
<url>http://localhost:8081/repository/maven-snapshots/</url>
</repository>
</distributionManagement>
- Here is an example of publishing the project to the snapshot library maven-snapshot
configuration as follows:
mvn deploy
Execute and publish at the root path of the source code project
- After the release is successful, enter Nexus to see the released library.