geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r522036 [1/2] - in /geronimo/server/trunk: ./ assemblies/geronimo-jetty6-jee5/ assemblies/geronimo-jetty6-jee5/src/main/resources/var/config/ assemblies/geronimo-tomcat6-jee5/ configs/ configs/ca-helper-jetty/ configs/ca-helper-tomcat/ conf...
Date Sat, 24 Mar 2007 14:38:07 GMT
Author: djencks
Date: Sat Mar 24 07:38:03 2007
New Revision: 522036

URL: http://svn.apache.org/viewvc?view=rev&rev=522036
Log:
GERONIMO-2965 GERONIMO-3008 GERONIMO-3010 Tomcat annotation processing with lots of other improvements.  Uses LifecycleProvider interface proposed in GERONIMO-3010

Added:
    geronimo/server/trunk/configs/jasper-deployer/
      - copied from r521122, geronimo/server/trunk/configs/jasper/
    geronimo/server/trunk/configs/jasper-deployer/LICENSE.txt
      - copied unchanged from r522034, geronimo/server/trunk/configs/jasper/LICENSE.txt
    geronimo/server/trunk/configs/jasper-deployer/NOTICE.txt
      - copied unchanged from r522034, geronimo/server/trunk/configs/jasper/NOTICE.txt
    geronimo/server/trunk/configs/jasper-deployer/pom.xml
      - copied, changed from r522034, geronimo/server/trunk/configs/jasper/pom.xml
    geronimo/server/trunk/configs/jasper-deployer/src/
      - copied from r522034, geronimo/server/trunk/configs/jasper/src/
    geronimo/server/trunk/modules/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/RuntimeCustomizer.java   (with props)
    geronimo/server/trunk/modules/geronimo-jasper-builder/
      - copied from r520729, geronimo/server/trunk/modules/geronimo-myfaces-builder/
    geronimo/server/trunk/modules/geronimo-jasper-builder/LICENSE.txt
      - copied unchanged from r522034, geronimo/server/trunk/modules/geronimo-myfaces-builder/LICENSE.txt
    geronimo/server/trunk/modules/geronimo-jasper-builder/NOTICE.txt
      - copied unchanged from r522034, geronimo/server/trunk/modules/geronimo-myfaces-builder/NOTICE.txt
    geronimo/server/trunk/modules/geronimo-jasper-builder/pom.xml
      - copied, changed from r522034, geronimo/server/trunk/modules/geronimo-myfaces-builder/pom.xml
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/
      - copied from r522034, geronimo/server/trunk/modules/geronimo-myfaces-builder/src/
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java   (with props)
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java   (with props)
    geronimo/server/trunk/modules/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperServletContextCustomizer.java   (with props)
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatLifecycleProvider.java   (with props)
    geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/BasicTest.java   (with props)
    geronimo/server/trunk/repository/org/apache/
    geronimo/server/trunk/repository/org/apache/tomcat/
    geronimo/server/trunk/repository/org/apache/tomcat/catalina/
    geronimo/server/trunk/repository/org/apache/tomcat/catalina/6.0-G521891/
    geronimo/server/trunk/repository/org/apache/tomcat/catalina/6.0-G521891/catalina-6.0-G521891.jar   (with props)
    geronimo/server/trunk/repository/org/apache/tomcat/catalina/6.0-G521891/catalina-6.0-G521891.jar.md5
    geronimo/server/trunk/repository/org/apache/tomcat/jasper/
    geronimo/server/trunk/repository/org/apache/tomcat/jasper/6.0-G521891/
    geronimo/server/trunk/repository/org/apache/tomcat/jasper/6.0-G521891/jasper-6.0-G521891.jar   (with props)
    geronimo/server/trunk/repository/org/apache/tomcat/jasper/6.0-G521891/jasper-6.0-G521891.jar.md5
Removed:
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/myfaces/
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/myfaces/
Modified:
    geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/pom.xml
    geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/src/main/resources/var/config/config.xml
    geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/pom.xml
    geronimo/server/trunk/configs/ca-helper-jetty/pom.xml
    geronimo/server/trunk/configs/ca-helper-tomcat/pom.xml
    geronimo/server/trunk/configs/dojo-jetty6/pom.xml
    geronimo/server/trunk/configs/dojo-tomcat/pom.xml
    geronimo/server/trunk/configs/jasper-deployer/src/plan/plan.xml
    geronimo/server/trunk/configs/jetty6/pom.xml
    geronimo/server/trunk/configs/jsp-examples-jetty/pom.xml
    geronimo/server/trunk/configs/jsp-examples-tomcat/pom.xml
    geronimo/server/trunk/configs/pom.xml
    geronimo/server/trunk/configs/remote-deploy-jetty/pom.xml
    geronimo/server/trunk/configs/remote-deploy-tomcat/pom.xml
    geronimo/server/trunk/configs/tomcat6/pom.xml
    geronimo/server/trunk/configs/uddi-jetty6/pom.xml
    geronimo/server/trunk/configs/uddi-tomcat/pom.xml
    geronimo/server/trunk/configs/webconsole-jetty6/pom.xml
    geronimo/server/trunk/configs/webconsole-tomcat/pom.xml
    geronimo/server/trunk/configs/welcome-jetty/pom.xml
    geronimo/server/trunk/configs/welcome-tomcat/pom.xml
    geronimo/server/trunk/modules/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java
    geronimo/server/trunk/modules/geronimo-jasper/pom.xml
    geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/InternalJettyServletHolder.java
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/resources/META-INF/geronimo-dependency.xml
    geronimo/server/trunk/modules/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java
    geronimo/server/trunk/modules/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
    geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/resources/META-INF/geronimo-dependency.xml
    geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
    geronimo/server/trunk/modules/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
    geronimo/server/trunk/modules/pom.xml
    geronimo/server/trunk/pom.xml
    geronimo/server/trunk/repository/pom.xml

Modified: geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/pom.xml (original)
+++ geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/pom.xml Sat Mar 24 07:38:03 2007
@@ -207,13 +207,27 @@
 
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
-            <artifactId>myfaces</artifactId>
+            <artifactId>jasper</artifactId>
             <version>${version}</version>
             <type>car</type>
         </dependency>
         
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>myfaces</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>myfaces-deployer</artifactId>
             <version>${version}</version>
             <type>car</type>
@@ -288,12 +302,14 @@
             <version>${version}</version>
             <type>car</type>
         </dependency>
+        
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>axis2-deployer</artifactId>
             <version>${version}</version>
             <type>car</type>
         </dependency>
+        
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>cxf-deployer</artifactId>
@@ -367,6 +383,20 @@
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>sharedlib</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jsr88-cli</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jsr88-deploymentfactory</artifactId>
             <version>${version}</version>
             <type>car</type>
         </dependency>

