maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r800541 - /maven/maven-2/branches/maven-2.2.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
Date Mon, 03 Aug 2009 20:31:50 GMT
Author: jdcasey
Date: Mon Aug  3 20:31:50 2009
New Revision: 800541

URL: http://svn.apache.org/viewvc?rev=800541&view=rev
Log:
[MNG-4279] Fail gracefully in cases where wagonProvider is invalid for the specified repository
protocol.

Modified:
    maven/maven-2/branches/maven-2.2.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java

Modified: maven/maven-2/branches/maven-2.2.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
URL: http://svn.apache.org/viewvc/maven/maven-2/branches/maven-2.2.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java?rev=800541&r1=800540&r2=800541&view=diff
==============================================================================
--- maven/maven-2/branches/maven-2.2.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
(original)
+++ maven/maven-2/branches/maven-2.2.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
Mon Aug  3 20:31:50 2009
@@ -186,7 +186,22 @@
             }
         }
         
-        return impl == null ? protocol : protocol + "-" + impl;
+        String hint;
+        if ( impl != null )
+        {
+            hint = protocol + "-" + impl;
+            PlexusContainer container = getWagonContainer( hint );
+            if ( container == null || !container.hasComponent( Wagon.ROLE, hint ) )
+            {
+                hint = protocol;
+            }
+        }
+        else
+        {
+            hint = protocol;
+        }
+        
+        return hint;
     }
 
     private PlexusContainer getWagonContainer( String hint )



Mime
View raw message