今天一个依赖项目改了一些东西,但是mvn package依赖的项目后,还是找不到,后来找的了这两个命令的区别
Well, both will clean. That means they'll remove the target folder. The real question is what's the difference between package and install?
package
will compile your code and also package it. For example, if your pom says the project is a jar, it will create a jar for you when you package it and put it somewhere in the target directory (by default).
install
will compile and package, but it will also put the package in your local repository. This will make it so other projects can refer to it and grab it from your local repository.