Modified: geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/src/main/resources/var/config/config.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/src/main/resources/var/config/config.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/src/main/resources/var/config/config.xml (original)
+++ geronimo/server/trunk/assemblies/geronimo-jetty6-jee5/src/main/resources/var/config/config.xml Sat Mar 24 07:38:03 2007
@@ -29,7 +29,7 @@
     <module name="org.apache.geronimo.configs/rmi-naming/${version}/car">
         <gbean name="RMIRegistry">
             <attribute name="port">${PlanNamingPort}</attribute>
-        </gbean>
+        </gbean>                                                    
         <gbean name="NamingProperties">
             <!-- Check whether this really works if host name is 0.0.0.0 -->
             <attribute name="namingProviderUrl">rmi://${PlanServerHostname}:${PlanNamingPort}</attribute>
@@ -87,7 +87,8 @@
 
     <module name="org.apache.geronimo.configs/activemq-ra/${version}/car"/>
 
-    <module name="org.apache.geronimo.configs/myfaces/${version}/car"/>
+    <module name="org.apache.geronimo.configs/jasper/${version}/car" load="false"/>
+    <module name="org.apache.geronimo.configs/myfaces/${version}/car" load="false"/>
 
     <module name="org.apache.geronimo.configs/jetty6/${version}/car">
         <gbean name="JettyWebConnector">
@@ -216,7 +217,7 @@
     </module>
 
     <module name="org.apache.geronimo.configs/jetty6-deployer/${version}/car"/>
-        
+    <module name="org.apache.geronimo.configs/jasper-deployer/${version}/car"/>
     <module name="org.apache.geronimo.configs/myfaces-deployer/${version}/car"/>
 
     <module name="org.apache.geronimo.configs/welcome-jetty/${version}/car"/>

Modified: geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/pom.xml (original)
+++ geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/pom.xml Sat Mar 24 07:38:03 2007
@@ -193,13 +193,27 @@
 
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
-            <artifactId>myfaces</artifactId>
+            <artifactId>jasper</artifactId>
             <version>${version}</version>
             <type>car</type>
         </dependency>
         
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>myfaces</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>myfaces-deployer</artifactId>
             <version>${version}</version>
             <type>car</type>
@@ -393,7 +407,7 @@
             <version>${version}</version>
             <type>car</type>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>jsr88-ear-configurer</artifactId>

Modified: geronimo/server/trunk/configs/ca-helper-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/ca-helper-jetty/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/ca-helper-jetty/pom.xml (original)
+++ geronimo/server/trunk/configs/ca-helper-jetty/pom.xml Sat Mar 24 07:38:03 2007
@@ -50,6 +50,20 @@
             <type>car</type>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
     </dependencies>
     
     <build>
