Author: krosenvold
Date: Tue Dec 7 07:44:09 2010
New Revision: 1042926
URL: http://svn.apache.org/viewvc?rev=1042926&view=rev
Log:
o Let's see if this'll make the tests run on the grid
Modified:
maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireDependencyResolver.java
maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-141-pluggableproviders/test/pom.xml
Modified:
maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireDependencyResolver.java
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireDependencyResolver.java?rev=1042926&r1=1042925&r2=1042926&view=diff
==============================================================================
---
maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireDependencyResolver.java
(original)
+++
maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireDependencyResolver.java
Tue Dec 7 07:44:09 2010
@@ -192,11 +192,25 @@ public class SurefireDependencyResolver
Artifact surefireArtifact )
throws ArtifactResolutionException, ArtifactNotFoundException
{
- final ArtifactResolutionResult artifactResolutionResult =
resolveArtifact( null, surefireArtifact );
- for (Iterator iterator = pluginArtifactMap.values().iterator();
iterator.hasNext();){
- Artifact artifact = (Artifact) iterator.next();
- if( !artifactResolutionResult.getArtifacts().contains( artifact )){
- classpathConfiguration.addClasspathUrl(
artifact.getFile().getPath() );
+ if ( surefireArtifact != null )
+ {
+ final ArtifactResolutionResult artifactResolutionResult =
resolveArtifact( null, surefireArtifact );
+ for ( Iterator iterator = pluginArtifactMap.values().iterator();
iterator.hasNext(); )
+ {
+ Artifact artifact = (Artifact) iterator.next();
+ if ( !artifactResolutionResult.getArtifacts().contains(
artifact ) )
+ {
+ classpathConfiguration.addClasspathUrl(
artifact.getFile().getPath() );
+ }
+ }
+ }
+ else
+ {
+ // Bit of a brute force strategy if not found. Should probably be
improved
+ for ( Iterator iterator = pluginArtifactMap.values().iterator();
iterator.hasNext(); )
+ {
+ Artifact artifact = (Artifact) iterator.next();
+ classpathConfiguration.addClasspathUrl(
artifact.getFile().getPath() );
}
}
}
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-141-pluggableproviders/test/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-141-pluggableproviders/test/pom.xml?rev=1042926&r1=1042925&r2=1042926&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-141-pluggableproviders/test/pom.xml
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-141-pluggableproviders/test/pom.xml
Tue Dec 7 07:44:09 2010
@@ -26,7 +26,7 @@
<groupId>org.apache.maven.plugins.surefire</groupId>
<artifactId>junit-twoTestCases</artifactId>
<version>1.0-SNAPSHOT</version>
- <name>Test for two test cases</name>
+ <name>surefire-414-pluggableproviders</name>
<dependencies>
<dependency>