geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r802422 - in /geronimo/server/trunk/plugins: j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/ jasper/geronimo-jasper-builder/ jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deploymen...
Date Sat, 08 Aug 2009 17:13:26 GMT
Author: djencks
Date: Sat Aug  8 17:13:25 2009
New Revision: 802422

URL: http://svn.apache.org/viewvc?rev=802422&view=rev
Log:
GERONIMO-4788 don't require a jasper dependency on web apps in jetty

Modified:
    geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
    geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/pom.xml
    geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-builder/src/main/java/org/apache/geronimo/jetty7/deployment/JettyModuleBuilder.java

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java?rev=802422&r1=802421&r2=802422&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
Sat Aug  8 17:13:25 2009
@@ -115,6 +115,13 @@
  * @version $Rev$ $Date$
  */
 public abstract class AbstractWebModuleBuilder implements ModuleBuilder {
+
+    public final static NamingBuilder.Key<GBeanData> DEFAULT_JSP_SERVLET_KEY = new
NamingBuilder.Key<GBeanData>() {
+        public GBeanData get(Map context) {
+            return (GBeanData) context.get(this);
+        }
+
+    };
     private static final Logger log = LoggerFactory.getLogger(AbstractWebModuleBuilder.class);
 
     private static final QName TAGLIB = new QName(SchemaConversionUtils.JAVAEE_NAMESPACE,
"taglib");

Modified: geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/pom.xml?rev=802422&r1=802421&r2=802422&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/pom.xml (original)
+++ geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/pom.xml Sat Aug  8 17:13:25
2009
@@ -38,7 +38,12 @@
             <artifactId>geronimo-j2ee-builder</artifactId>
             <version>${version}</version>
         </dependency>
-        
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-web-2.5-builder</artifactId>
+            <version>${version}</version>
+        </dependency>
+
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-jasper</artifactId>

Modified: geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java?rev=802422&r1=802421&r2=802422&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
(original)
+++ geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
Sat Aug  8 17:13:25 2009
@@ -61,6 +61,7 @@
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.schema.SchemaConversionUtils;
+import org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder;
 import org.apache.geronimo.xbeans.javaee.FullyQualifiedClassType;
 import org.apache.geronimo.xbeans.javaee.JspConfigType;
 import org.apache.geronimo.xbeans.javaee.ListenerType;
@@ -125,6 +126,14 @@
 
         EARContext moduleContext = module.getEarContext();
         Map sharedContext = module.getSharedContext();
+        GBeanData jspServletData = AbstractWebModuleBuilder.DEFAULT_JSP_SERVLET_KEY.get(sharedContext);
+        if (jspServletData != null) {
+            try {
+                moduleContext.addGBean(jspServletData);
+            } catch (GBeanAlreadyExistsException e) {
+                throw new DeploymentException("jsp servlet already present", e);
+            }
+        }
 
         GBeanData webAppData = (GBeanData) sharedContext.get(WebModule.WEB_APP_DATA);
 

Modified: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-builder/src/main/java/org/apache/geronimo/jetty7/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-builder/src/main/java/org/apache/geronimo/jetty7/deployment/JettyModuleBuilder.java?rev=802422&r1=802421&r2=802422&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-builder/src/main/java/org/apache/geronimo/jetty7/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-builder/src/main/java/org/apache/geronimo/jetty7/deployment/JettyModuleBuilder.java
Sat Aug  8 17:13:25 2009
@@ -462,6 +462,7 @@
                 Set<String> jspMappings = (Set<String>) jspServletData.getAttribute("servletMappings");
                 jspMappings.addAll(knownServletMappings);
                 jspServletData.setAttribute("servletMappings", jspMappings);
+                module.getSharedContext().put(DEFAULT_JSP_SERVLET_KEY, jspServletData);
             }
 
             // configure login configs.
@@ -597,7 +598,6 @@
         Set<String> defaultServletMappings = new HashSet<String>((Collection<String>)
servletGBeanData.getAttribute("servletMappings"));
         defaultServletMappings.removeAll(knownServletMappings);
         servletGBeanData.setAttribute("servletMappings", defaultServletMappings);
-        moduleContext.addGBean(servletGBeanData);
         return servletGBeanData;
     }
 



Mime
View raw message