将 jar 部署到 Nexus 私服中
在你的工程的 pom文件中添加
<!--将jar部署到私服-->
<distributionManagement>
<snapshotRepository>
<!--要与私服id一致-->
<id>nexus-mine</id>
<name>Nexus Snapshot</name>
<!--部署到私服那个库-->
<url>http://localhost:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
引用别人部署到 Nexus中的jar
设置这个将从 Nexus 私服上进行优先下载
<repositories>
<repository>
<id>nexus-mine</id>
<name>nexus-mine</name>
<!--访问仓库-->
<url>http://localhost:8081/repository/maven-snapshots/</url>
<!--设置允许使用快照版本-->
<snapshots>
<enabled>true</enabled>
</snapshots>
<!--设置允许使用正式版本-->
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>