[jboss-cvs] JBossAS SVN: r108107 - in projects/jboss-jsf-int/trunk: jboss-faces and 10 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Sep 10 14:12:52 EDT 2010


Author: stan.silvert at jboss.com
Date: 2010-09-10 14:12:50 -0400 (Fri, 10 Sep 2010)
New Revision: 108107

Added:
   projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossJSFInitializer.java
   projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMyFaces12ServletContextListener.java
   projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMyFaces20ServletContextListener.java
   projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMyFacesServletContextListener.java
   projects/jboss-jsf-int/trunk/jsf-deployer-impl/
   projects/jboss-jsf-int/trunk/jsf-deployer-impl/pom.xml
   projects/jboss-jsf-int/trunk/jsf-deployer-impl/src/
   projects/jboss-jsf-int/trunk/jsf-deployer-impl/src/main/
   projects/jboss-jsf-int/trunk/jsf-deployer-impl/src/main/java/
   projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/MyFaces-2.0/
   projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/MyFaces-2.0/META-INF/
   projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/MyFaces-2.0/META-INF/web.xml
Removed:
   projects/jboss-jsf-int/trunk/jsf-deployer/src/main/java/
Modified:
   projects/jboss-jsf-int/trunk/jboss-faces/pom.xml
   projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMojarra20ConfigureListener.java
   projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMojarraConfigureListener.java
   projects/jboss-jsf-int/trunk/jsf-deployer/pom.xml
   projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/META-INF/jboss-structure.xml
   projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/META-INF/jsf-integration-deployer-jboss-beans.xml
   projects/jboss-jsf-int/trunk/pom.xml
   projects/jboss-jsf-int/trunk/releasenotes.txt
Log:
Upgrade Mojarra 1.2 to 1.2_15
JBAS-8405 Add MyFaces 2.0 support


Modified: projects/jboss-jsf-int/trunk/jboss-faces/pom.xml
===================================================================
--- projects/jboss-jsf-int/trunk/jboss-faces/pom.xml	2010-09-10 17:14:51 UTC (rev 108106)
+++ projects/jboss-jsf-int/trunk/jboss-faces/pom.xml	2010-09-10 18:12:50 UTC (rev 108107)
@@ -70,7 +70,13 @@
          <groupId>org.jboss.scanning</groupId>
          <artifactId>scanning-plugins</artifactId>
          <scope>provided</scope>
-      </dependency>          
+      </dependency>
+
+      <dependency>
+        <groupId>org.apache.myfaces.core</groupId>
+        <artifactId>myfaces-impl</artifactId>
+        <scope>provided</scope>
+      </dependency>
    </dependencies>
 
    <build>

Added: projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossJSFInitializer.java
===================================================================
--- projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossJSFInitializer.java	                        (rev 0)
+++ projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossJSFInitializer.java	2010-09-10 18:12:50 UTC (rev 108107)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.web.jsf.integration.config;
+
+import java.util.Map;
+import javax.faces.validator.BeanValidator;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletRegistration;
+import javax.validation.Validation;
+import javax.validation.ValidatorFactory;
+import org.jboss.logging.Logger;
+import org.jboss.mc.servlet.vdf.spi.VDFConnector;
+import org.jboss.web.validation.ValidatorFactoryVDFConnector;
+
+/**
+ * This utility class is used to do all JBoss-specific initialization for JSF.
+ *
+ * @author ssilvert
+ * @author Ales Justin
+ */
+public class JBossJSFInitializer {
+
+   private static Logger LOG = Logger.getLogger(JBossJSFInitializer.class);
+
+   private ServletContext servletContext;
+
+   /**
+    * Create a new JBossJSFInitializer.
+    *
+    * @param servletContext The ServletContext object for this WAR deployemnt.
+    */
+   public JBossJSFInitializer(ServletContext servletContext)
+   {
+      this.servletContext = servletContext;
+   }
+
+   /**
+    * Adds the BeanValidatorFacotry to JSF2 implementations.
+    */
+   public void addBeanValidatorFactory()
+   {
+       VDFConnector<ValidatorFactory> vfc = new ValidatorFactoryVDFConnector(servletContext);
+
+       ValidatorFactory factory;
+       if (vfc.isValid())
+       {
+          factory = vfc.getUtility();
+       }
+       else
+       {
+          LOG.warn("No such ValidatorFactory in VDF layer, creating new instance.");
+          factory = Validation.buildDefaultValidatorFactory();
+       }
+
+       servletContext.setAttribute(BeanValidator.VALIDATOR_FACTORY_KEY, factory);
+    }
+
+   /**
+    * If no JSF servlet mapping exists, add the default.
+    *
+    * @return <code>Boolean.TRUE</code> if mappings were added,
+    *         <code>Boolean.FALSE</code> otherwise.
+    */
+    public Boolean addFacesMappings()
+    {
+       if (hasJSFServlet()) return Boolean.FALSE;
+
+       ServletRegistration.Dynamic facesServlet =
+                  servletContext.addServlet("FacesServlet",
+                                            "javax.faces.webapp.FacesServlet");
+       facesServlet.addMapping("/faces/*", "*.jsf", "*.faces");
+
+       return Boolean.TRUE;
+    }
+
+    private boolean hasJSFServlet()
+    {
+       Map<String,? extends ServletRegistration> servletRegistrations = servletContext.getServletRegistrations();
+       for (ServletRegistration registration : servletRegistrations.values()) {
+          // TODO: get other FacesServlet classes from the JSF deployer
+          if ("javax.faces.webapp.FacesServlet".equals(registration.getClassName())) return true;
+       }
+
+       return false;
+    }
+
+    /**
+     * This method accounts for a peculiar problem with Jasper that pops up from time
+     * to time.  In some cases, if the JspRuntimeContext is not loaded then the JspFactory
+     * will not be initialized for JSF.  This method assures that it will always be
+     * be loaded before JSF is initialized.
+     */
+    public static void initializeJspRuntime()
+    {
+        try
+        {
+            Class.forName("org.apache.jasper.compiler.JspRuntimeContext");
+        }
+        catch (ClassNotFoundException cnfe)
+        {
+            // do nothing
+        }
+    }
+}

