文檔官網:http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.htmlhtml
在pom.xml中添加以下插件設置:apache
<project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.19.1</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> </plugins> </build> [...] </project>