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

后端 未结 5 947
-上瘾入骨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:21

    Package & install are various phases in maven build lifecycle. package phase will execute all phases prior to that & it will stop with packaging the project as a jar. Similarly install phase will execute all prior phases & finally install the project locally for other dependent projects.

    For understanding maven build lifecycle please go through the following link https://ayolajayamaha.blogspot.in/2014/05/difference-between-mvn-clean-install.html

提交回复
热议问题