geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hogst...@apache.org
Subject svn commit: r566338 - /geronimo/server/branches/2.0.1/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Date Wed, 15 Aug 2007 20:48:48 GMT
Author: hogstrom
Date: Wed Aug 15 13:48:48 2007
New Revision: 566338

URL: http://svn.apache.org/viewvc?view=rev&rev=566338
Log:
PluginInstallerGBean fails to find available artifacts when the repository URL does not end
with "/".

Modified:
    geronimo/server/branches/2.0.1/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java

Modified: geronimo/server/branches/2.0.1/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0.1/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java?view=diff&rev=566338&r1=566337&r2=566338
==============================================================================
--- geronimo/server/branches/2.0.1/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
(original)
+++ geronimo/server/branches/2.0.1/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Wed Aug 15 13:48:48 2007
@@ -1181,11 +1181,11 @@
         }
         for(int i=available.length-1; i>=0; i--) {
             Version version = available[i];
-            URL metadataURL = new URL(url.toString()+base+"/"+version+"/maven-metadata.xml");
+            URL metadataURL = new URL(url.toString().trim().endsWith("/") ? url : new URL(url.toString().trim()+"/"),
base+"/"+version+"/maven-metadata.xml");
             InputStream metadataStream = connect(metadataURL, username, password, monitor);
             
             if (metadataStream == null) {
-                metadataURL = new URL(url.toString()+base+"/"+version+"/maven-metadata-local.xml");
+                metadataURL = new URL(url.toString().trim().endsWith("/") ? url : new URL(url.toString().trim()+"/"),
base+"/"+version+"/maven-metadata-local.xml");
                 metadataStream = connect(metadataURL, username, password, monitor);
             }            
             // check for a snapshot qualifier



Mime
View raw message