Modified: projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMojarra20ConfigureListener.java
===================================================================
--- projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMojarra20ConfigureListener.java	2010-09-10 17:14:51 UTC (rev 108106)
+++ projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMojarra20ConfigureListener.java	2010-09-10 18:12:50 UTC (rev 108107)
@@ -21,47 +21,20 @@
  */
 package org.jboss.web.jsf.integration.config;
 
-import javax.faces.validator.BeanValidator;
-import javax.validation.Validation;
-import javax.validation.ValidatorFactory;
-import org.jboss.logging.Logger;
-import org.jboss.mc.servlet.vdf.spi.VDFConnector;
-import org.jboss.web.validation.ValidatorFactoryVDFConnector;
-
-
 /**
  * This ServletContextListener adds the BeanValidationFactory needed to
  * use the JSF 2.0 BeanValidator.
  *
  * @author Stan Silvert
- * @author Ales Justin
+ * 
  */
 public class JBossMojarra20ConfigureListener extends JBossMojarraConfigureListener
 {
-    private static Logger LOG = Logger.getLogger(JBossMojarra20ConfigureListener.class);
 
     @Override
     public void doVersionSpecificInitialization()
     {
-       addBeanValidatorFactory();
+       initializer.addBeanValidatorFactory();
     }
 
-    protected void addBeanValidatorFactory()
-    {
-       VDFConnector<ValidatorFactory> vfc = new ValidatorFactoryVDFConnector(servletContext);
-
-       ValidatorFactory factory;
-       if (vfc.isValid())
-       {
-          factory = vfc.getUtility();
-       }
-       else
-       {
-          LOG.warn("No such ValidatorFactory in VDF layer, creating new instance.");
-          factory = Validation.buildDefaultValidatorFactory();
-       }
-
-       servletContext.setAttribute(BeanValidator.VALIDATOR_FACTORY_KEY, factory);
-    }
-
 }

Modified: projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMojarraConfigureListener.java
===================================================================
--- projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMojarraConfigureListener.java	2010-09-10 17:14:51 UTC (rev 108106)
+++ projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMojarraConfigureListener.java	2010-09-10 18:12:50 UTC (rev 108107)
@@ -23,10 +23,8 @@
 
 import com.sun.faces.RIConstants;
 import com.sun.faces.config.ConfigureListener;
