一:在命令中加上-Dmaven.test.skip=true
$ mvn install -Dmaven.test.skip=true
二:在pom.xml文件中配置maven-surefire-plugin插件
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>