geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r565355 - in /geronimo/server: branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/ trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/
Date Mon, 13 Aug 2007 14:05:31 GMT
Author: vamsic007
Date: Mon Aug 13 07:05:30 2007
New Revision: 565355

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

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

Modified: geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java?view=diff&rev=565355&r1=565354&r2=565355
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Mon Aug 13 07:05:30 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

Modified: geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java?view=diff&rev=565355&r1=565354&r2=565355
==============================================================================
--- geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Mon Aug 13 07:05:30 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