geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: rev 54151 - geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin
Date Sat, 09 Oct 2004 05:34:36 GMT
Author: chirino
Date: Fri Oct  8 22:34:35 2004
New Revision: 54151

Modified:
   geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/DistributeModule.java
Log:
Fixing http://nagoya.apache.org/jira/browse/GERONIMO-369

Modified: geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/DistributeModule.java
==============================================================================
--- geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/DistributeModule.java
(original)
+++ geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/DistributeModule.java
Fri Oct  8 22:34:35 2004
@@ -35,7 +35,6 @@
 
     private String module;
     private String plan;
-    private String home;
 
     public String getModule() {
         return module;
@@ -53,14 +52,6 @@
         this.plan = plan;
     }
 
-    public String getHome() {
-        return home;
-    }
-
-    public void setHome(String home) {
-        this.home = home;
-    }
-
     public void execute() throws Exception {
         DeploymentManager manager = getDeploymentManager();
 
@@ -72,20 +63,16 @@
     }
 
     private File getFile(String location) throws MalformedURLException {
-        File f = new File(location);
-        if (f.exists() && f.canRead()) {
-            try {
-                return f.getCanonicalFile();
-            } catch (IOException e) {
-                throw (MalformedURLException) new MalformedURLException("Invalid location:
" + location).initCause(e);
-            }
-        }
-        try {
-            return new File(new File(getHome()).toURI().resolve(location).toURL().getFile());
-        } catch (IllegalArgumentException e) {
-            // thrown by URI.resolve if the location is not valid
-            throw (MalformedURLException) new MalformedURLException("Invalid location: "
+ location).initCause(e);
-        }
+    	try {
+			File f = new File(location).getCanonicalFile();
+			if (!f.exists() || !f.canRead()) {
+				throw new MalformedURLException("Invalid location: " + location);
+			}
+			return f;
+		} catch (IOException e) {
+			throw (MalformedURLException) new MalformedURLException("Invalid location: " + location).initCause(e);
+		}
+            
     }
 
 }

Mime
View raw message