PR: MNG-855

Submitted by: Johnny R. Ruiz III
Reviewed by:  Brett Porter
documentation for surefire plugin


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@291483 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-09-25 22:54:34 +00:00
parent 5cec6658fb
commit d56d2c09c2
3 changed files with 145 additions and 0 deletions

View File

@ -0,0 +1,88 @@
------
Maven 2 Surefire Plugin
------
Johnny R. Ruiz III
<jruiz@exist.com>
------
September 20, 2005
How to Use
These example shows how to include and exclude unit test files in your testing..
-------------------
<project>
...
<build>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include implementation="java.lang.String">**/*.java</include>
</includes>
<excludes>
<exclude implementation="java.lang.String">**/*Point*.java</exclude>
</excludes>
</configuration>
</plugin>
...
</build>
...
</project>
-------------------
These example shows how to skip test when using m2.
-------------------
<project>
...
<build>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
...
</build>
...
</project>
-------------------
Alternatively, you can use "m2 -Dmaven.test.skip=true install" to skip test.
To add a System property, you can try this one.
-------------------
<project>
...
<build>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<property>
<name>propertyName</name>
<value>propertyValue</value>
</property>
</systemProperties>
</configuration>
</plugin>
...
</build>
...
</project>
-------------------
There are other parameters that you can configure like testFailureIgnore, reportsDirectory, test , etc.
For full documentation, click {{{index.html}here}}.

View File

@ -0,0 +1,16 @@
------
Maven 2 Surefire Plugin
------
Johnny R. Ruiz III
<jruiz@exist.com>
------
September 19, 2005
Introduction
This plugin runs the junit tests in an isolated classloader. By default, this plugin will be executed in
"test" phase of m2 lifecycle.
This plugin generates 2 types of report, Text File Report and XML File Report. Both files will be generated in the
${basedir}/target/surefire-report. For an HTML version of the report, please see the Maven Surefire Report Plugin.

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project name="Maven Surefire Plugin">
<bannerLeft>
<name>Maven Surefire Plugin</name>
<src>http://maven.apache.org/images/apache-maven-project.png</src>
<href>http://maven.apache.org/</href>
</bannerLeft>
<bannerRight>
<src>http://maven.apache.org/images/maven-small.gif</src>
</bannerRight>
<body>
<links>
<item name="Maven 2" href="http://maven.apache.org/maven2/"/>
</links>
<menu name="Overview">
<item name="Introduction" href="introduction.html"/>
<item name="How to Use" href="howto.html"/>
</menu>
${reports}
</body>
</project>