Maven把自己的包部署到远程仓库

时间:2021-02-04 17:46:01

1,配置项目的POM文件

    <dependencyManagement>
</dependencies>
</dependency> ...... </dependency>
</dependencies>
</dependencyManagement>
<repository>
<id>nexus-snapshots</id>
<url>http://192.168.1.232:8080/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>nexus-releases</id>
<url>http://192.168.1.232:8080/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

2,运行maven命令

mvn clean deploy