在项目pom.xml文件中加入配置:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
或者在<project>
标签下的<properties>
标签中加入<skipTests>
true</skipTests>
<properties>
<java.version>1.8</java.version>
<skipTests>true</skipTests>
</properties>