Added:
maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/examples/system-properties.apt.vm
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/examples/system-properties.apt.vm?rev=897127&view=auto
==============================================================================
---
maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/examples/system-properties.apt.vm
(added)
+++
maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/examples/system-properties.apt.vm
Fri Jan 8 08:03:49 2010
@@ -0,0 +1,127 @@
+ ------
+ Using System Properties
+ ------
+ Allan Ramirez
+ ------
+ July 2006
+ ------
+
+Using System Properties
+
+ There are two ways to add a list of system properties to Failsafe:
+
+* systemProperyVariable
+
+ This configuration is the replacement of the deprecated <systemProperies>.
It can accept any value
+ from Maven's properties that can be converted <<to String value>>
+
++---+
+<project>
+ [...]
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${project.version}</version>
+ <configuration>
+ <systemPropertyVariables>
+ <propertyName>propertyValue</propertyName>
+ <buildDirectory>\${project.build.directory}</buildDirectory>
+ [...]
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ [...]
+</project>
++---+
+
+
+* systemProperties ( deprecated )
+
++---+
+<project>
+ [...]
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${project.version}</version>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>propertyName</name>
+ <value>propertyValue</value>
+ </property>
+ [...]
+ </systemProperties>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>integration-test</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>verify</id>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ [...]
+</project>
++---+
+
+ Take note that <<String valued>> properties can only be passed as system
+ properties. Any attempt to pass any other Maven variable type (i.e.
<<<List>>>
+ or a <<<URL>>> variable) will cause the variable expression to be passed
+ literally (unevaluated). So having an example below:
+
++---+
+<project>
+ [...]
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${project.version}</version>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>buildDir</name>
+ <value>\${project.build.outputDirectory}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>integration-test</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>verify</id>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ [...]
+</project>
++---+
+
+ will literally pass <<$\{project.build.outputDirectory\}>> because the value
+ of that expression is a <<<File>>>, not a <<<String>>>.
Propchange:
maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/examples/system-properties.apt.vm
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/examples/system-properties.apt.vm
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/examples/testng.apt.vm
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/examples/testng.apt.vm?rev=897127&view=auto
==============================================================================
---
maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/examples/testng.apt.vm
(added)
+++
maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/examples/testng.apt.vm
Fri Jan 8 08:03:49 2010
@@ -0,0 +1,177 @@
+ ------
+ Using TestNG
+ ------
+ Brett Porter <[email protected]>
+ ------
+ 2 May 2006
+ ------
+
+Using TestNG
+
+* Configuring TestNG
+
+ To get started with TestNG, include the following dependency in your project:
+
++---+
+[...]
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.8</version>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ </dependency>
+[...]
++---+
+
+ <<Note:>> if you are using JDK 1.4 Javadoc annotations for your TestNG
tests, replace jdk15 with jdk14 above.
+
+ This is the only step that is required to get started - you can now create
tests in your test source directory
+ (eg, <<<src/test/java>>>, and as long as they are named using the defaults
such as *IT.java they will be run
+ by Failsafe as TestNG tests.
+
+ If you'd like to use a different naming scheme, you can change the
<<<includes>>> parameter, as discussed in the
+ {{{inclusion-exclusion.html}Inclusions and Exclusions of Tests}} example.
+
+* Using Suite XML Files
+
+ Another alternative is to use TestNG suite XML files. This allows flexible
configuration of the tests to be run.
+ These files are created as normal, and then added to the Failsafe Plugin
configuration:
+
++---+
+[...]
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${project.version}</version>
+ <configuration>
+ <suiteXmlFiles>
+ <suiteXmlFile>testng.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>integration-test</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>verify</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+[...]
++---+
+
+ This configuration will override the includes and excludes patterns and run
all tests in the suite files.
+
+* Specifying Test Parameters
+
+ Your TestNG test can accept parameters with the @Parameters annotation. You
can also pass parameters from Maven
+ into your TestNG test, by specifying them as system properties, like this:
+
++---+
+[...]
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${project.version}</version>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>browser</name>
+ <value>firefox</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+[...]
++---+
+
+ For more information about setting system properties in Failsafe tests, see
{{{system-properties.html}System Properties}}.
+
+* Using Groups
+
+ TestNG allows you to group your tests. You can then execute a specific group
or groups. To do this with Failsafe,
+ use the <<<groups>>> parameter, for example:
+
++---+
+[...]
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${project.version}</version>
+ <configuration>
+ <groups>functest,perftest</groups>
+ </configuration>
+ </plugin>
+[...]
++---+
+
+ Likewise, the <<<excludedGroups>>> parameter can be used to run all but a
certain set of groups.
+
+* Running tests in parallel
+
+ TestNG allows you to run your tests in parallel, including JUnit tests. To
do this, you must set the
+ <<<parallel>>> parameter, and may change the <<<threadCount>>> parameter if
the default of 5 is not sufficient.
+ For example:
+
++---+
+[...]
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${project.version}</version>
+ <configuration>
+ <parallel>methods</parallel>
+ <threadCount>10</threadCount>
+ </configuration>
+ </plugin>
+[...]
++---+
+
+ This is particularly useful for slow tests that can have high concurrency,
or to quickly and roughly assess the independance
+ and thread safety of your tests and code.
+
+* Using custom listeners and reporters
+
+ TestNG provides support for attaching custom listeners, reporters,
annotation transformers and method interceptors to your tests.
+ By default, TestNG attaches a few basic listeners to generate HTML and XML
reports.
+
+ You can configure multiple custom listeners like this:
+
++---+
+[...]
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${project.version}</version>
+ <configuration>
+ <properties>
+ <property>
+ <name>usedefaultlisteners</name>
+ <value>false</value> <!-- disabling default listeners is optional -->
+ </property>
+ <property>
+ <name>listener</name>
+
<value>com.mycompany.MyResultListener,com.mycompany.MyAnnotationTransformer,com.mycompany.MyMethodInterceptor</value>
+ </property>
+ <property>
+ <name>reporter</name>
+ <value>listenReport.Reporter</value>
+ </property>
+ </properties>
+ </configuration>
+ </plugin>
+[...]
++---+
+
+ For more information on TestNG, see the {{{http://www.testng.org}TestNG web
site}}.
+
+
Propchange:
maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/examples/testng.apt.vm
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/examples/testng.apt.vm
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/index.apt
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/index.apt?rev=897127&view=auto
==============================================================================
--- maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/index.apt (added)
+++ maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/index.apt Fri Jan
8 08:03:49 2010
@@ -0,0 +1,91 @@
+ ------
+ Introduction
+ ------
+ Stephen Connolly
+ Allan Ramirez
+ ------
+ May 2009
+ ------
+
+Maven Failsafe Plugin
+
+ The Failsafe Plugin is designed to run integration tests while the Surefire
Plugins is designed to run unit. The name
+ (failsafe) was chosen both because it is a synonym of surefire and because
it implies that when it fails, it does so
+ in a safe way.
+
+ The Maven lifecycle has four phases for running integration tests:
+
+ * <<<pre-integration-test>>> for setting up the integration test environment.
+
+ * <<<integration-test>>> for running the integration tests.
+
+ * <<<post-integration-test>>> for tearing down the integration test
environment.
+
+ * <<<verify>>> for checking the results of the integration tests.
+
+ []
+
+ If you use the Surefire Plugin for running tests, then when you have a test
failure, the build will stop at the
+ <<<integration-test>>> phase and your integration test environment will not
have been torn down correctly.
+
+ The Failsafe Plugin is used during the <<<integration-test>>> and
<<<verify>>> phases of the build
+ lifecycle to execute the integration tests of an application. The Failsafe
Plugin will not fail the build during
+ the <<<integration-test>>> phase thus enabling the
<<<post-integration-test>>> phase to execute.
+
+ NOTE: when running integration tests, you should invoke maven with the
(shorter to type too)
+
++---+
+mvn verify
++---+
+
+ rather than trying to invoke the <<<integration-test>>> phase directly, as
otherwise the <<<post-integration-test>>>
+ phase will not be executed.
+
+ The Failsafe Plugin generates reports in 2 different file formats:
+
+ * Plain text files (*.txt)
+
+ * XML files (*.xml)
+
+ []
+
+ By default, these files are generated at
<<<$\{basedir\}/target/failsafe-reports>>>.
+
+ For an HTML format of the report, please see the
+ {{{http://maven.apache.org/plugins/maven-surefire-report-plugin/}Maven
Surefire Report Plugin}}.
+
+* Goals Overview
+
+ The Failsafe Plugin has only 2 goals:
+
+ * {{{integration-test-mojo.html}failsafe:integration-test}} runs the
integration tests of an application.
+
+ * {{{verify-mojo.html}failsafe:verify}} verifies that the integration tests
of an application passed.
+
+ []
+
+* Usage
+
+ Instructions on how to use the Failsafe Plugin can be found on the
{{{usage.html}usage page}}.
+
+* Examples
+
+ The following examples show how to use the Failsafe Plugin in more advanced
use-cases:
+
+ * {{{examples/testng.html}Using TestNG}}
+
+ * {{{examples/skipping-test.html}Skipping Tests}}
+
+ * {{{examples/inclusion-exclusion.html}Inclusions and Exclusions of Tests}}
+
+ * {{{examples/single-test.html}Running a Single Test}}
+
+ * {{{examples/class-loading.html}Class Loading Issues}}
+
+ * {{{examples/debugging.html}Debugging Tests}}
+
+ * {{{examples/system-properties.html}Using System Properties}}
+
+ * {{{examples/additional-classpath.html}Additional Classpath Elements}}
+
+ []
Propchange: maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/index.apt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/index.apt
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/usage.apt.vm
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/usage.apt.vm?rev=897127&view=auto
==============================================================================
--- maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/usage.apt.vm (added)
+++ maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/usage.apt.vm Fri
Jan 8 08:03:49 2010
@@ -0,0 +1,249 @@
+ ------
+ Usage
+ ------
+ Stephen Connolly
+ Brett Porter
+ Allan Ramirez
+ ------
+ May 2009
+ ------
+
+Usage
+
+ To use the Failsafe Plugin, you need to add the following configuration to
+ your pom.xml
+
++---+
+<project>
+ [...]
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>integration-test</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>verify</id>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ [...]
+</project>
++---+
+
+ Then Failsafe Plugin can be invoked by calling the <<<verify>>> phase of the
+ build lifecycle.
+
++---+
+mvn verify
++---+
+
+* Using different testing providers
+
+ Tests in your test source directory can be any combination of the following:
+
+ * TestNG
+
+ * JUnit (3.8 or 4.x)
+
+ * POJO
+
+ Which providers are available is controlled simply by the inclusion of the
+ appropriate dependencies (ie, junit:junit for JUnit, org.testng:testng 4.7+
+ for TestNG). Since this is required to compile the test classes anyway, no
+ additional configuration is required.
+
+ Note that any normal Surefire integration works identically no matter which
+ providers are in use - so you can still produce a Cobertura report and a
+ Surefire results report on your project web site for your TestNG tests,
+ for example.
+
+ The POJO provider above allows you to write tests that do not depend on
+ JUnit. They behave in the same way, running all <<<test*>>> methods that are
+ public in the class, but the API dependency is not required. To perform
+ assertions, the JDK 1.4 <<<assert>>> keyword can be used, or you can use
+ <<<org.apache.maven.surefire.assertion.Assert>>>.
+
+ All of the providers support the Surefire Plugin parameter configurations.
+ However, there are additional options available if you are running TestNG
+ tests (including if you are using TestNG to execute your JUnit tests, which
+ occurs by default if both are present in Surefire).
+
+ See {{{examples/testng.html} Using TestNG}} for more information.
+
+* Using jetty and maven-failsafe-plugin
+
+ You need to bind one of <<<jetty:run>>>, <<<jetty:run-exploded>>> or
<<<jetty:run-war>>>
+ to the <<<pre-integration-test>>> phase with <<<deamon>>> set to true, bind
+ <<<failsafe:integration-test>>> to the <<<integration-test>>> phase, bind
<<<jetty:stop>>>
+ to the <<<post-integration-test>>> phase and finally bind
<<<failsafe:verify>>> to
+ the <<<verify>>> phase. Here is an example:
+
++---+
+<project>
+ [...]
+ <build>
+ [...]
+ <plugins>
+ [...]
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>integration-test</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>verify</id>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.16</version>
+ [...]
+ <configuration>
+ [...]
+ <scanIntervalSeconds>10</scanIntervalSeconds>
+ <stopPort>8005</stopPort>
+ <stopKey>STOP</stopKey>
+ <contextPath>/</contextPath>
+ [...]
+ </configuration>
+ [...]
+ <executions>
+ [...]
+ <execution>
+ <id>start-jetty</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>run-exploded</goal>
+ </goals>
+ <configuration>
+ <scanIntervalSeconds>0</scanIntervalSeconds>
+ <daemon>true</daemon>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop-jetty</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ [...]
+ </executions>
+ [...]
+ </plugin>
+ [...]
+ </plugins>
+ [...]
+ </build>
+ [...]
+</project>
++---+
+
+ You then invoke maven with a phase of <<<verify>>> or later in order to run
+ the integration tests. DO NOT directly invoke any of the phases:
+ <<<pre-integration-test>>>, <<<integration-test>>>, or
<<<post-integration-test>>> as
+ these are too long to type and they will likely leave a jetty container
running.
+
++---+
+mvn verify
++---+
+
+ Note: during test development, you will likely run a jetty instance in the
background.
+ to help running the integration tests, it can be handy to bind
<<<jetty:stop>>> to
+ the <<<pre-integration-test>>> phase before <<<jetty:run>>> to flush out any
+ running jetty instance before starting the integration test jetty instance,
e.g.
+
++---+
+<project>
+ [...]
+ <build>
+ [...]
+ <plugins>
+ [...]
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.16</version>
+ [...]
+ <executions>
+ [...]
+ <execution>
+ <id>start-jetty</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <!-- stop any previous instance to free up the port -->
+ <goal>stop</goal>
+ <goal>run-exploded</goal>
+ </goals>
+ [...]
+ </execution>
+ [...]
+ </executions>
+ [...]
+ </plugin>
+ [...]
+ </plugins>
+ [...]
+ </build>
+ [...]
+</project>
++---+
+
+* Reporting integration test results
+
+ The Failsafe Plugin uses the exact same format as the Surefire Plugin, so to
generate a report you just add a second
+ Surefire Report Plugin report set using the Failsafe reports directory, e.g.
+
++---+
+<project>
+ [...]
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${project.version}</version>
+ <reportSets>
+ <reportSet>
+ <id>integration-tests</id>
+ <reports>
+ <report>report-only</report>
+ </reports>
+ <configuration>
+ <outputName>failsafe-report</outputName>
+ <reportsDirectories>
+
<reportsDirectory>${project.build.directory}/failsafe-reports</reportsDirectory>
+ </reportsDirectories>
+ </configuration>
+ </reportSet>
+ </plugin>
+ </plugins>
+ </reporting>
+ [...]
+</project>
++---+
+
Propchange: maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/usage.apt.vm
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/surefire/trunk/maven-failsafe-plugin/src/site/apt/usage.apt.vm
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/surefire/trunk/maven-failsafe-plugin/src/site/fml/faq.fml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-failsafe-plugin/src/site/fml/faq.fml?rev=897127&view=auto
==============================================================================
--- maven/surefire/trunk/maven-failsafe-plugin/src/site/fml/faq.fml (added)
+++ maven/surefire/trunk/maven-failsafe-plugin/src/site/fml/faq.fml Fri Jan 8
08:03:49 2010
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<faqs id="FAQ" title="Frequently Asked Questions">
+ <part id="General">
+ <faq id="what-about-surefire">
+ <question>What is the difference between maven-failsafe-plugin and
maven-surefire-plugin?</question>
+ <answer>
+ <p>
+ <a
href="http://maven.apache.org/plugins/maven-surefire-plugin">maven-surefire-plugin</a>
is designed for
+ running unit tests and if any of the tests fail then it will fail
the build immediately.
+ </p>
+ <p>
+ maven-failsafe-plugin is designed for running integration tests, and
decouples failing the build if there
+ are test failures from actually running the tests.
+ </p>
+ </answer>
+ </faq>
+ <faq id="reuse-test-code">
+ <question>How can I reuse my test code in other modules?</question>
+ <answer>
+ <p>
+ Visit this link for your reference,
+ <a
href="http://maven.apache.org/guides/mini/guide-attached-tests.html">
+ Attaching tests
+ </a>
+ </p>
+ </answer>
+ </faq>
+ </part>
+</faqs>
Propchange: maven/surefire/trunk/maven-failsafe-plugin/src/site/fml/faq.fml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/surefire/trunk/maven-failsafe-plugin/src/site/fml/faq.fml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/surefire/trunk/maven-failsafe-plugin/src/site/site.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-failsafe-plugin/src/site/site.xml?rev=897127&view=auto
==============================================================================
--- maven/surefire/trunk/maven-failsafe-plugin/src/site/site.xml (added)
+++ maven/surefire/trunk/maven-failsafe-plugin/src/site/site.xml Fri Jan 8
08:03:49 2010
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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 xmlns="http://maven.apache.org/DECORATION/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0
http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+ <body>
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ <item name="Goals" href="plugin-info.html"/>
+ <item name="Usage" href="usage.html"/>
+ <item name="FAQ" href="faq.html"/>
+ </menu>
+ <menu name="Examples">
+ <item name="Using TestNG" href="examples/testng.html"/>
+ <item name="Skipping Tests" href="examples/skipping-test.html"/>
+ <item name="Inclusions and Exclusions of Tests"
href="examples/inclusion-exclusion.html"/>
+ <item name="Running a Single Test" href="examples/single-test.html"/>
+ <item name="Class Loading Issues" href="examples/class-loading.html"/>
+ <item name="Debugging Tests" href="examples/debugging.html"/>
+ <item name="System Properties" href="examples/system-properties.html"/>
+ <item name="Additional Classpath Elements"
href="examples/additional-classpath.html"/>
+ </menu>
+ </body>
+</project>
Propchange: maven/surefire/trunk/maven-failsafe-plugin/src/site/site.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/surefire/trunk/maven-failsafe-plugin/src/site/site.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: maven/surefire/trunk/maven-surefire-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/pom.xml?rev=897127&r1=897126&r2=897127&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-plugin/pom.xml (original)
+++ maven/surefire/trunk/maven-surefire-plugin/pom.xml Fri Jan 8 08:03:49 2010
@@ -35,7 +35,7 @@
<name>Maven Surefire Plugin</name>
<prerequisites>
- <maven>2.0.6</maven>
+ <maven>2.0.9</maven>
</prerequisites>
<mailingLists>
@@ -107,7 +107,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
- <version>2.0.6</version>
+ <version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
@@ -120,22 +120,22 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
- <version>2.0.6</version>
+ <version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
- <version>2.0.6</version>
+ <version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
- <version>2.0.6</version>
+ <version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-toolchain</artifactId>
- <version>1.0</version>
+ <version>2.0.9</version>
</dependency>
</dependencies>
@@ -203,7 +203,7 @@
<plugins>
<plugin>
<artifactId>maven-docck-plugin</artifactId>
- <version>1.0-beta-1</version>
+ <version>1.0</version>
<executions>
<execution>
<goals>
Modified:
maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java?rev=897127&r1=897126&r2=897127&view=diff
==============================================================================
---
maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
(original)
+++
maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
Fri Jan 8 08:03:49 2010
@@ -588,7 +588,7 @@
throw new MojoExecutionException( e.getMessage(), e );
}
- if ( originalSystemProperties != null &&
!surefireBooter.isForking() )
+ if ( originalSystemProperties != null &&
!surefireBooter.isForking() )
{
// restore system properties, only makes sense when not
forking..
System.setProperties( originalSystemProperties );
@@ -856,12 +856,12 @@
for ( int i = 0; i < testRegexes.length; i++ )
{
String testRegex = testRegexes[i];
- if (testRegex.endsWith( ".java" ))
+ if ( testRegex.endsWith( ".java" ) )
{
testRegex = testRegex.substring( 0, testRegex.length()
- 5 );
}
// Allow paths delimited by '.' or '/'
- testRegex = testRegex.replace('.', '/');
+ testRegex = testRegex.replace( '.', '/' );
includes.add( "**/" + testRegex + ".java" );
}
}
@@ -886,29 +886,37 @@
}
}
- if (testNgArtifact != null) {
+ if ( testNgArtifact != null )
+ {
surefireBooter.addTestSuite("org.apache.maven.surefire.testng.TestNGDirectoryTestSuite",
new Object[]{
testClassesDirectory, includes, excludes,
testSourceDirectory.getAbsolutePath(),
testNgArtifact.getVersion(),
testNgArtifact.getClassifier(), properties, reportsDirectory});
- } else {
+ }
+ else
+ {
String junitDirectoryTestSuite;
- if (isJunit47Compatible(junitArtifact))
+ if ( isJunit47Compatible( junitArtifact ) )
{
junitDirectoryTestSuite =
"org.apache.maven.surefire.junitcore.JUnitCoreDirectoryTestSuite";
- getLog().warn( "Props are" + properties.toString());
- surefireBooter.addTestSuite(junitDirectoryTestSuite, new
Object[]{testClassesDirectory, includes, excludes, properties});
- } else {
- if (isJunit40to46(junitArtifact))
+ getLog().warn( "Props are" + properties.toString() );
+ surefireBooter.addTestSuite( junitDirectoryTestSuite,
+ new
Object[]{testClassesDirectory, includes, excludes, properties} );
+ }
+ else
+ {
+ if ( isJunit40to46( junitArtifact ) )
{
junitDirectoryTestSuite =
"org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite";
- } else {
+ }
+ else
+ {
// fall back to JUnit, which also contains POJO
support. Also it can run
// classes compiled against JUnit since it has a
dependency on JUnit itself.
junitDirectoryTestSuite =
"org.apache.maven.surefire.junit.JUnitDirectoryTestSuite";
}
- surefireBooter.addTestSuite(junitDirectoryTestSuite, new
Object[]{testClassesDirectory, includes, excludes});
+ surefireBooter.addTestSuite( junitDirectoryTestSuite,
+ new
Object[]{testClassesDirectory, includes, excludes} );
}
-
}
}
@@ -961,18 +969,20 @@
Toolchain tc = getToolchain();
- if (tc != null)
+ if ( tc != null )
{
- getLog().info("Toolchain in surefire-plugin: " + tc);
- if (ForkConfiguration.FORK_NEVER.equals( forkMode ) )
+ getLog().info( "Toolchain in surefire-plugin: " + tc );
+ if ( ForkConfiguration.FORK_NEVER.equals( forkMode ) )
{
forkMode = ForkConfiguration.FORK_ONCE;
}
- if ( jvm != null )
+ if ( jvm != null )
{
- getLog().warn("Toolchains are ignored, 'executable' parameter
is set to " + jvm);
- } else {
- jvm = tc.findTool("java"); //NOI18N
+ getLog().warn( "Toolchains are ignored, 'executable' parameter
is set to " + jvm );
+ }
+ else
+ {
+ jvm = tc.findTool( "java" ); //NOI18N
}
}
@@ -1076,11 +1086,6 @@
return surefireBooter;
}
- /*private void replaceListItem( List list, Object item1, Object item2 )
- {
- list.r
- }*/
-
private void showMap( Map map, String setting )
{
for ( Iterator i = map.keySet().iterator(); i.hasNext(); )
@@ -1094,10 +1099,9 @@
private void addProvider( SurefireBooter surefireBooter, String provider,
String version, Artifact filteredArtifact )
throws ArtifactNotFoundException, ArtifactResolutionException
{
- Artifact providerArtifact =
- artifactFactory.createDependencyArtifact(
"org.apache.maven.surefire", provider,
-
VersionRange.createFromVersion( version ), "jar", null,
- Artifact.SCOPE_TEST );
+ Artifact providerArtifact = artifactFactory.createDependencyArtifact(
"org.apache.maven.surefire", provider,
+
VersionRange.createFromVersion( version ),
+
"jar", null, Artifact.SCOPE_TEST );
ArtifactResolutionResult result = resolveArtifact( filteredArtifact,
providerArtifact );
for ( Iterator i = result.getArtifacts().iterator(); i.hasNext(); )
Modified:
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/skipping-test.apt.vm
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/skipping-test.apt.vm?rev=897127&r1=897126&r2=897127&view=diff
==============================================================================
---
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/skipping-test.apt.vm
(original)
+++
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/skipping-test.apt.vm
Fri Jan 8 08:03:49 2010
@@ -39,7 +39,7 @@
+---+
If you absolutely must, you can also use the <<<maven.test.skip>>> property
to skip compiling the tests.
- <<<maven.test.skip>>> is honored by Surefire and the Compiler Plugin.
+ <<<maven.test.skip>>> is honored by Surefire, Failsafe and the Compiler
Plugin.
+---+
mvn install -Dmaven.test.skip=true
Modified: maven/surefire/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/pom.xml?rev=897127&r1=897126&r2=897127&view=diff
==============================================================================
--- maven/surefire/trunk/pom.xml (original)
+++ maven/surefire/trunk/pom.xml Fri Jan 8 08:03:49 2010
@@ -91,6 +91,7 @@
<module>surefire-booter</module>
<module>surefire-providers</module>
<module>maven-surefire-plugin</module>
+ <module>maven-failsafe-plugin</module>
<module>maven-surefire-report-plugin</module>
<module>surefire-integration-tests</module>
</modules>