How are “mvn clean package” and “mvn clean install” different?

后端 未结 5 971
-上瘾入骨i
-上瘾入骨i 2020-12-07 07:18

What exactly are the differences between mvn clean package and mvn clean install? When I run both of these commands, they both seem to do the same

5条回答
  •  甜味超标
    2020-12-07 07:46

    package will add packaged jar or war to your target folder, We can check it when, we empty the target folder (using mvn clean) and then run mvn package.
    install will do all the things that package does, additionally it will add packaged jar or war in local repository as well. We can confirm it by checking in your .m2 folder.

提交回复
热议问题