-import java.util.Map;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletRegistration;
 
 
 /**
@@ -40,15 +38,20 @@
     protected ServletContext servletContext;
     
     protected boolean initialized = false;
+
+    protected JBossJSFInitializer initializer;
     
     @Override
     public void contextInitialized(ServletContextEvent event) 
     {
         this.servletContext = event.getServletContext();
+        this.initializer = new JBossJSFInitializer(this.servletContext);
   
-        initializeJspRuntime();
+        initializer.initializeJspRuntime();
 
-        addFacesMappings();
+        Boolean added = initializer.addFacesMappings();
+        // Tells Mojarra that FacesServlet was added programatically
+        servletContext.setAttribute(RIConstants.FACES_INITIALIZER_MAPPINGS_ADDED, added);
 
         doVersionSpecificInitialization();
         
@@ -68,47 +71,4 @@
         }
     }
 
-    /**
-     * If no JSF servlet mapping exists, add the default.
-     */
-    private void addFacesMappings()
-    {
-       if (hasJSFServlet()) return;
-
-       ServletRegistration.Dynamic facesServlet =
-                  servletContext.addServlet("FacesServlet",
-                                            "javax.faces.webapp.FacesServlet");
-       facesServlet.addMapping("/faces/*", "*.jsf", "*.faces");
-
-       // Tells Mojarra that FacesServlet was added programatically
-       servletContext.setAttribute(RIConstants.FACES_INITIALIZER_MAPPINGS_ADDED, Boolean.TRUE);
-    }
-
-    private boolean hasJSFServlet()
-    {
-       Map<String,? extends ServletRegistration> servletRegistrations = servletContext.getServletRegistrations();
-       for (ServletRegistration registration : servletRegistrations.values()) {
-          // TODO: get other FacesServlet classes from the JSF deployer
-          if ("javax.faces.webapp.FacesServlet".equals(registration.getClassName())) return true;
-       }
-
-       return false;
-    }
-
-    // This method accounts for a peculiar problem with Jasper that pops up from time
-    // to time.  In some cases, if the JspRuntimeContext is not loaded then the JspFactory
-    // will not be initialized for JSF.  This method assures that it will always be
-    // be loaded before JSF is initialized.
-    private static void initializeJspRuntime() 
-    {
-        try 
-        {
-            Class.forName("org.apache.jasper.compiler.JspRuntimeContext");
-        }  
-        catch (ClassNotFoundException cnfe) 
-        {
-            // do nothing 
-        }
-    }
-
 }

Added: projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMyFaces12ServletContextListener.java
===================================================================
--- projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMyFaces12ServletContextListener.java	                        (rev 0)
+++ projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMyFaces12ServletContextListener.java	2010-09-10 18:12:50 UTC (rev 108107)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.web.jsf.integration.config;
+
+/**
+ * This ServletContextListener avoids unnecessary initialization done by
+ * the JSF 2.0 JBossMyFacesServletContextListener.
+ *
+ * @author Stan Silvert
+ */
+public class JBossMyFaces12ServletContextListener extends JBossMyFacesServletContextListener
+{
+    public void doVersionSpecificInitialization()
+    {
+       // currently doesn't need to do anything
+    }
+
+}

Added: projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMyFaces20ServletContextListener.java
===================================================================
--- projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMyFaces20ServletContextListener.java	                        (rev 0)
+++ projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMyFaces20ServletContextListener.java	2010-09-10 18:12:50 UTC (rev 108107)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.web.jsf.integration.config;
+
+/**
+ * This ServletContextListener adds the BeanValidationFactory needed to
+ * use the JSF 2.0 BeanValidator.
+ *
+ * @author Stan Silvert
+ * 
+ */
+public class JBossMyFaces20ServletContextListener extends JBossMyFacesServletContextListener
+{
+
+    @Override
+    public void doVersionSpecificInitialization()
+    {
+       initializer.addBeanValidatorFactory();
+    }
+
+}

Added: projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMyFacesServletContextListener.java
===================================================================
--- projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMyFacesServletContextListener.java	                        (rev 0)
+++ projects/jboss-jsf-int/trunk/jboss-faces/src/main/java/org/jboss/web/jsf/integration/config/JBossMyFacesServletContextListener.java	2010-09-10 18:12:50 UTC (rev 108107)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.web.jsf.integration.config;
+
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import org.apache.myfaces.webapp.StartupServletContextListener;
+
+/**
+ * This ServletContextListener sets up a JBoss-specific environment for JSF
+ * and then delegates the rest of the setup to MyFaces.
+ *
+ * @author Stan Silvert
+ */
+public abstract class JBossMyFacesServletContextListener extends StartupServletContextListener
+{
+    protected ServletContext servletContext;
+    
+    protected boolean initialized = false;
+
+    protected JBossJSFInitializer initializer;
+    
+    @Override
+    public void contextInitialized(ServletContextEvent event) 
+    {
+        this.servletContext = event.getServletContext();
+        this.initializer = new JBossJSFInitializer(this.servletContext);
+  
+        initializer.initializeJspRuntime();
+
+        initializer.addFacesMappings();
+
+        doVersionSpecificInitialization();
+        
+        super.contextInitialized(event);
+        //initialized = true;
+    }
+
+    public abstract void doVersionSpecificInitialization();
+
+    @Override
+    public void contextDestroyed(ServletContextEvent event) 
+    {
+       // calling super.contextDestroyed() here throws exception.
+       // not sure why
+      /*  if (initialized)
+        {
+           super.contextDestroyed(event);
+           initialized = false;
+        } */
+    }
+
+}

