1、mvn compile:编译src/main/目录下的java文件,会在你的项目路径下生成一个target目录,在该目录中有一个classes文件夹,里面是生成的字节码文件。
2、mvn test:编译测试文件,同时编译src/main目录下的文件。
3、mvn package:该命令包含了compile命令的功能进行编译,同时还会编译java文件并根据pom文件中的打包方式(jar、war或其他方式)打包文件。
4、mvn install:该命令包含了package命令的功能,同时还会把打好的可执行jar包(war包或其它形式的包)布署到本地maven仓库。
5、mvn deploy:该命令包含了install命令的功能,同时还会把打好的可执行jar包(war包或其它形式的包)布署到远程maven仓库(私服)。
6、mvn clean:删除项目路径下的target文件,但不会删除本地的maven仓库已经生成的jar文件(war文件或其它形式的文件)。