geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r514896 - in /geronimo/server/trunk/modules/geronimo-tomcat6-builder/src: main/java/org/apache/geronimo/tomcat/deployment/ test/java/org/apache/geronimo/tomcat/deployment/ test/resources/deployables/war-no-dd/
Date Mon, 05 Mar 2007 22:36:45 GMT
Author: jgenender
Date: Mon Mar  5 14:36:44 2007
New Revision: 514896

URL: http://svn.apache.org/viewvc?view=rev&rev=514896
Log:
Fix deployment issue

Removed:
    geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/test/resources/deployables/war-no-dd/
Modified:
    geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
    geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java

Modified: geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?view=diff&rev=514896&r1=514895&r2=514896
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Mon Mar  5 14:36:44 2007
@@ -131,17 +131,13 @@
 
             // read in the entire specDD as a string, we need this for getDeploymentDescriptor
             // on the J2ee management object
-            try {
-                specDD = DeploymentUtil.readAll(specDDUrl);
+            specDD = DeploymentUtil.readAll(specDDUrl);
 
-                // we found web.xml, if it won't parse that's an error.
-                XmlObject parsed = XmlBeansUtil.parse(specDD);
-                WebAppDocument webAppDoc = convertToServletSchema(parsed);
-                webApp = webAppDoc.getWebApp();
-                check(webApp);
-            } catch (FileNotFoundException fnfe) {
-                webApp = WebAppType.Factory.newInstance();
-            }
+            // we found web.xml, if it won't parse that's an error.
+            XmlObject parsed = XmlBeansUtil.parse(specDD);
+            WebAppDocument webAppDoc = convertToServletSchema(parsed);
+            webApp = webAppDoc.getWebApp();
+            check(webApp);
         } catch (XmlException e) {
             // Output the target path in the error to make it clearer to the user which webapp
             // has the problem.  The targetPath is used, as moduleFile may have an unhelpful
@@ -154,6 +150,9 @@
             }
             //else ignore as jee5 allows optional spec dd for .war's
         }
+
+        if (webApp == null)
+            webApp = WebAppType.Factory.newInstance();
 
         // parse vendor dd
         TomcatWebAppType tomcatWebApp = getTomcatWebApp(plan, moduleFile, standAlone, targetPath,
webApp);

Modified: geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java?view=diff&rev=514896&r1=514895&r2=514896
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
Mon Mar  5 14:36:44 2007
@@ -109,9 +109,6 @@
         verifyStartable("war6-jee5");
     }
 
-    public void testDeployWarNoDD() throws Exception {
-        verifyStartable("war-no-dd");
-    }
     public void testContextRootWithSpaces() throws Exception {
         WebModuleInfo info = deployWar("war-spaces-in-context");
         String contextRoot = (String) kernel.getAttribute(info.moduleName, "contextPath");



Mime
View raw message