Modified: projects/jboss-jsf-int/trunk/jsf-deployer/pom.xml
===================================================================
--- projects/jboss-jsf-int/trunk/jsf-deployer/pom.xml	2010-09-10 17:14:51 UTC (rev 108106)
+++ projects/jboss-jsf-int/trunk/jsf-deployer/pom.xml	2010-09-10 18:12:50 UTC (rev 108107)
@@ -11,68 +11,6 @@
   <name>JBoss JSF Deployer</name>
   <description>JBoss JSF Deployer</description>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.jboss.deployers</groupId>
-      <artifactId>jboss-deployers-vfs</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-vfs</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss.metadata</groupId>
-      <artifactId>jboss-metadata</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>javax.validation</groupId>
-      <artifactId>validation-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>com.sun.faces</groupId>
-      <artifactId>jsf-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>com.sun.faces</groupId>
-      <artifactId>jsf-impl</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>jboss.web</groupId>
-      <artifactId>servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>apache-log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss.jbossas</groupId>
-      <artifactId>jboss-as-tomcat</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss.scanning</groupId>
-      <artifactId>scanning-plugins</artifactId>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
   <build>
     <finalName>${artifactId}</finalName>
     <plugins>
@@ -90,6 +28,14 @@
               <artifactItems>
                 <artifactItem>
                   <groupId>org.jboss.jsf.integration</groupId>
+                  <artifactId>jboss-jsf-deployer-impl</artifactId>
+                  <version>${project.version}</version>
+                  <type>jar</type>
+                  <overWrite>true</overWrite>
+                  <outputDirectory>src/main/resources</outputDirectory>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.jboss.jsf.integration</groupId>
                   <artifactId>jboss-faces</artifactId>
                   <version>${project.version}</version>
                   <type>jar</type>
@@ -138,6 +84,72 @@
                   <overWrite>true</overWrite>
                   <outputDirectory>src/main/resources/Mojarra-2.0/jsf-libs</outputDirectory>
                 </artifactItem>
+
+                <artifactItem>
+                  <groupId>org.jboss.jsf.integration</groupId>
+                  <artifactId>jboss-faces</artifactId>
+                  <version>${project.version}</version>
+                  <type>jar</type>
+                  <overWrite>true</overWrite>
+                  <outputDirectory>src/main/resources/MyFaces-2.0/jsf-libs</outputDirectory>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.myfaces.core</groupId>
+                  <artifactId>myfaces-api</artifactId>
+                  <version>${myfaces-version}</version>
+                  <type>jar</type>
+                  <overWrite>true</overWrite>
+                  <outputDirectory>src/main/resources/MyFaces-2.0/jsf-libs</outputDirectory>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.myfaces.core</groupId>
+                  <artifactId>myfaces-impl</artifactId>
+                  <version>${myfaces-version}</version>
+                  <type>jar</type>
+                  <overWrite>true</overWrite>
+                  <outputDirectory>src/main/resources/MyFaces-2.0/jsf-libs</outputDirectory>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>commons-beanutils</groupId>
+                  <artifactId>commons-beanutils</artifactId>
+                  <version>1.8.3</version>
+                  <type>jar</type>
+                  <overWrite>true</overWrite>
+                  <outputDirectory>src/main/resources/MyFaces-2.0/jsf-libs</outputDirectory>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>commons-codec</groupId>
+                  <artifactId>commons-codec</artifactId>
+                  <version>1.3</version>
+                  <type>jar</type>
+                  <overWrite>true</overWrite>
+                  <outputDirectory>src/main/resources/MyFaces-2.0/jsf-libs</outputDirectory>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>commons-collections</groupId>
+                  <artifactId>commons-collections</artifactId>
+                  <version>3.2</version>
+                  <type>jar</type>
+                  <overWrite>true</overWrite>
+                  <outputDirectory>src/main/resources/MyFaces-2.0/jsf-libs</outputDirectory>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>commons-digester</groupId>
+                  <artifactId>commons-digester</artifactId>
+                  <version>1.8</version>
+                  <type>jar</type>
+                  <overWrite>true</overWrite>
+                  <outputDirectory>src/main/resources/MyFaces-2.0/jsf-libs</outputDirectory>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>commons-discovery</groupId>
+                  <artifactId>commons-discovery</artifactId>
+                  <version>0.4</version>
+                  <type>jar</type>
+                  <overWrite>true</overWrite>
+                  <outputDirectory>src/main/resources/MyFaces-2.0/jsf-libs</outputDirectory>
+                </artifactItem>
+
               </artifactItems>
             </configuration>
           </execution>
