Differences Between mvn install and mvn verify

Nicholas :

What are the differences between Maven's mvn install and mvn verify commands?

How does the keyword clean modify these commands?

vatbub :

mvn verify - as said before - performs any integration tests that maven finds in the project.

mvn install implicitly runs mvn verify and then copies the resulting artifact into your local maven repository which you usually can find under C:\Users\username\.m2\repository if you are using windows.

If you run maven multiple times without the clean command and without changing any source code, you may notice that it says Nothing to compile - all classes are up to date during the compile phase. If you add the clean command before any other command, maven will simply delete the entire target directory resulting in all classes being recompiled.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=427775&siteId=1