geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r514224 - /geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Date Sat, 03 Mar 2007 19:34:53 GMT
Author: jgenender
Date: Sat Mar  3 11:34:53 2007
New Revision: 514224

URL: http://svn.apache.org/viewvc?view=rev&rev=514224
Log:
Allow plan context-root to override an application.xml version. In particular its for ears
that do not contain an application.xml

Modified:
    geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.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=514224&r1=514223&r2=514224
==============================================================================
--- 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
Sat Mar  3 11:34:53 2007
@@ -158,10 +158,12 @@
         // parse vendor dd
         TomcatWebAppType tomcatWebApp = getTomcatWebApp(plan, moduleFile, standAlone, targetPath,
webApp);
 
-        if (contextRoot == null || contextRoot.trim().equals("")) {
-            if (tomcatWebApp.isSetContextRoot()) {
-                contextRoot = tomcatWebApp.getContextRoot();
-            } else {
+        //If we have a context root, override everything
+        if (tomcatWebApp.isSetContextRoot()) {
+            contextRoot = tomcatWebApp.getContextRoot();
+        } else {
+            //Otherwise if no contextRoot was passed in from the ear, then make up a default
+            if (contextRoot == null || contextRoot.trim().equals("")) {
                 contextRoot = determineDefaultContextRoot(webApp, standAlone, moduleFile,
targetPath);
             }
         }
@@ -296,7 +298,7 @@
 
                 WebAppDocument doc = WebAppDocument.Factory.newInstance();
                 doc.setWebApp(webApp);
-                
+
                 outFile.write(doc.xmlText(opts));
                 outFile.flush();
                 outFile.close();
@@ -304,7 +306,7 @@
                 throw new DeploymentException(e);
             }
         }
-        
+
         TomcatWebAppType tomcatWebApp = (TomcatWebAppType) webModule.getVendorDD();
 
         GBeanData webModuleData = new GBeanData(moduleName, TomcatWebAppContext.GBEAN_INFO);



Mime
View raw message