@@ -150,8 +162,10 @@
             <fileset>
               <directory>src/main/resources</directory>
               <includes>
+                <includes>jboss-jsf-deployer-impl.jar</includes>
                 <includes>Mojarra-1.2/jsf-libs</includes>
                 <includes>Mojarra-2.0/jsf-libs</includes>
+                <includes>MyFaces-2.0/jsf-libs</includes>
               </includes>
             </fileset>
           </filesets>

Modified: projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/META-INF/jboss-structure.xml
===================================================================
--- projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/META-INF/jboss-structure.xml	2010-09-10 17:14:51 UTC (rev 108106)
+++ projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/META-INF/jboss-structure.xml	2010-09-10 18:12:50 UTC (rev 108107)
@@ -5,7 +5,7 @@
             <path name="META-INF"/>
         </metaDataPath>
         <classpath>
-            <path name=""/> <!-- TODO - we could groups those org.* into jar, so the path is not "", but explicit jar name -->
+            <path name="/jboss-jsf-deployer-impl.jar"/>
         </classpath>
     </context>
 </structure>

Modified: projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/META-INF/jsf-integration-deployer-jboss-beans.xml
===================================================================
--- projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/META-INF/jsf-integration-deployer-jboss-beans.xml	2010-09-10 17:14:51 UTC (rev 108106)
+++ projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/META-INF/jsf-integration-deployer-jboss-beans.xml	2010-09-10 18:12:50 UTC (rev 108107)
@@ -54,6 +54,11 @@
           <key>Mojarra-2.0</key>
           <value>${jboss.server.home.url}deployers/jsf.deployer/Mojarra-2.0</value>
         </entry>
+        <entry>
+          <key>MyFaces-2.0</key>
+          <value>${jboss.server.home.url}deployers/jsf.deployer/MyFaces-2.0</value>
+        </entry>
+
       </map>   
     </property>
   </bean>
@@ -79,6 +84,16 @@
     </property>
   </bean>
 
+  <bean name="JSFUrlIntegrationDeployer-MyFaces-20" class="org.jboss.jsf.deployer.JSFUrlIntegrationDeployer">
+    <property name="JSFConfigName">
+      <value>MyFaces-2.0</value>
+    </property>
+    <property name="JSFImplManagementDeployer">
+      <inject bean="JSFImplManagementDeployer"/>
+    </property>
+  </bean>
+
+
     
   <bean name="JSFSharedWebMetaDataDeployer" class="org.jboss.jsf.deployer.JSFSharedWebMetaDataDeployer"/>
 

Added: projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/MyFaces-2.0/META-INF/web.xml
===================================================================
--- projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/MyFaces-2.0/META-INF/web.xml	                        (rev 0)
+++ projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/MyFaces-2.0/META-INF/web.xml	2010-09-10 18:12:50 UTC (rev 108107)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+   version="2.5">
+   <!-- ======================== Introduction ============================== -->
+   <!-- This document defines default values for the Mojarra-2.0 JSF config  -->
+   <!--                                                                      -->
+   <!-- WARNING:  Do not configure application-specific resources here!      -->
+   <!-- They should go in the "/WEB-INF/web.xml" file in your application.   -->
+
+   <!-- =========== Common Context Params ================================== -->
+
+   
+   
+   <!-- ================== Common filter Configuration ==================== -->
+   
+	
+   <!-- ================== Common Listener Configuration ==================== -->
+   <!-- Configures JSF 2.0 -->
+   <listener>
+     <listener-class>org.jboss.web.jsf.integration.config.JBossMyFaces20ServletContextListener</listener-class>
+   </listener>
+
+
+</web-app>

