Maven 将jar打包到仓库里

使用cmd命令

mvn install:install-file -Dfile=jar原路径 -DgroupId=groupId -DartifactId=artifactId -Dversion=版本号 -Dpackaging=jar

如果打包到公司私服里,需要在pom文件中设置

<distributionManagement>
  <snapshotRepository>
    <id>Snapshots</id>
    <name>Internal Snapshots</name>
    <url>私服地址</url>
  </snapshotRepository>
</distributionManagement>

猜你喜欢

转载自blog.csdn.net/qq_36781718/article/details/80084401
今日推荐