1、设置远程库
<repositories>
<repository>
<id>yourID</id>
<name>yourName</name>
<url>https://repository-master.mulesoft.org/nexus/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
2、配置要发布的库
<distributionManagement>
<repository>
<id>corp1</id>
<url>scp://repo/maven2</url>
</repository>
<snapshotRepository>
<id>propSnap</id>
<url>sftp://propellers.net/maven</url>
</snapshotRepository>
</distributionManagement>
参考:https://blog.csdn.net/taiyangdao/article/details/52287856