step 1缓存
<!-- 项目发布管理:在依赖包所在项目的 pom 文件添加以下配置 -->
<distributionManagement>
<repository>
<id>releases</id> //发布时,设置的存放 release 版本 jar 包的仓库地址
<name>User Project Release</name>
<url>http://127.0.0.1:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>User Project SNAPSHOTS</name> //发布时,设置的存放 snapshot 版本 jar 包的仓库地址
<url>http://127.0.0.1:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
复制代码
step 2maven
<!-- jar包 身份信息配置 -->
<groupId>cc.mzone</groupId>
<artifactId>m1</artifactId>
//若是想发布到snapshot仓库中,则须要在版本号后加上-SNAPSHOT(注意这里必须是大写)
<version>0.1-SNAPSHOT</version>
<packaging>jar</packaging>
复制代码