You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ar...@apache.org on 2006/08/03 11:51:02 UTC
svn commit: r428294 - in /maven/plugins/trunk/maven-surefire-plugin/src:
main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
site/apt/examples/class-loading.apt site/apt/examples/system-properties.apt
site/fml/faq.fml
Author: aramirez
Date: Thu Aug 3 02:51:02 2006
New Revision: 428294
URL: http://svn.apache.org/viewvc?rev=428294&view=rev
Log:
PR: MSUREFIRE-147
updated docs based on the comments from the dev list
Modified:
maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
maven/plugins/trunk/maven-surefire-plugin/src/site/apt/examples/class-loading.apt
maven/plugins/trunk/maven-surefire-plugin/src/site/apt/examples/system-properties.apt
maven/plugins/trunk/maven-surefire-plugin/src/site/fml/faq.fml
Modified: maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java?rev=428294&r1=428293&r2=428294&view=diff
==============================================================================
--- maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java (original)
+++ maven/plugins/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java Thu Aug 3 02:51:02 2006
@@ -136,7 +136,7 @@
private File testSourceDirectory;
/**
- * Specify this parameter if you want to use the test pattern matching notation, Ant pattern matching, to select tests to run.
+ * Specify this parameter(can be a comma separated list) if you want to use the test pattern matching notation, Ant pattern matching, to select tests to run.
* The Ant pattern will be used to create an include pattern formatted like <code>**/${test}.java</code>
* When used, the <code>includes</code> and <code>excludes</code> patterns parameters are ignored.
*
@@ -224,8 +224,7 @@
* When forking, set this to true to redirect the unit test standard output to a file
* (found in reportsDirectory/testName-output.txt).
*
- * @parameter expression="${maven.test.redirectTestOutputToFile}"
- * @default-value="false"
+ * @parameter expression="${maven.test.redirectTestOutputToFile}" default-value="false"
*/
private boolean redirectTestOutputToFile;
@@ -331,11 +330,15 @@
private boolean trimStackTrace;
/**
+ * Resolves the artifacts needed.
+ *
* @component
*/
private ArtifactResolver artifactResolver;
/**
+ * Creates the artifact
+ *
* @component
*/
private ArtifactFactory artifactFactory;
@@ -348,6 +351,8 @@
private List remoteRepositories;
/**
+ * For retrieval of artifact's metadata.
+ *
* @component
*/
private ArtifactMetadataSource metadataSource;
Modified: maven/plugins/trunk/maven-surefire-plugin/src/site/apt/examples/class-loading.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-surefire-plugin/src/site/apt/examples/class-loading.apt?rev=428294&r1=428293&r2=428294&view=diff
==============================================================================
--- maven/plugins/trunk/maven-surefire-plugin/src/site/apt/examples/class-loading.apt (original)
+++ maven/plugins/trunk/maven-surefire-plugin/src/site/apt/examples/class-loading.apt Thu Aug 3 02:51:02 2006
@@ -8,9 +8,18 @@
Class Loading Issues
- By default, Surefire loads classes using the default Java mechanism. However, it can be set to use "child first" classloading, like
- a web application - meaning your dependencies take precedence over those in the JDK.
- If you find this is necessary, you can do so by setting the <<<childDelegation>>> flag to <<<true>>>:
+ By default, Surefire loads classes using the default Java mechanism. However,
+ it can be set to use "child first" classloading, like a web application -
+ meaning your dependencies take precedence over those in the JDK. Classes in
+ the java.* and javax.* packages can never be overridden. The only use for
+ this is so that code in the test classpath can override stuff present in the
+ JDK or its "standard extensions" directory which is not in these restricted
+ packages. This means effectively implementations of the various "service provider"
+ interfaces in java such as the xml parser implementation used by jaxp,
+ the cryptography providers, the socket implementation class.
+
+ If you find this is necessary, you can do so by setting the <<<childDelegation>>>
+ property to <<true>>:
+---+
<project>
Modified: maven/plugins/trunk/maven-surefire-plugin/src/site/apt/examples/system-properties.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-surefire-plugin/src/site/apt/examples/system-properties.apt?rev=428294&r1=428293&r2=428294&view=diff
==============================================================================
--- maven/plugins/trunk/maven-surefire-plugin/src/site/apt/examples/system-properties.apt (original)
+++ maven/plugins/trunk/maven-surefire-plugin/src/site/apt/examples/system-properties.apt Thu Aug 3 02:51:02 2006
@@ -8,7 +8,7 @@
Using System Properties
- To add a System property, use the following configuration:
+ To add a System property, use the following configuration:
+---+
<project>
@@ -32,3 +32,34 @@
[...]
</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-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>buildDir</name>
+ <value>${project.build.outputDirectory}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ [...]
+</project>
++---+
+
+ will literally pass <<${project.build.outputDirectory}>> because the value
+ of that expression is a File, not a String.
\ No newline at end of file
Modified: maven/plugins/trunk/maven-surefire-plugin/src/site/fml/faq.fml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-surefire-plugin/src/site/fml/faq.fml?rev=428294&r1=428293&r2=428294&view=diff
==============================================================================
--- maven/plugins/trunk/maven-surefire-plugin/src/site/fml/faq.fml (original)
+++ maven/plugins/trunk/maven-surefire-plugin/src/site/fml/faq.fml Thu Aug 3 02:51:02 2006
@@ -1,13 +1,23 @@
<?xml version="1.0"?>
<faqs id="FAQ" title="Frequently Asked Questions">
<part id="General">
- <faq id="compile-error-reports">
+ <faq id="junit4-support">
<question>Does surefire plugin support JUnit 4.0?</question>
<answer>
<p>
No. But an issue is already filed. Please see
<a href="http://jira.codehaus.org/browse/SUREFIRE-31">SUREFIRE-31</a>
for more references.
+ </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>