geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsis...@apache.org
Subject svn commit: r355714 - /geronimo/branches/1.0/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java
Date Sat, 10 Dec 2005 04:51:01 GMT
Author: jsisson
Date: Fri Dec  9 20:50:51 2005
New Revision: 355714

URL: http://svn.apache.org/viewcvs?rev=355714&view=rev
Log:
fix problem with installation of car files on windows when directories contain spaces

Modified:
    geronimo/branches/1.0/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java

Modified: geronimo/branches/1.0/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java?rev=355714&r1=355713&r2=355714&view=diff
==============================================================================
--- geronimo/branches/1.0/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java
(original)
+++ geronimo/branches/1.0/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java
Fri Dec  9 20:50:51 2005
@@ -22,6 +22,7 @@
 import java.io.ObjectInputStream;
 import java.net.URI;
 import java.net.URL;
+import java.net.URLDecoder;
 import java.util.List;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
@@ -132,7 +133,17 @@
         }
         URI configId = configurationData.getId();
         URL targetURL = repository.getURL(configId);
-        File targetFile = new File(targetURL.getPath());
+        File targetFile;
+        if (targetURL.getProtocol().equalsIgnoreCase("file")) {
+            try {
+                targetFile = new File(URLDecoder.decode(targetURL.getFile(), "UTF-8"));
+            } catch (IOException e) {
+                throw new InvalidConfigException("Could not construct File for car location",
e);
+            }
+        } else {
+            URI targetURI = URI.create(targetURL.toString());
+            targetFile = new File(targetURI);
+        }
         ExecutableConfigurationUtil.createExecutableConfiguration(configurationData, null,
source, targetFile);
     }
 



Mime
View raw message