用maven打包时跳过测试单元有两种写法
mvn clean install -Dmaven.test.skip=true;
或者
mvn install -DskipTests
那么maven.test.skip和skipTests的区别是什么呢?经过翻阅资料,解释如下:
The core difference :
- maven.test.skip is a feature of Maven itself, skip compile tests, skip run test, just ignore any test processes.
- skipTests is a feature of surefire plugin, compile the tests but skip running it.