Added: projects/jboss-jsf-int/trunk/jsf-deployer-impl/pom.xml
===================================================================
--- projects/jboss-jsf-int/trunk/jsf-deployer-impl/pom.xml	                        (rev 0)
+++ projects/jboss-jsf-int/trunk/jsf-deployer-impl/pom.xml	2010-09-10 18:12:50 UTC (rev 108107)
@@ -0,0 +1,86 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.jboss.jsf.integration</groupId>
+    <artifactId>jboss-jsf-int</artifactId>
+    <version>1.0.2-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>jboss-jsf-deployer-impl</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss JSF Deployer Impl Classes</name>
+  <description>JBoss JSF Deployer Impl Classes</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-vfs</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.metadata</groupId>
+      <artifactId>jboss-metadata</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.validation</groupId>
+      <artifactId>validation-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>com.sun.faces</groupId>
+      <artifactId>jsf-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>com.sun.faces</groupId>
+      <artifactId>jsf-impl</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.myfaces.core</groupId>
+      <artifactId>myfaces-impl</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>jboss.web</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>apache-log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-tomcat</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.scanning</groupId>
+      <artifactId>scanning-plugins</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <finalName>${artifactId}</finalName>
+  </build>
+
+</project>

Copied: projects/jboss-jsf-int/trunk/jsf-deployer-impl/src/main/java (from rev 107529, projects/jboss-jsf-int/trunk/jsf-deployer/src/main/java)

Modified: projects/jboss-jsf-int/trunk/pom.xml
===================================================================
--- projects/jboss-jsf-int/trunk/pom.xml	2010-09-10 17:14:51 UTC (rev 108106)
+++ projects/jboss-jsf-int/trunk/pom.xml	2010-09-10 18:12:50 UTC (rev 108107)
@@ -22,12 +22,14 @@
    </scm>
 
    <properties>
-      <jsf12-version>1.2_14</jsf12-version>
-      <jsf20-version>2.0.3-20100630</jsf20-version>
+      <jsf12-version>1.2_15</jsf12-version>
+      <jsf20-version>2.0.3</jsf20-version>
+      <myfaces-version>2.0.1</myfaces-version>
    </properties>
 
    <modules>
       <module>jboss-faces</module> <!-- This must be done before jsf-deployer -->
+      <module>jsf-deployer-impl</module> <!-- This must be done before jsf-deployer -->
       <module>jsf-deployer</module>
     <!--  <module>testwar</module>
       <module>jsf12test</module>
@@ -99,6 +101,18 @@
          </dependency>
 
          <dependency>
+           <groupId>org.apache.myfaces.core</groupId>
+           <artifactId>myfaces-api</artifactId>
+           <version>${myfaces-version}</version>
+         </dependency>
+
+         <dependency>
+           <groupId>org.apache.myfaces.core</groupId>
+           <artifactId>myfaces-impl</artifactId>
+           <version>${myfaces-version}</version>
+         </dependency>
+
+         <dependency>
            <groupId>jboss.web</groupId>
            <artifactId>servlet-api</artifactId>
            <version>3.0.0-beta-2</version>
@@ -185,16 +199,18 @@
                </reportSet>
             </reportSets>
          </plugin>
+
+   <!--
          <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>findbugs-maven-plugin</artifactId>
             <version>2.3.1</version>
             <configuration>
               <findbugsXmlOutput>true</findbugsXmlOutput>
-              <!-- Optional directory to put findbugs xml report -->
               <findbugsXmlOutputDirectory>target/site</findbugsXmlOutputDirectory>
             </configuration>
          </plugin>
+       -->
       </plugins>
    </reporting>
 

Modified: projects/jboss-jsf-int/trunk/releasenotes.txt
===================================================================
--- projects/jboss-jsf-int/trunk/releasenotes.txt	2010-09-10 17:14:51 UTC (rev 108106)
+++ projects/jboss-jsf-int/trunk/releasenotes.txt	2010-09-10 18:12:50 UTC (rev 108107)
@@ -6,6 +6,8 @@
 2010-07-12 Release 1.0.1
 * JBAS-7739 Upgrade Mojarra to 2.0.3
 
-2010-xx-xx Release 1.0.2
+2010-09-10 Release 1.0.2
 * JBAS-8264 Fix for @FacesValidator annotation
-*JBAS-8272 Change property name on JSFUrlIntegrationDeployer
+* JBAS-8272 Change property name on JSFUrlIntegrationDeployer
+* Upgrade Mojarra 1.2 to 1.2_15
+* JBAS-8405 Add MyFaces 2.0 support



More information about the jboss-cvs-commits mailing list