You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-commits@maven.apache.org by pg...@apache.org on 2010/05/13 16:39:11 UTC

svn commit: r943900 - /maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java

Author: pgier
Date: Thu May 13 14:39:11 2010
New Revision: 943900

URL: http://svn.apache.org/viewvc?rev=943900&view=rev
Log:
[SUREFIRE-598] Removing classpath elements should come after the classes/test-classes config so that they are not re-added to the classpath.

Modified:
    maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java

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=943900&r1=943899&r2=943900&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 Thu May 13 14:39:11 2010
@@ -993,29 +993,6 @@ public class SurefirePlugin
             }
         }
 
-        // ----------------------------------------------------------------------
-        // modify default classpath according to configuration
-        if ( ignoreClasspathElements.equals( "all" ) )
-        {
-            classpathElements.clear();
-        }
-        else if ( ignoreClasspathElements.equals( "runtime" ) )
-        {
-            try 
-            {
-               classpathElements.removeAll( project.getRuntimeClasspathElements() );
-            }
-            catch ( DependencyResolutionRequiredException e )
-            {
-                throw new MojoExecutionException ( "Unable to resolve runtime classpath elements: " + e, e );
-            }
-        }
-        else if ( ! ignoreClasspathElements.equals( "none" ) )
-        {
-            throw new MojoExecutionException( "Unsupported value for ignoreClasspathElements parameter: " +
-                                            ignoreClasspathElements );
-        }
-        
         // Check if we need to add configured classes/test classes directories here.
         // If they are configured, we should remove the default to avoid conflicts.
         File projectClassesDirectory = new File( project.getBuild().getOutputDirectory() );
@@ -1048,6 +1025,29 @@ public class SurefirePlugin
             }
         }
 
+        // ----------------------------------------------------------------------
+        // Remove elements from the classpath according to configuration
+        if ( ignoreClasspathElements.equals( "all" ) )
+        {
+            classpathElements.clear();
+        }
+        else if ( ignoreClasspathElements.equals( "runtime" ) )
+        {
+            try 
+            {
+               classpathElements.removeAll( project.getRuntimeClasspathElements() );
+            }
+            catch ( DependencyResolutionRequiredException e )
+            {
+                throw new MojoExecutionException ( "Unable to resolve runtime classpath elements: " + e, e );
+            }
+        }
+        else if ( ! ignoreClasspathElements.equals( "none" ) )
+        {
+            throw new MojoExecutionException( "Unsupported value for ignoreClasspathElements parameter: " +
+                                            ignoreClasspathElements );
+        }
+        
         getLog().debug( "Test Classpath :" );
 
         for ( Iterator i = classpathElements.iterator(); i.hasNext(); )



Re: svn commit: r943900 - /maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java

Posted by Paul Gier <pg...@redhat.com>.
Benjamin Bentmann wrote:
> Hi Paul,
> 
>> Author: pgier
>> Date: Thu May 13 14:39:11 2010
>> New Revision: 943900
>>
>> URL: http://svn.apache.org/viewvc?rev=943900&view=rev
>> Log:
>> [SUREFIRE-598] Removing classpath elements should come after the
>> classes/test-classes config so that they are not re-added to the
>> classpath.
> 
> Given this is new feature rather than a mere bugfix, shouldn't the next
> plugin version be 2.6? JIRA and the @since tag say 2.5.1, while the
> Surefire POMs are already at 2.6-SNAPSHOT. WDYT?
> 
> 
> Benjamin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 

Yeah, that makes sense.  I'll update the jira issues and @since tag.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r943900 - /maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java

Posted by Benjamin Bentmann <be...@udo.edu>.
Hi Paul,

> Author: pgier
> Date: Thu May 13 14:39:11 2010
> New Revision: 943900
>
> URL: http://svn.apache.org/viewvc?rev=943900&view=rev
> Log:
> [SUREFIRE-598] Removing classpath elements should come after the classes/test-classes config so that they are not re-added to the classpath.

Given this is new feature rather than a mere bugfix, shouldn't the next 
plugin version be 2.6? JIRA and the @since tag say 2.5.1, while the 
Surefire POMs are already at 2.6-SNAPSHOT. WDYT?


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org