http://maven.apache.org/surefire/maven-surefire-plugin/
Goals Overview
The Surefire Plugin has only one goal:
- surefire:test runs the unit tests of an application.
Examples
The following examples show how to use the Surefire Plugin in more advanced use cases:
- Using TestNG
- Using JUnit
- Using POJO Tests
- Skipping Tests
- Skip After Failure
- Inclusions and Exclusions of Tests
- Running a Single Test
- Re-run Failing Tests
- Class Loading and Forking
- Debugging Tests
- Using System Properties
- Configuring the Classpath
- Selecting Providers
- Fork Options and Parallel Test Execution
- Using Console Logs
- Shutdown of Forked JVM
举例说明:Skipping Tests
<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>