geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r475312 - in /geronimo/server/trunk/modules: geronimo-jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java geronimo-tomcat-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Date Wed, 15 Nov 2006 17:27:11 GMT
Author: vamsic007
Date: Wed Nov 15 09:27:08 2006
New Revision: 475312

URL: http://svn.apache.org/viewvc?view=rev&rev=475312
Log:
GERONIMO-2293 Can't deploy exploded WAR with plan with no environment

Modified:
    geronimo/server/trunk/modules/geronimo-jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/server/trunk/modules/geronimo-tomcat-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java

Modified: geronimo/server/trunk/modules/geronimo-jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?view=diff&rev=475312&r1=475311&r2=475312
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Wed Nov 15 09:27:08 2006
@@ -237,9 +237,22 @@
         getNamingBuilders().buildEnvironment(webApp, jettyWebApp, environment);
         
         // Note: logic elsewhere depends on the default artifact ID being the file name less
extension (ConfigIDExtractor)
-        String warName = new File(moduleFile.getName()).getName();
-        if (warName.lastIndexOf('.') > -1) {
-            warName = warName.substring(0, warName.lastIndexOf('.'));
+        String warName = "";
+        File temp = new File(moduleFile.getName());
+        if(temp.isFile()) {
+            warName = temp.getName();
+            if(warName.lastIndexOf('.') > -1) {
+                warName = warName.substring(0, warName.lastIndexOf('.'));
+            }
+        } else {
+            try {
+                warName = temp.getCanonicalFile().getName();
+                if(warName.equals("")) {
+                    // Root directory
+                    warName = "$root-dir$";
+                }
+            } catch (IOException e) {
+            }
         }
         idBuilder.resolve(environment, warName, "war");
 

Modified: geronimo/server/trunk/modules/geronimo-tomcat-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?view=diff&rev=475312&r1=475311&r2=475312
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Wed Nov 15 09:27:08 2006
@@ -173,9 +173,22 @@
         getNamingBuilders().buildEnvironment(webApp, tomcatWebApp, environment);
 
         // Note: logic elsewhere depends on the default artifact ID being the file name less
extension (ConfigIDExtractor)
-        String warName = new File(moduleFile.getName()).getName();
-        if (warName.lastIndexOf('.') > -1) {
-            warName = warName.substring(0, warName.lastIndexOf('.'));
+        String warName = "";
+        File temp = new File(moduleFile.getName());
+        if(temp.isFile()) {
+            warName = temp.getName();
+            if(warName.lastIndexOf('.') > -1) {
+                warName = warName.substring(0, warName.lastIndexOf('.'));
+            }
+        } else {
+            try {
+                warName = temp.getCanonicalFile().getName();
+                if(warName.equals("")) {
+                    // Root directory
+                    warName = "$root-dir$";
+                }
+            } catch (IOException e) {
+            }
         }
         idBuilder.resolve(environment, warName, "war");
 



Mime
View raw message