使用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>