参考:https://blog.csdn.net/zhaojianting/article/details/80324533
经常使用操做区别
mvn clean package
依次执行了clean
、resources
、compile
、testResources
、testCompile
、test
、jar(打包)
等7个阶段。html
mvn clean install
依次执行了clean
、resources
、compile
、testResources
、testCompile
、test
、jar(打包)
、install
等8个阶段。markdown
mvn clean deploy
依次执行了clean
、resources
、compile
、testResources
、testCompile
、test
、jar(打包)
、install
、deploy
等9个阶段。maven
总结
package
命令完成了项目编译、单元测试、打包功能,但没有把打好的可执行jar包(war包或其它形式的包)布署到本地maven仓库和远程maven私服仓库post
install
命令完成了项目编译、单元测试、打包功能,同时把打好的可执行jar包(war包或其它形式的包)布署到本地maven仓库,但没有布署到远程maven私服仓库单元测试
deploy
命令完成了项目编译、单元测试、打包功能,同时把打好的可执行jar包(war包或其它形式的包)布署到本地maven仓库和远程maven私服仓库测试