------ Maven 2 Surefire Plugin ------ Johnny R. Ruiz III ------ September 20, 2005 How to Use These example shows how to include and exclude unit test files in your testing: ----- ... ... org.apache.maven.plugins maven-surefire-plugin **/*.java **/*Point*.java ... ... ----- * Skipping Tests These example shows how to skip test when using m2: ----- ... ... org.apache.maven.plugins maven-surefire-plugin true ... ... ----- Alternatively, you can execute the following on the command line to skip tests: ----- m2 -Dmaven.test.skip=true install ----- * Using System Properties To add a System property, you can try this one. ----- ... ... org.apache.maven.plugins maven-surefire-plugin propertyName propertyValue ... ... ----- * Forking If you need to run your tests in a new JVM process you can use the <<>> option to start a new JVM process once for all your tests, or start a new JVM process for each of your tests. You can also set any arbitrary options like <<<-enableassertions>>> or any other JVM options. Here's an example of what this might look like: ----- ... ... org.apache.maven.plugins maven-surefire-plugin once|pertest -enableassertions ... ... ----- There are other parameters that you can configure like testFailureIgnore, reportsDirectory, test , etc. For full documentation, click {{{index.html}here}}.