Author: pgier
Date: Fri May 14 21:47:31 2010
New Revision: 944493
URL: http://svn.apache.org/viewvc?rev=944493&view=rev
Log:
[SUREFIRE-619] Add some site docs about the classpath generation. Minor
formatting fix to SurefirePlugin.java.
Added:
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/configuring-classpath.apt.vm
- copied, changed from r944478,
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/additional-classpath.apt.vm
Removed:
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/additional-classpath.apt.vm
Modified:
maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/index.apt
maven/surefire/trunk/maven-surefire-plugin/src/site/site.xml
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=944493&r1=944492&r2=944493&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 May 14 21:47:31 2010
@@ -1111,9 +1111,10 @@ public class SurefirePlugin
return surefireBooter;
}
-
+
/**
* Generate the test classpath.
+ *
* @return List containing the classpath elements
* @throws DependencyResolutionRequiredException
*/
@@ -1125,12 +1126,12 @@ public class SurefirePlugin
classpath.add( testClassesDirectory.getAbsolutePath() );
classpath.add( classesDirectory.getAbsolutePath() );
-
+
for ( Iterator iter = project.getArtifacts().iterator();
iter.hasNext(); )
- {
+ {
Artifact artifact = (Artifact) iter.next();
if ( artifact.getArtifactHandler().isAddedToClasspath() )
- {
+ {
File file = artifact.getFile();
if ( file != null )
{
@@ -1148,12 +1149,12 @@ public class SurefirePlugin
{
classpath.removeAll( project.getRuntimeClasspathElements() );
}
- else if ( ! ignoreClasspathElements.equals( "none" ) )
+ else if ( !ignoreClasspathElements.equals( "none" ) )
{
throw new MojoExecutionException( "Unsupported value for
ignoreClasspathElements parameter: " +
- ignoreClasspathElements );
+ ignoreClasspathElements );
}
-
+
// Add additional configured elements to the classpath
if ( additionalClasspathElements != null )
{
Copied:
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/configuring-classpath.apt.vm
(from r944478,
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/additional-classpath.apt.vm)
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/configuring-classpath.apt.vm?p2=maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/configuring-classpath.apt.vm&p1=maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/additional-classpath.apt.vm&r1=944478&r2=944493&rev=944493&view=diff
==============================================================================
---
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/additional-classpath.apt.vm
(original)
+++
maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/configuring-classpath.apt.vm
Fri May 14 21:47:31 2010
@@ -1,11 +1,23 @@
------
- Additional Classpath
+ Configuring the Classpath
------
Pascal Lambert
------
2010-01-09
------
+The Default Classpath
+
+ The surefire plugin builds the test classpath in the following order:
+
+ [[1]] The {{{../test-mojo.html#testClassesDirectory}test-classes}} directory
+
+ [[2]] The {{{../test-mojo.html#classesDirectory}classes}} directory
+
+ [[3]] The project dependencies
+
+ [[4]] Additional classpath elements
+
Additional Classpath Elements
If you need to put more stuff in your classpath when Surefire executes (e.g
some funky resources or a container specific JAR),
Modified: maven/surefire/trunk/maven-surefire-plugin/src/site/apt/index.apt
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/site/apt/index.apt?rev=944493&r1=944492&r2=944493&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-plugin/src/site/apt/index.apt (original)
+++ maven/surefire/trunk/maven-surefire-plugin/src/site/apt/index.apt Fri May
14 21:47:31 2010
@@ -91,6 +91,6 @@ Maven Surefire Plugin
* {{{./examples/system-properties.html}Using System Properties}}
- * {{{./examples/additional-classpath.html}Additional Classpath Elements}}
+ * {{{./examples/configuring-classpath.html}Configuring the Classpath}}
[]
Modified: maven/surefire/trunk/maven-surefire-plugin/src/site/site.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/site/site.xml?rev=944493&r1=944492&r2=944493&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-plugin/src/site/site.xml (original)
+++ maven/surefire/trunk/maven-surefire-plugin/src/site/site.xml Fri May 14
21:47:31 2010
@@ -38,7 +38,7 @@
<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"/>
+ <item name="Configuring the Classpath"
href="examples/configuring-classpath.html"/>
</menu>
</body>
</project>