“mvn clean install"是怎么回事?与“mvn install"不同?

“mvn clean install

问题描述:

mvn clean installmvn install 有什么区别?

clean 在 Maven 中是它自己的构建生命周期阶段(可以被认为是一个操作或任务).mvn clean install 告诉 Maven 在为每个模块运行 install 阶段之前在每个模块中执行 clean 阶段.

clean is its own build lifecycle phase (which can be thought of as an action or task) in Maven. mvn clean install tells Maven to do the clean phase in each module before running the install phase for each module.

这样做是为了清除您拥有的所有编译文件,确保您真正从头开始编译每个模块.

What this does is clear any compiled files you have, making sure that you're really compiling each module from scratch.