geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r597042 - in /geronimo/server: branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
Date Wed, 21 Nov 2007 11:43:00 GMT
Author: vamsic007
Date: Wed Nov 21 03:42:59 2007
New Revision: 597042

URL: http://svn.apache.org/viewvc?rev=597042&view=rev
Log:
GERONIMO-3620 Remote deployment using command line deployer does not really work
 o Normalize the URL to remove extra slashes.
 o Thanks to YunFeng Ma for pointing to the patch under GERONIMO-3583.

Modified:
    geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
    geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java

Modified: geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java?rev=597042&r1=597041&r2=597042&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
Wed Nov 21 03:42:59 2007
@@ -182,10 +182,9 @@
             String contextPath = (String) kernel.getAttribute(module, "contextPath");
             if (null == contextPath) {
                 throw new IllegalStateException("Cannot find contextPath attribute for ["
+ module + "]");
-            } else if (contextPath.startsWith("/")) {
-                contextPath = contextPath.substring(1);
             }
-            return remoteDeployAddress + "/" + contextPath + "/upload";
+            String temp = remoteDeployAddress + "/" + contextPath + "/upload";
+            return URI.create(temp).normalize().toString();
         } catch (Exception e) {
             log.error("Unable to look up remote deploy upload URL", e);
             return null;

Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java?rev=597042&r1=597041&r2=597042&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
Wed Nov 21 03:42:59 2007
@@ -183,10 +183,9 @@
             String contextPath = (String) kernel.getAttribute(module, "contextPath");
             if (null == contextPath) {
                 throw new IllegalStateException("Cannot find contextPath attribute for ["
+ module + "]");
-            } else if (contextPath.startsWith("/")) {
-                contextPath = contextPath.substring(1);
             }
-            return remoteDeployAddress + "/" + contextPath + "/upload";
+            String temp = remoteDeployAddress + "/" + contextPath + "/upload";
+            return URI.create(temp).normalize().toString();
         } catch (Exception e) {
             log.error("Unable to look up remote deploy upload URL", e);
             return null;



Mime
View raw message