@@ -69,6 +83,7 @@
                         <deploymentConfig>${gbeanDeployer}</deploymentConfig>
                         <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                         <deploymentConfig>${jetty6Deployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
                     </deploymentConfigs>
                     <module>
                         <groupId>org.apache.geronimo.applications</groupId>

Modified: geronimo/server/trunk/configs/ca-helper-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/ca-helper-tomcat/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/ca-helper-tomcat/pom.xml (original)
+++ geronimo/server/trunk/configs/ca-helper-tomcat/pom.xml Sat Mar 24 07:38:03 2007
@@ -50,6 +50,20 @@
             <type>car</type>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
     </dependencies>
     
     <build>
@@ -69,6 +83,7 @@
                         <deploymentConfig>${gbeanDeployer}</deploymentConfig>
                         <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                         <deploymentConfig>${tomcatDeployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
                     </deploymentConfigs>
                     <module>
                         <groupId>org.apache.geronimo.applications</groupId>

Modified: geronimo/server/trunk/configs/dojo-jetty6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/dojo-jetty6/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/dojo-jetty6/pom.xml (original)
+++ geronimo/server/trunk/configs/dojo-jetty6/pom.xml Sat Mar 24 07:38:03 2007
@@ -44,6 +44,13 @@
         
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>jetty6-deployer</artifactId>
             <version>${version}</version>
             <type>car</type>

Modified: geronimo/server/trunk/configs/dojo-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/dojo-tomcat/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/dojo-tomcat/pom.xml (original)
+++ geronimo/server/trunk/configs/dojo-tomcat/pom.xml Sat Mar 24 07:38:03 2007
@@ -44,6 +44,13 @@
         
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>tomcat6-deployer</artifactId>
             <version>${version}</version>
             <type>car</type>

Copied: geronimo/server/trunk/configs/jasper-deployer/pom.xml (from r522034, geronimo/server/trunk/configs/jasper/pom.xml)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jasper-deployer/pom.xml?view=diff&rev=522036&p1=geronimo/server/trunk/configs/jasper/pom.xml&r1=522034&p2=geronimo/server/trunk/configs/jasper-deployer/pom.xml&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/jasper/pom.xml (original)
+++ geronimo/server/trunk/configs/jasper-deployer/pom.xml Sat Mar 24 07:38:03 2007
@@ -29,100 +29,32 @@
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>jasper</artifactId>
-    <name>Geronimo Configs :: Jasper</name>
+    <artifactId>jasper-deployer</artifactId>
+    <name>Geronimo Configs :: Jasper Deployer</name>
     <packaging>car</packaging>
 
     <dependencies>
 
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
-            <artifactId>j2ee-server</artifactId>
+            <artifactId>j2ee-deployer</artifactId>
             <version>${version}</version>
             <type>car</type>
         </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
-            <artifactId>j2ee-security</artifactId>
-            <version>${version}</version>
-            <type>car</type>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.configs</groupId>
-            <artifactId>transaction-jta11</artifactId>
+            <artifactId>jasper</artifactId>
             <version>${version}</version>
             <type>car</type>
+            <scope>runtime</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-jasper</artifactId>
+            <artifactId>geronimo-jasper-builder</artifactId>
             <version>${version}</version>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.tomcat</groupId>
-            <artifactId>jasper</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tomcat</groupId>
-            <artifactId>jasper-jdt</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tomcat</groupId>
-            <artifactId>jasper-el</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tomcat.extras</groupId>
-            <artifactId>juli-adapters</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tomcat.extras</groupId>
-            <artifactId>juli</artifactId>
-        </dependency>
-
-        <!-- start myfaces dependencies -->
-
-        <!--<dependency>-->
-            <!--<groupId>org.apache.myfaces.core</groupId>-->
-            <!--<artifactId>myfaces-impl</artifactId>-->
-        <!--</dependency>-->
-
-<!--
-        <dependency>
-            <groupId>commons-collections</groupId>
-            <artifactId>commons-collections</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-digester</groupId>
-            <artifactId>commons-digester</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-beanutils</groupId>
-            <artifactId>commons-beanutils</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-discovery</groupId>
-            <artifactId>commons-discovery</artifactId>
-        </dependency>
-
--->
-        <!-- end myfaces dependencies -->
-
     </dependencies>
 
 </project>

Modified: geronimo/server/trunk/configs/jasper-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jasper-deployer/src/plan/plan.xml?view=diff&rev=522036&r1=522034&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/jasper-deployer/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/jasper-deployer/src/plan/plan.xml Sat Mar 24 07:38:03 2007
@@ -20,4 +20,22 @@
 
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
 
+    <gbean name="JspModuleBuilderExtension" class="org.apache.geronimo.jasper.deployment.JspModuleBuilderExtension">
+        <reference name="NamingBuilders">
+            <name>NamingBuilders</name>
+        </reference>
+        <xml-attribute name="defaultEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.geronimo.configs</groupId>
+                        <artifactId>jasper</artifactId>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
+    </gbean>
+
+
 </module>

Modified: geronimo/server/trunk/configs/jetty6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty6/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/jetty6/pom.xml (original)
+++ geronimo/server/trunk/configs/jetty6/pom.xml Sat Mar 24 07:38:03 2007
@@ -85,12 +85,12 @@
             <artifactId>xercesImpl</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.geronimo.configs</groupId>
-            <artifactId>jasper</artifactId>
-            <type>car</type>
-            <version>${version}</version>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.apache.geronimo.configs</groupId>-->
+            <!--<artifactId>jasper</artifactId>-->
+            <!--<type>car</type>-->
+            <!--<version>${version}</version>-->
+        <!--</dependency>-->
 
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>

Modified: geronimo/server/trunk/configs/jsp-examples-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jsp-examples-jetty/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/jsp-examples-jetty/pom.xml (original)
+++ geronimo/server/trunk/configs/jsp-examples-jetty/pom.xml Sat Mar 24 07:38:03 2007
@@ -57,6 +57,19 @@
             <type>car</type>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
     </dependencies>
     
     <build>
@@ -76,6 +89,7 @@
                         <deploymentConfig>${gbeanDeployer}</deploymentConfig>
                         <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                         <deploymentConfig>${jetty6Deployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
                     </deploymentConfigs>
                     <module>
                         <groupId>org.apache.geronimo.applications.examples</groupId>

Modified: geronimo/server/trunk/configs/jsp-examples-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jsp-examples-tomcat/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/jsp-examples-tomcat/pom.xml (original)
+++ geronimo/server/trunk/configs/jsp-examples-tomcat/pom.xml Sat Mar 24 07:38:03 2007
@@ -49,6 +49,19 @@
             <type>car</type>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
     </dependencies>
     
     <build>
@@ -68,6 +81,7 @@
                         <deploymentConfig>${gbeanDeployer}</deploymentConfig>
                         <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                         <deploymentConfig>${tomcatDeployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
                     </deploymentConfigs>
                     <module>
                         <groupId>org.apache.geronimo.applications.examples</groupId>

Modified: geronimo/server/trunk/configs/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/pom.xml (original)
+++ geronimo/server/trunk/configs/pom.xml Sat Mar 24 07:38:03 2007
@@ -49,6 +49,7 @@
         <axis2Deployer>org.apache.geronimo.configs/axis2-deployer/${version}/car</axis2Deployer>
         <tomcatDeployer>org.apache.geronimo.configs/tomcat6-deployer/${version}/car</tomcatDeployer>
         <jetty6Deployer>org.apache.geronimo.configs/jetty6-deployer/${version}/car</jetty6Deployer>
+        <jasperDeployer>org.apache.geronimo.configs/jasper-deployer/${version}/car</jasperDeployer>
 
         <!-- Common plan properties -->
         <PlanServerHostname>0.0.0.0</PlanServerHostname>
@@ -187,6 +188,7 @@
         <module>webconsole-jetty6</module>
         <module>webservices-common</module>
         <module>jasper</module>
+        <module>jasper-deployer</module>
     </modules>
 
 </project>

Modified: geronimo/server/trunk/configs/remote-deploy-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/remote-deploy-jetty/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/remote-deploy-jetty/pom.xml (original)
+++ geronimo/server/trunk/configs/remote-deploy-jetty/pom.xml Sat Mar 24 07:38:03 2007
@@ -57,6 +57,13 @@
         
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>jetty6-deployer</artifactId>
             <version>${version}</version>
             <type>car</type>
@@ -75,6 +82,7 @@
                         <deploymentConfig>${gbeanDeployer}</deploymentConfig>
                         <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                         <deploymentConfig>${jetty6Deployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
                     </deploymentConfigs>
                     <module>
                         <groupId>org.apache.geronimo.applications</groupId>

Modified: geronimo/server/trunk/configs/remote-deploy-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/remote-deploy-tomcat/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/remote-deploy-tomcat/pom.xml (original)
+++ geronimo/server/trunk/configs/remote-deploy-tomcat/pom.xml Sat Mar 24 07:38:03 2007
@@ -49,6 +49,13 @@
         
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>tomcat6-deployer</artifactId>
             <version>${version}</version>
             <type>car</type>
@@ -67,6 +74,7 @@
                         <deploymentConfig>${gbeanDeployer}</deploymentConfig>
                         <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                         <deploymentConfig>${tomcatDeployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
                     </deploymentConfigs>
                     <module>
                         <groupId>org.apache.geronimo.applications</groupId>

Modified: geronimo/server/trunk/configs/tomcat6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/tomcat6/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/tomcat6/pom.xml (original)
+++ geronimo/server/trunk/configs/tomcat6/pom.xml Sat Mar 24 07:38:03 2007
@@ -62,6 +62,7 @@
             <version>${version}</version>
         </dependency>
 
+        <!-- Required because tomcat and jasper share the LifecycleProvider interface, or AnnotationProcessor -->
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>jasper</artifactId>

Modified: geronimo/server/trunk/configs/uddi-jetty6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/uddi-jetty6/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/uddi-jetty6/pom.xml (original)
+++ geronimo/server/trunk/configs/uddi-jetty6/pom.xml Sat Mar 24 07:38:03 2007
@@ -87,6 +87,20 @@
             <scope>provided</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
     </dependencies>
     
     <build>
@@ -100,6 +114,7 @@
                         <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                         <deploymentConfig>${jetty6Deployer}</deploymentConfig>
                         <deploymentConfig>${connectorDeployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
                     </deploymentConfigs>
                 </configuration>
             </plugin>

Modified: geronimo/server/trunk/configs/uddi-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/uddi-tomcat/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/uddi-tomcat/pom.xml (original)
+++ geronimo/server/trunk/configs/uddi-tomcat/pom.xml Sat Mar 24 07:38:03 2007
@@ -107,6 +107,20 @@
             <type>car</type>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
     </dependencies>
     
     <build>
@@ -120,6 +134,7 @@
                         <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                         <deploymentConfig>${tomcatDeployer}</deploymentConfig>
                         <deploymentConfig>${connectorDeployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
                     </deploymentConfigs>
                 </configuration>
             </plugin>

Modified: geronimo/server/trunk/configs/webconsole-jetty6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/webconsole-jetty6/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/webconsole-jetty6/pom.xml (original)
+++ geronimo/server/trunk/configs/webconsole-jetty6/pom.xml Sat Mar 24 07:38:03 2007
@@ -37,6 +37,20 @@
 
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>j2ee-server</artifactId>
             <version>${version}</version>
             <type>car</type>
@@ -196,6 +210,7 @@
                         <deploymentConfig>${gbeanDeployer}</deploymentConfig>
                         <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                         <deploymentConfig>${jetty6Deployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
                     </deploymentConfigs>
                     <module>
                         <groupId>org.apache.geronimo.applications.console</groupId>

Modified: geronimo/server/trunk/configs/webconsole-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/webconsole-tomcat/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/webconsole-tomcat/pom.xml (original)
+++ geronimo/server/trunk/configs/webconsole-tomcat/pom.xml Sat Mar 24 07:38:03 2007
@@ -34,7 +34,21 @@
     <packaging>car</packaging>
 
     <dependencies>
-        
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>j2ee-server</artifactId>
@@ -212,6 +226,7 @@
                         <deploymentConfig>${gbeanDeployer}</deploymentConfig>
                         <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                         <deploymentConfig>${tomcatDeployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
                     </deploymentConfigs>
                     <module>
                         <groupId>org.apache.geronimo.applications.console</groupId>

Modified: geronimo/server/trunk/configs/welcome-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/welcome-jetty/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/welcome-jetty/pom.xml (original)
+++ geronimo/server/trunk/configs/welcome-jetty/pom.xml Sat Mar 24 07:38:03 2007
@@ -57,6 +57,20 @@
             <type>car</type>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
     </dependencies>
     
     <build>
@@ -76,6 +90,7 @@
                         <deploymentConfig>${gbeanDeployer}</deploymentConfig>
                         <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                         <deploymentConfig>${jetty6Deployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
                     </deploymentConfigs>
                     <module>
                         <groupId>org.apache.geronimo.applications</groupId>

Modified: geronimo/server/trunk/configs/welcome-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/welcome-tomcat/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/configs/welcome-tomcat/pom.xml (original)
+++ geronimo/server/trunk/configs/welcome-tomcat/pom.xml Sat Mar 24 07:38:03 2007
@@ -49,6 +49,20 @@
             <type>car</type>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
     </dependencies>
     
     <build>
@@ -68,6 +82,7 @@
                         <deploymentConfig>${gbeanDeployer}</deploymentConfig>
                         <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                         <deploymentConfig>${tomcatDeployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
                     </deploymentConfigs>
                     <module>
                         <groupId>org.apache.geronimo.applications</groupId>

Modified: geronimo/server/trunk/modules/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/modules/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java (original)
+++ geronimo/server/trunk/modules/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java Sat Mar 24 07:38:03 2007
@@ -219,15 +219,19 @@
 
         while (cursor.hasNextToken()) {
             if (cursor.isStart()) {
-                //convert namespace of each starting element
-                cursor.setName(new QName(namespace, cursor.getName().getLocalPart()));
                 if (isFirstStart) {
+                    //HACK to work around digester's difficulty with namespaces
+                    if (cursor.getAttributeText(new QName("xmlns")) != null) {
+                        cursor.removeAttribute(new QName("xmlns"));
+                    }
                     //if we are at the first element in the document, reset the version number ...
                     cursor.setAttributeText(new QName("version"), version);
                     //... and also set the xsi:schemaLocation
                     cursor.setAttributeText(new QName("http://www.w3.org/2001/XMLSchema-instance", "schemaLocation", "xsi"), namespace + "  "+schemaLocationURL);
                     isFirstStart = false;
                 }
+                //convert namespace of each starting element
+                cursor.setName(new QName(namespace, cursor.getName().getLocalPart()));
                 cursor.toNextToken();
 
             } else {
@@ -250,6 +254,12 @@
         moveElements("description", namespace, moveable, cursor);
         moveElements("display-name", namespace, moveable, cursor);
         moveElements("icon", namespace, moveable, cursor);
+    }
+
+    public static void convertToTagRoot(String namespace, XmlCursor cursor, XmlCursor moveable) {
+        moveable.toCursor(cursor);
+        moveElements("description", namespace, moveable, cursor);
+        moveElements("name", namespace, moveable, cursor);
     }
 
     public static void convertToJNDIEnvironmentRefsGroup(String namespace, XmlCursor cursor, XmlCursor moveable) {

Added: geronimo/server/trunk/modules/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/RuntimeCustomizer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/RuntimeCustomizer.java?view=auto&rev=522036
==============================================================================
--- geronimo/server/trunk/modules/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/RuntimeCustomizer.java (added)
+++ geronimo/server/trunk/modules/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/RuntimeCustomizer.java Sat Mar 24 07:38:03 2007
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.j2ee;
+
+import java.util.Map;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public interface RuntimeCustomizer {
+    void customize(Map<Class, Object> context);
+}

Propchange: geronimo/server/trunk/modules/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/RuntimeCustomizer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/modules/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/RuntimeCustomizer.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/modules/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/RuntimeCustomizer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/server/trunk/modules/geronimo-jasper-builder/pom.xml (from r522034, geronimo/server/trunk/modules/geronimo-myfaces-builder/pom.xml)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/pom.xml?view=diff&rev=522036&p1=geronimo/server/trunk/modules/geronimo-myfaces-builder/pom.xml&r1=522034&p2=geronimo/server/trunk/modules/geronimo-jasper-builder/pom.xml&r2=522036
==============================================================================
--- geronimo/server/trunk/modules/geronimo-myfaces-builder/pom.xml (original)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/pom.xml Sat Mar 24 07:38:03 2007
@@ -29,8 +29,8 @@
         <relativePath>../pom.xml</relativePath>
     </parent>
     
-    <artifactId>geronimo-myfaces-builder</artifactId>
-    <name>Geronimo :: MyFaces Builder</name>
+    <artifactId>geronimo-jasper-builder</artifactId>
+    <name>Geronimo :: Jasper Builder</name>
     
     <dependencies>
         <dependency>
@@ -41,7 +41,7 @@
         
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-myfaces</artifactId>
+            <artifactId>geronimo-jasper</artifactId>
             <version>${version}</version>
         </dependency>
         

Added: geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java?view=auto&rev=522036
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java (added)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java Sat Mar 24 07:38:03 2007
@@ -0,0 +1,669 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.jasper.deployment;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.JarURLConnection;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+import javax.xml.namespace.QName;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.ModuleIDBuilder;
+import org.apache.geronimo.deployment.service.EnvironmentBuilder;
+import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.annotation.Holder;
+import org.apache.geronimo.j2ee.deployment.EARContext;
+import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.deployment.ModuleBuilderExtension;
+import org.apache.geronimo.j2ee.deployment.NamingBuilder;
+import org.apache.geronimo.j2ee.deployment.WebModule;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.jasper.JasperServletContextCustomizer;
+import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.config.Configuration;
+import org.apache.geronimo.kernel.config.ConfigurationStore;
+import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.schema.SchemaConversionUtils;
+import org.apache.geronimo.xbeans.javaee.FullyQualifiedClassType;
+import org.apache.geronimo.xbeans.javaee.JspConfigType;
+import org.apache.geronimo.xbeans.javaee.ListenerType;
+import org.apache.geronimo.xbeans.javaee.TagType;
+import org.apache.geronimo.xbeans.javaee.TaglibDocument;
+import org.apache.geronimo.xbeans.javaee.TaglibType;
+import org.apache.geronimo.xbeans.javaee.TldTaglibType;
+import org.apache.geronimo.xbeans.javaee.WebAppType;
+import org.apache.xbean.finder.ClassFinder;
+import org.apache.xmlbeans.XmlCursor;
+import org.apache.xmlbeans.XmlException;
+import org.apache.xmlbeans.XmlObject;
+
+/**
+ * This JSP module builder extension is meant to find all the TLD descriptor files associated with a
+ * deployable artifact, search those TLD files for listeners, search those listeners for
+ * annotations, and ultimately create a ClassFinder using those annoated classes (for later
+ * processing by the various naming builders)
+ *
+ * @version $Rev $Date
+ */
+public class JspModuleBuilderExtension implements ModuleBuilderExtension {
+
+    private static final Log log = LogFactory.getLog(JspModuleBuilderExtension.class);
+
+    private final Environment defaultEnvironment;
+    private final NamingBuilder namingBuilders;
+
+    private static final QName TLIB_VERSION = new QName(SchemaConversionUtils.JAVAEE_NAMESPACE, "tlib-version");
+    private static final QName SHORT_NAME = new QName(SchemaConversionUtils.JAVAEE_NAMESPACE, "short-name");
+    private static final QName TAG_CLASS = new QName(SchemaConversionUtils.JAVAEE_NAMESPACE, "tag-class");
+    private static final QName TEI_CLASS = new QName(SchemaConversionUtils.JAVAEE_NAMESPACE, "tei-class");
+    private static final QName BODY_CONTENT = new QName(SchemaConversionUtils.JAVAEE_NAMESPACE, "body-content");
+
+    private static final String SCHEMA_LOCATION_URL = "http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";
+    private static final String VERSION = "2.1";
+
+    public JspModuleBuilderExtension(Environment defaultEnvironment, NamingBuilder namingBuilders) {
+        this.defaultEnvironment = defaultEnvironment;
+        this.namingBuilders = namingBuilders;
+    }
+
+    public void createModule(Module module, Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+    }
+
+    public void installModule(JarFile earFile, EARContext earContext, Module module, Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repository) throws DeploymentException {
+    }
+
+    public void initContext(EARContext earContext, Module module, ClassLoader cl) throws DeploymentException {
+    }
+
+    public void addGBeans(EARContext earContext, Module module, ClassLoader cl, Collection repository) throws DeploymentException {
+        if (!(module instanceof WebModule)) {
+            //not a web module, nothing to do
+            return;
+        }
+        //TODO Only merge if we detect jsps???
+        EnvironmentBuilder.mergeEnvironments(module.getEnvironment(), defaultEnvironment);
+
+        WebModule webModule = (WebModule) module;
+        WebAppType webApp = (WebAppType) webModule.getSpecDD();
+
+        EARContext moduleContext = module.getEarContext();
+        Map sharedContext = module.getSharedContext();
+
+        GBeanData webAppData = (GBeanData) sharedContext.get(WebModule.WEB_APP_DATA);
+
+        AbstractName moduleName = moduleContext.getModuleName();
+        Map<NamingBuilder.Key, Object> buildingContext = new HashMap<NamingBuilder.Key, Object>();
+        buildingContext.put(NamingBuilder.GBEAN_NAME_KEY, moduleName);
+
+        //use the same jndi context as the web app
+        Map compContext = NamingBuilder.JNDI_KEY.get(sharedContext);
+        buildingContext.put(NamingBuilder.JNDI_KEY, compContext);
+
+        //use the same holder object as the web app.
+        Holder holder = NamingBuilder.INJECTION_KEY.get(sharedContext);
+        buildingContext.put(NamingBuilder.INJECTION_KEY, holder);
+
+        XmlObject jettyWebApp = webModule.getVendorDD();
+
+        Configuration earConfiguration = earContext.getConfiguration();
+
+        Set<String> listenerNames = new HashSet<String>();
+
+        ClassFinder classFinder = createJspClassFinder(webApp, webModule, listenerNames);
+        webModule.setClassFinder(classFinder);
+
+        namingBuilders.buildNaming(webApp, jettyWebApp, earConfiguration, earConfiguration, webModule, buildingContext);
+
+        //only try to install it if reference will work.
+        //Some users (tomcat?) may have back doors into jasper that make adding this gbean unnecessary.
+        GBeanInfo webAppGBeanInfo = webAppData.getGBeanInfo();
+        if (webAppGBeanInfo.getReference("ContextCustomizer") != null) {
+            AbstractName jspLifecycleName = moduleContext.getNaming().createChildName(moduleName, "jspLifecycleProvider", NameFactory.GERONIMO_SERVICE);
+            GBeanData gbeanData = new GBeanData(jspLifecycleName, JasperServletContextCustomizer.GBEAN_INFO);
+            gbeanData.setAttribute("holder", holder);
+
+            try {
+                moduleContext.addGBean(gbeanData);
+            } catch (GBeanAlreadyExistsException e) {
+                throw new DeploymentException("Duplicate jspLifecycleProvider", e);
+            }
+
+            webAppData.setReferencePattern("ContextCustomizer", jspLifecycleName);
+        }
+        //add listeners if possible
+        //we may need to add them in another way for tomcat
+        Object value = webAppData.getAttribute("listenerClassNames");
+        if (value instanceof Collection) {
+            ((Collection<String>) value).addAll(listenerNames);
+        }
+    }
+
+    protected ClassFinder createJspClassFinder(WebAppType webApp, WebModule webModule, Set<String> listenerNames) throws DeploymentException {
+        List<URL> urls = getTldFiles(webApp, webModule);
+        List<Class> classes = getListenerClasses(webApp, webModule, urls, listenerNames);
+        return new ClassFinder(classes);
+    }
+
+
+    /**
+     * getTldFiles(): Find all the TLD files in the web module being deployed
+     *
+     * <p>Locations to search for these TLD file(s) (matches the precedence search order for TLD
+     * files per the JSP specs):
+     * <ol>
+     *      <li>web.xml <taglib> entries
+     *      <li>TLD(s) in JAR files in WEB-INF/lib
+     *      <li>TLD(s) under WEB-INF
+     *      <li>All TLD files in all META-INF(s)
+     * </ol>
+     *
+     * @param webApp    spec DD for module
+     * @param webModule module being deployed
+     * @return list of the URL(s) for the TLD files
+     * @throws DeploymentException if there's a problem finding a tld file
+     */
+    private List<URL> getTldFiles(WebAppType webApp, WebModule webModule) throws DeploymentException {
+        log.debug("getTldFiles( " + webApp.toString() + "," + webModule.getName() + " ): Entry");
+
+        List<URL> tldURLs = new ArrayList<URL>();
+
+        // 1. web.xml <taglib> entries
+        JspConfigType[] jspConfigs = webApp.getJspConfigArray();
+        for (JspConfigType jspConfig : jspConfigs) {
+            TaglibType[] taglibs = jspConfig.getTaglibArray();
+            for (TaglibType taglib : taglibs) {
+                String uri = taglib.getTaglibUri().getStringValue().trim();
+                String location = taglib.getTaglibLocation().getStringValue().trim();
+                if (!location.equals("")) {
+                    if (location.startsWith("/")) {
+                        location = location.substring(1);
+                    }
+                    try {
+                        URL url = DeploymentUtil.createJarURL(webModule.getModuleFile(), location);
+                        tldURLs.add(url);
+                    }
+                    catch (MalformedURLException mfe) {
+                        throw new DeploymentException("Could not locate TLD file specified in <taglib>: URI: " + uri + " Location: " + location + " " + mfe.getMessage());
+                    }
+                }
+            }
+        }
+
+        // 2. TLD(s) in JAR files in WEB-INF/lib
+        // 3. TLD(s) under WEB-INF
+        List<URL> tempURLs = scanModule(webModule);
+        for (URL webInfURL : tempURLs) {
+            tldURLs.add(webInfURL);
+        }
+
+        // 4. All TLD files in all META-INF(s)
+        tempURLs.clear();
+        try {
+            Enumeration<URL> enumURLs = webModule.getEarContext().getClassLoader().getResources("META-INF");
+            while (enumURLs.hasMoreElements()) {
+                URL enumURL = enumURLs.nextElement();
+                tempURLs = scanDirectory(enumURL);
+                for (URL metaInfURL : tempURLs) {
+                    tldURLs.add(metaInfURL);
+                }
+                tempURLs.clear();
+            }
+        }
+        catch (IOException ioe) {
+            throw new DeploymentException("Could not locate TLD files located in META-INF(s) " + ioe.getMessage());
+        }
+
+        log.debug("getTldFiles() Exit: URL[" + tldURLs.size() + "]: " + tldURLs.toString());
+        return tldURLs;
+    }
+
+
+    /**
+     * scanModule(): Scan the module being deployed for JAR files or TLD files in the WEB-INF
+     * directory
+     *
+     * @param webModule module being deployed
+     * @return list of the URL(s) for the TLD files in the module
+     * @throws DeploymentException if module cannot be scanned
+     */
+    private List<URL> scanModule(WebModule webModule) throws DeploymentException {
+        log.debug("scanModule( " + webModule.getName() + " ): Entry");
+
+        List<URL> modURLs = new ArrayList<URL>();
+        try {
+            Enumeration<JarEntry> entries = webModule.getModuleFile().entries();
+            while (entries.hasMoreElements()) {
+                JarEntry jarEntry = entries.nextElement();
+                if (jarEntry.getName().startsWith("WEB-INF/") && jarEntry.getName().endsWith(".tld")) {
+                    URL tempURL = getJarEntryURL(webModule.getModuleFile(), jarEntry);
+                    if (tempURL != null) {
+                        modURLs.add(tempURL);
+                    }
+                }
+                if (jarEntry.getName().startsWith("WEB-INF/lib/") && jarEntry.getName().endsWith(".jar")) {
+                    JarFile jarFile = createJarFile(webModule.getModuleFile(), jarEntry);
+                    List<URL> jarUrls = scanJAR(jarFile, null);
+                    for (URL jarURL : jarUrls) {
+                        modURLs.add(jarURL);
+                    }
+                }
+            }
+        }
+        catch (IOException ioe) {
+            throw new DeploymentException("Could not scan module for TLD files: " + webModule.getName() + " " + ioe.getMessage());
+        }
+        catch (Exception e) {
+            throw new DeploymentException("Could not scan module for TLD files: " + webModule.getName() + " " + e.getMessage());
+        }
+
+        log.debug("scanModule() Exit: URL[" + modURLs.size() + "]: " + modURLs.toString());
+        return modURLs;
+    }
+
+
+    /**
+     * scanJAR(): Scan a JAR files looking for all TLD
+     *
+     * @param jarFile jar file to scan
+     * @param prefix  Optional prefix to limit the search to a specific subdirectory in the JAR file
+     * @return list of the URL(s) for the TLD files in the JAR file
+     * @throws DeploymentException if jar file cannot be scanned
+     */
+    private List<URL> scanJAR(JarFile jarFile, String prefix) throws DeploymentException {
+        log.debug("scanJAR( " + jarFile.getName() + " ): Entry");
+
+        List<URL> jarURLs = new ArrayList<URL>();
+        try {
+            Enumeration<JarEntry> entries = jarFile.entries();
+            while (entries.hasMoreElements()) {
+                JarEntry jarEntry = entries.nextElement();
+                URL tempURL = null;
+                if (prefix != null) {
+                    if (jarEntry.getName().endsWith(".tld") && jarEntry.getName().startsWith(prefix)) {
+                        tempURL = getJarEntryURL(jarFile, jarEntry);
+                    }
+                } else {
+                    if (jarEntry.getName().endsWith(".tld")) {
+                        tempURL = getJarEntryURL(jarFile, jarEntry);
+                    }
+                }
+                if (tempURL != null) {
+                    jarURLs.add(tempURL);
+                }
+            }
+        }
+        catch (Exception e) {
+            throw new DeploymentException("Could not scan JAR file for TLD files: " + jarFile.getName() + " " + e.getMessage());
+        }
+
+        log.debug("scanJAR() Exit: URL[" + jarURLs.size() + "]: " + jarURLs.toString());
+        return jarURLs;
+    }
+
+
+    /**
+     * scanDirectory(): Scan a directory for all TLD files
+     *
+     * @param url URL for the directory to be scanned
+     * @return list of the URL(s) for the TLD files in the directory
+     * @throws DeploymentException if directory cannot be scanned
+     */
+    private List<URL> scanDirectory(URL url) throws DeploymentException {
+        log.debug("scanDirectory( " + url.toString() + " ): Entry");
+
+        List<URL> dirURLs = new ArrayList<URL>();
+        File directory;
+        if (url != null) {
+            if (url.toString().startsWith("jar:file:")) {
+                try {
+                    JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
+                    URL urlJC = jarConnection.getJarFileURL();
+
+                    URI baseURI = new URI(urlJC.toString());
+                    directory = new File(baseURI);
+                    if (directory.canRead()) {
+                        JarFile temp = new JarFile(directory);
+                        List<URL> tempURLs = scanJAR(temp, "META-INF");
+                        for (URL jarURL : tempURLs) {
+                            dirURLs.add(jarURL);
+                        }
+                    } else {
+                        log.warn("Cannot read JAR file: " + url.toString());
+                    }
+                }
+                catch (Exception e) {
+                    throw new DeploymentException("Could not scan directory for TLD files: " + url.toString() + " " + e.getMessage());
+                }
+            } else if (url.toString().startsWith("file:")) {
+                try {
+                    URI baseURI = new URI(url.toString());
+                    directory = new File(baseURI);
+                    if (directory.isDirectory() && directory.canRead()) {
+                        File[] children = directory.listFiles();
+                        for (File child : children) {
+                            if (child.getName().endsWith(".tld")) {
+                                dirURLs.add(child.toURL());
+                            }
+                        }
+                    } else {
+                        log.warn("Cannot read directory: " + url.toString());
+                    }
+                }
+                catch (Exception e) {
+                    throw new DeploymentException("Could not scan directory for TLD files: " + url.toString() + " " + e.getMessage());
+                }
+            } else if (url.toString().startsWith("jar:")) {
+                log.warn("URL type not accounted for: " + url.toString());
+            }
+        }
+
+        log.debug("scanDirectory() Exit: URL[" + dirURLs.size() + "]: " + dirURLs.toString());
+        return dirURLs;
+    }
+
+
+    private List<Class> getListenerClasses(WebAppType webApp, WebModule webModule, List<URL> urls, Set<String> listenerNames) throws DeploymentException {
+        log.debug("getListenerClasses( " + webApp.toString() + "," + '\n' +
+                webModule.getName() + " ): Entry");
+
+        // Get the classloader from the module's EARContext
+        ClassLoader classLoader = webModule.getEarContext().getClassLoader();
+        List<Class> classes = new ArrayList<Class>();
+
+        for (URL url : urls) {
+            parseTldFile(url, classLoader, classes, listenerNames);
+        }
+
+        log.debug("getListenerClasses() Exit: Classes[" + classes.size() + "]: " + classes.toString());
+        return classes;
+    }
+
+
+    private void parseTldFile(URL url, ClassLoader classLoader, List<Class> classes, Set<String> listenerNames) throws DeploymentException {
+        log.debug("parseTLDFile( " + url.toString() + " ): Entry");
+
+        try {
+            XmlObject xml = XmlBeansUtil.parse(url, null);
+            TaglibDocument tld = convertToTaglibSchema(xml);
+            TldTaglibType tl = tld.getTaglib();
+
+            // Get all the listeners from the TLD file
+            ListenerType[] listeners = tl.getListenerArray();
+            for (ListenerType listener : listeners) {
+                FullyQualifiedClassType cls = listener.getListenerClass();
+                String className = cls.getStringValue().trim();
+                listenerNames.add(className);
+                try {
+                    Class clas = classLoader.loadClass(className);
+                    classes.add(clas);
+                }
+                catch (ClassNotFoundException e) {
+                    log.warn("JspModuleBuilderExtension: Could not load listener class: " + className + " mentioned in TLD file at " + url.toString());
+                }
+            }
+
+            // Get all the tags from the TLD file
+            TagType[] tags = tl.getTagArray();
+            for (TagType tag : tags) {
+                FullyQualifiedClassType cls = tag.getTagClass();
+                String className = cls.getStringValue().trim();
+                try {
+                    Class clas = classLoader.loadClass(className);
+                    classes.add(clas);
+                }
+                catch (ClassNotFoundException e) {
+                    log.warn("JspModuleBuilderExtension: Could not load tag class: " + className + " mentioned in TLD file at " + url.toString());
+                }
+            }
+        }
+        catch (XmlException xmle) {
+            throw new DeploymentException("Could not parse TLD file at " + url.toString(), xmle);
+        }
+        catch (IOException ioe) {
+            throw new DeploymentException("Could not find TLD file at " + url.toString(), ioe);
+        }
+
+        log.debug("parseTLDFile(): Exit");
+    }
+
+
+    /**
+     * convertToTaglibSchema(): Convert older TLD files based on the 1.1 and 1.2 DTD or the 2.0 XSD
+     * schemas
+     *
+     * <p><strong>Note(s):</strong>
+     * <ul>
+     *      <li>Those tags from the 1.1 and 1.2 DTD that are no longer valid (e.g., jsp-version) are
+     *      removed
+     *      <li>Valid  tags from the 1.1 and 1.2 DTD are converted (e.g., tlibversion to
+     *      tlib-version)
+     *      <li>The <taglib> root and the <tag> root elements are reordered as necessary (i.e.,
+     *      description, display-name)
+     *      <li>The <rtexprvalue> tag is inserted in the <attribute> tag if necessary since it was
+     *      not required to preceed <type> in 2.0 schema. Default value of false is used.
+     * </ul>
+     *
+     * @param xmlObject possibly old-style tag lib document
+     * @return converted TagLibDocument in the new shiny schema
+     * @throws XmlException if something goes horribly wrong
+     */
+    private static TaglibDocument convertToTaglibSchema(XmlObject xmlObject) throws XmlException {
+        log.debug("convertToTaglibSchema( " + xmlObject.toString() + " ): Entry");
+
+        XmlCursor cursor = xmlObject.newCursor();
+        XmlCursor moveable = xmlObject.newCursor();
+        try {
+            cursor.toStartDoc();
+            cursor.toFirstChild();
+            if (SchemaConversionUtils.JAVAEE_NAMESPACE.equals(cursor.getName().getNamespaceURI())) {
+                //do nothing
+            } else if (SchemaConversionUtils.J2EE_NAMESPACE.equals(cursor.getName().getNamespaceURI())) {
+                SchemaConversionUtils.convertSchemaVersion(cursor, SchemaConversionUtils.JAVAEE_NAMESPACE, SCHEMA_LOCATION_URL, VERSION);
+                cursor.toStartDoc();
+                cursor.toChild(SchemaConversionUtils.JAVAEE_NAMESPACE, "taglib");
+                cursor.toFirstChild();
+                do {
+                    String name = cursor.getName().getLocalPart();
+                    if ("tag".equals(name)) {
+                        cursor.push();
+                        cursor.toFirstChild();
+                        SchemaConversionUtils.convertToDescriptionGroup(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
+                        SchemaConversionUtils.convertToTagRoot(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
+                        do {
+                            name = cursor.getName().getLocalPart();
+                            boolean rtexprvalueFound = false;
+                            if ("attribute".equals(name)) {
+                                cursor.push();
+                                cursor.toFirstChild();
+                                SchemaConversionUtils.convertToTagRoot(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
+                                do {
+                                    name = cursor.getName().getLocalPart();
+                                    if ("rtexprvalue".equals(name)) {
+                                        rtexprvalueFound = true;
+                                    }
+                                    if ("type".equals(name)) {
+                                        if (!rtexprvalueFound) {
+                                            rtexprvalueFound = true;
+                                            cursor.insertElementWithText("rtexprvalue", SchemaConversionUtils.JAVAEE_NAMESPACE, "false");
+                                        }
+                                    }
+                                } while (cursor.toNextSibling());
+                                cursor.pop();
+                            }
+                        } while (cursor.toNextSibling());
+                        cursor.pop();
+                    }
+                } while (cursor.toNextSibling());
+            }
+            else {
+                log.debug("Converting DTD to 2.1 schema");
+                SchemaConversionUtils.convertToSchema(cursor, SchemaConversionUtils.JAVAEE_NAMESPACE, SCHEMA_LOCATION_URL, VERSION);
+                cursor.toStartDoc();
+                cursor.toChild(SchemaConversionUtils.JAVAEE_NAMESPACE, "taglib");
+                cursor.toFirstChild();
+		//                SchemaConversionUtils.convertToDescriptionGroup(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
+                do {
+                    String name = cursor.getName().getLocalPart();
+                    if (cursor.getName().getLocalPart().equals("jsp-version") ||
+                            cursor.getName().getLocalPart().equals("jspversion") ||
+                            cursor.getName().getLocalPart().equals("validator")) {
+                        cursor.removeXmlContents();
+                    }
+                    if ("tlibversion".equals(name)) {
+                        cursor.setName(TLIB_VERSION);
+                    }
+                    if ("shortname".equals(name)) {
+                        cursor.setName(SHORT_NAME);
+                    }
+                    if ("tag".equals(name)) {
+                        cursor.push();
+                        cursor.toFirstChild();
+                        SchemaConversionUtils.convertToDescriptionGroup(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
+                        SchemaConversionUtils.convertToTagRoot(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
+                        do {
+                            name = cursor.getName().getLocalPart();
+                            if ("tagclass".equals(name)) {
+                                cursor.setName(TAG_CLASS);
+                            }
+                            if ("teiclass".equals(name)) {
+                                cursor.setName(TEI_CLASS);
+                            }
+                            if ("bodycontent".equals(name)) {
+                                cursor.setName(BODY_CONTENT);
+                            }
+                            if ("attribute".equals(name)) {
+                                cursor.push();
+                                cursor.toFirstChild();
+                                SchemaConversionUtils.convertToTagRoot(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
+                                cursor.pop();
+                            }
+                        } while (cursor.toNextSibling());
+                        cursor.pop();
+                    }
+                } while (cursor.toNextSibling());
+            }
+        }
+        finally {
+            cursor.dispose();
+        }
+        XmlObject result = xmlObject.changeType(TaglibDocument.type);
+        if (result != null) {
+            try {
+                XmlBeansUtil.validateDD(result);
+            } catch (XmlException e) {
+                log.info("Invalid transformed taglib", e);
+            }
+            log.debug("convertToTaglibSchema( " + result.toString() + " ): Exit 1");
+            return (TaglibDocument) result;
+        }
+        try {
+            XmlBeansUtil.validateDD(xmlObject);
+        } catch (XmlException e) {
+            log.info("Invalid transformed taglib", e);
+        }
+        log.debug("convertToTaglibSchema( " + xmlObject.toString() + " ): Exit 2");
+        return (TaglibDocument) xmlObject;
+    }
+
+    //TODO this method and the next one should be unnecessary. Before we get here, we've copied all this stuff into the
+    //local repo and unpacked it, so copying  it again and/or unpacking it again is not needed.
+    private static JarFile createJarFile(JarFile jarFile, JarEntry jarEntry) throws IOException {
+        if (jarEntry.getName().endsWith(".jar")) {
+            File tempFile = DeploymentUtil.createTempFile();
+            byte[] buffer = new byte[4096];
+            int count;
+            OutputStream outputStream = new FileOutputStream(tempFile);
+            BufferedInputStream inputStream = new BufferedInputStream(jarFile.getInputStream(jarEntry));
+            try {
+                while ((count = inputStream.read(buffer)) > 0) {
+                    outputStream.write(buffer, 0, count);
+                }
+            }
+            finally {
+                outputStream.close();
+            }
+            return new JarFile(tempFile);
+        } else {
+            throw new IOException("jarEntry is not a jarFile");
+        }
+    }
+
+    public static URL getJarEntryURL(JarFile jarFile, JarEntry jarEntry) throws IOException {
+        File tempFile = DeploymentUtil.createTempFile();
+        byte[] buffer = new byte[4096];
+        int count;
+        OutputStream outputStream = new FileOutputStream(tempFile);
+        BufferedInputStream inputStream = new BufferedInputStream(jarFile.getInputStream(jarEntry));
+        try {
+            while ((count = inputStream.read(buffer)) > 0) {
+                outputStream.write(buffer, 0, count);
+            }
+        }
+        finally {
+            outputStream.close();
+        }
+        if (jarEntry.getName().endsWith(".jar")) {
+            return new URL("jar:" + tempFile.toURL() + "!/");
+        } else {
+            return tempFile.toURL();
+        }
+    }
+
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(JspModuleBuilderExtension.class, NameFactory.MODULE_BUILDER);
+        infoBuilder.addAttribute("defaultEnvironment", Environment.class, true, true);
+        infoBuilder.addReference("NamingBuilders", NamingBuilder.class, NameFactory.MODULE_BUILDER);
+
+        infoBuilder.setConstructor(new String[]{
+                "defaultEnvironment",
+                "NamingBuilders"});
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+}

Propchange: geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java?view=auto&rev=522036
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java (added)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java Sat Mar 24 07:38:03 2007
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.jasper.deployment;
+
+import java.util.Collections;
+
+import junit.framework.TestCase;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.j2ee.deployment.NamingBuilderCollection;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class BasicTest extends TestCase {
+    
+    public void testMyFacesModuleBuilderExtension() throws Exception {
+        GBeanInfo gBeanInfo = JspModuleBuilderExtension.getGBeanInfo();
+        JspModuleBuilderExtension instance = new JspModuleBuilderExtension(null, new NamingBuilderCollection(Collections.EMPTY_SET, null));
+    }
+
+}

Propchange: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/modules/geronimo-jasper/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper/pom.xml?view=diff&rev=522036&r1=522035&r2=522036
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper/pom.xml (original)
+++ geronimo/server/trunk/modules/geronimo-jasper/pom.xml Sat Mar 24 07:38:03 2007
@@ -54,6 +54,35 @@
             <artifactId>geronimo-kernel</artifactId>
             <version>${version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-j2ee</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <!-- these are normally transitive dependencies of the tomcat-jasper jar -->
+        <!-- if our hacked jasper copy gets a pom we won't need these -->
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.5_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jsp_2.1_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-el_1.0_spec</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.tomcat</groupId>
+          <artifactId>juli</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.tomcat</groupId>
+          <artifactId>catalina</artifactId>
+        </dependency>
+
 
     </dependencies>
 



Mime
View raw message