MYFACES-3532 Add tomcat7-maven-plugin to myfaces 2.0 archetypes (and other small fixes)
diff --git a/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/META-INF/maven/archetype-metadata.xml
index 2a5b4b8..7201360 100644
--- a/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -31,6 +31,15 @@
       </fileSet>
       <fileSet filtered="false" packaged="false">
           <directory>src/main/webapp/</directory>
+          <excludes>
+              <exclude>WEB-INF/web.xml</exclude>
+          </excludes>
+      </fileSet>
+      <fileSet filtered="true" packaged="false">
+          <directory>src/main/webapp/</directory>
+          <includes>
+              <include>WEB-INF/web.xml</include>
+          </includes>
       </fileSet>
   </fileSets>
 
diff --git a/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/archetype-resources/pom.xml b/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/archetype-resources/pom.xml
index 14ebd46..5581146 100644
--- a/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/archetype-resources/pom.xml
+++ b/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/archetype-resources/pom.xml
@@ -1,937 +1,1125 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * 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.
--->
-<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>
-    <groupId>${groupId}</groupId>
-    <artifactId>${artifactId}</artifactId>
-    <packaging>war</packaging>
-    <version>${version}</version>
-    <name>${artifactId}</name>
-    <description>A custom project using MyFaces 2.0, OpenWebBeans and MyFaces CODI</description>
-    <url>http://www.myorganization.org</url>
-
-    <!-- Instructions 
-      - Run using jetty 
-          mvn clean jetty:run
-          mvn clean -Dcontainer=jetty-mojarra jetty:run
-        Set your browser to http://localhost:8080/${artifactId}
-      - Build war and bundle JSF jars 
-          mvn clean -Pbundle-myfaces install
-          mvn clean -Pbundle-mojarra install
-     -->
-
-    <properties>
-        <jsf-myfaces.version>2.0.12</jsf-myfaces.version>
-        <jsf-mojarra.version>2.0.9</jsf-mojarra.version>        
-        <jetty.maven.plugin.version>8.1.1.v20120215</jetty.maven.plugin.version>
-        <openwebbeans.version>1.1.0</openwebbeans.version>
-        <codi.version>1.0.4</codi.version>
-    </properties>
-
-    <build>
-        <finalName>${artifactId}</finalName>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <!-- Project dependencies -->
-    <dependencies>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_2.5_spec</artifactId>
-            <version>1.2</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-el_2.2_spec</artifactId>
-            <version>1.0.2</version>
-            <scope>provided</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-annotation_1.0_spec</artifactId>
-            <version>1.1.1</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <!-- Specifications -->
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jta_1.1_spec</artifactId>
-            <version>1.1.1</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-            <version>1.0</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <!-- JSR-330 -->
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-atinject_1.0_spec</artifactId>
-            <version>1.0</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-            <version>1.0</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-validation_1.0_spec</artifactId>
-            <version>1.1</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_1.0_spec</artifactId>
-            <version>1.1.2</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <!-- JSF API: Add here as provided dependency and then add it
-             on jetty-maven-plugin as compile/runtime dependency.
-             The same goes for other JSF libraries. -->
-        <dependency>
-            <groupId>org.apache.myfaces.core</groupId>
-            <artifactId>myfaces-api</artifactId>
-            <version>${symbol_dollar}{jsf-myfaces.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>jstl</artifactId>
-            <version>1.2</version>
-            <scope>runtime</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>dom4j</groupId>
-            <artifactId>dom4j</artifactId>
-            <version>1.6.1</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
-            <artifactId>myfaces-extcdi-core-api</artifactId>
-            <version>${symbol_dollar}{codi.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <!-- test dependencies -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.8.2</version>
-            <scope>test</scope>
-        </dependency>
-
-    </dependencies>
-
-    <profiles>
-        <profile>
-            <id>bundle-myfaces</id>
-            <activation>
-                <property>
-                    <name>jsf</name>
-                    <value>myfaces</value>
-                </property>
-            </activation>
-            <!-- Include MyFaces jars into the war -->
-            <dependencies>
-                <dependency>
-                    <groupId>org.apache.myfaces.core</groupId>
-                    <artifactId>myfaces-api</artifactId>
-                    <version>${symbol_dollar}{jsf-myfaces.version}</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.core</groupId>
-                    <artifactId>myfaces-impl</artifactId>
-                    <version>${symbol_dollar}{jsf-myfaces.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jta_1.1_spec</artifactId>
-                    <version>1.1.1</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-atinject_1.0_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-validation_1.0_spec</artifactId>
-                    <version>1.1</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jpa_1.0_spec</artifactId>
-                    <version>1.1.2</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-impl</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-jsf</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-web</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-spi</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-resource</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- MyFaces CODI -->
-                <!-- the JSF independent core -->
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
-                    <artifactId>myfaces-extcdi-core-api</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
-                    <artifactId>myfaces-extcdi-core-impl</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- the JSF-2.0 specific library, which includes the JSF-1.2 parts -->
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-jsf20-module-api</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-jsf20-module-impl</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- the BV-1.0 specific library -->
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-bv1-module-api</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-bv1-module-impl</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- CODI JPA-1.0 Module -->
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-jpa1-module-api</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-jpa1-module-impl</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- CODI-I18N Message Module -->
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-message-module-api</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-message-module-impl</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- CODI-Scripting Module -->
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-scripting-module-api</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-scripting-module-impl</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- OPTIONAL: use the all-in-one jar instead of the individual CODI module dependencies -->
-                <!--dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>
-                    <artifactId>myfaces-extcdi-bundle-jsf20</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>compile</scope>
-                </dependency-->
-            </dependencies>
-        </profile>
-
-        <profile>
-            <!-- Plugin embedded jetty 8 container. 
-                 Just running use:
-                 mvn clean jetty:run
-            -->
-            <!-- For debugging use (attach debugger port 8000):
-                 mvnDebug clean jetty:run
-            -->
-            <id>jettyConfig</id>
-            <activation>
-                <property>
-                    <name>!container</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <!--This plugin allows to run the war using mvn jetty:run -->
-                        <groupId>org.mortbay.jetty</groupId>
-                        <artifactId>jetty-maven-plugin</artifactId>
-                        <version>${symbol_dollar}{jetty.maven.plugin.version}</version>
-                        <configuration>
-                            <systemProperties>
-                                <systemProperty>
-                                    <!-- optional to use the ecj compiler -->
-                                    <name>org.apache.jasper.compiler.disablejsr199</name>
-                                    <value>true</value>
-                                </systemProperty>
-                            </systemProperties>
-                            <webApp>
-                                <contextPath>/${artifactId}</contextPath>
-                            </webApp>
-                            <scanIntervalSeconds>5</scanIntervalSeconds>
-                        </configuration>
-                        <dependencies>
-                           <!-- Tld scanning only works when JSF is included
-                                as container dependency. Add other jsf libraries
-                                here, so jetty:run goal can find and process them -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.core</groupId>
-                                <artifactId>myfaces-api</artifactId>
-                                <version>${symbol_dollar}{jsf-myfaces.version}</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.core</groupId>
-                                <artifactId>myfaces-impl</artifactId>
-                                <version>${symbol_dollar}{jsf-myfaces.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-jta_1.1_spec</artifactId>
-                                <version>1.1.1</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-                                <version>1.0</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-atinject_1.0_spec</artifactId>
-                                <version>1.0</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-                                <version>1.0</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-validation_1.0_spec</artifactId>
-                                <version>1.1</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-jpa_1.0_spec</artifactId>
-                                <version>1.1.2</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-impl</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-jsf</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-web</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-spi</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-resource</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- MyFaces CODI -->
-                            <!-- the JSF independent core -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
-                                <artifactId>myfaces-extcdi-core-api</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
-                                <artifactId>myfaces-extcdi-core-impl</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- the JSF-2.0 specific library, which includes the JSF-1.2 parts -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-jsf20-module-api</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-jsf20-module-impl</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- the BV-1.0 specific library -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-bv1-module-api</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-bv1-module-impl</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- CODI JPA-1.0 Module -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-jpa1-module-api</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-jpa1-module-impl</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- CODI-I18N Message Module -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-message-module-api</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-message-module-impl</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- CODI-Scripting Module -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-scripting-module-api</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-scripting-module-impl</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- OPTIONAL: use the all-in-one jar instead of the individual CODI module dependencies -->
-                            <!--dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>
-                                <artifactId>myfaces-extcdi-bundle-jsf20</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>compile</scope>
-                            </dependency-->
-                        </dependencies>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-        
-        <profile>
-            <id>bundle-mojarra</id>
-            <activation>
-                <property>
-                    <name>jsf</name>
-                    <value>mojarra</value>
-                </property>
-            </activation>
-            <!-- Include Mojarra jars into the war -->
-            <dependencies>
-                <dependency>
-                    <groupId>com.sun.faces</groupId>
-                    <artifactId>jsf-api</artifactId>
-                    <version>${symbol_dollar}{jsf-mojarra.version}</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>com.sun.faces</groupId>
-                    <artifactId>jsf-impl</artifactId>
-                    <version>${symbol_dollar}{jsf-mojarra.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jta_1.1_spec</artifactId>
-                    <version>1.1.1</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-atinject_1.0_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-validation_1.0_spec</artifactId>
-                    <version>1.1</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jpa_1.0_spec</artifactId>
-                    <version>1.1.2</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-impl</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-jsf</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-web</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-spi</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-resource</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- MyFaces CODI -->
-                <!-- the JSF independent core -->
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
-                    <artifactId>myfaces-extcdi-core-api</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
-                    <artifactId>myfaces-extcdi-core-impl</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- the JSF-2.0 specific library, which includes the JSF-1.2 parts -->
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-jsf20-module-api</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-jsf20-module-impl</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- the BV-1.0 specific library -->
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-bv1-module-api</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-bv1-module-impl</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- CODI JPA-1.0 Module -->
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-jpa1-module-api</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-jpa1-module-impl</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- CODI-I18N Message Module -->
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-message-module-api</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-message-module-impl</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- CODI-Scripting Module -->
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-scripting-module-api</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                    <artifactId>myfaces-extcdi-scripting-module-impl</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <!-- OPTIONAL: use the all-in-one jar instead of the individual CODI module dependencies -->
-                <!--dependency>
-                    <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>
-                    <artifactId>myfaces-extcdi-bundle-jsf20</artifactId>
-                    <version>${symbol_dollar}{codi.version}</version>
-                    <scope>compile</scope>
-                </dependency-->
-            </dependencies>
-            <repositories>
-                <repository>
-                    <id>java.net</id>
-                    <url>http://download.java.net/maven/2</url>
-                </repository>
-            </repositories>
-        </profile>
-
-        <profile>
-            <!-- Plugin embedded jetty 8 container. 
-                 Just running use:
-                 mvn clean -Dcontainer=jetty-mojarra jetty:run 
-            -->
-            <!-- For debugging use (attach debugger port 8000):
-                 mvn clean -Dcontainer=jetty-mojarra jetty:run 
-            -->
-            <id>jettyConfig-mojarra</id>
-            <activation>
-                <property>
-                    <name>container</name>
-                    <value>jetty-mojarra</value>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <!--This plugin allows to run the war using mvn jetty:run -->
-                        <groupId>org.mortbay.jetty</groupId>
-                        <artifactId>jetty-maven-plugin</artifactId>
-                        <version>${symbol_dollar}{jetty.maven.plugin.version}</version>
-                        <configuration>
-                            <systemProperties>
-                                <systemProperty>
-                                    <!-- optional to use the ecj compiler -->
-                                    <name>org.apache.jasper.compiler.disablejsr199</name>
-                                    <value>true</value>
-                                </systemProperty>
-                            </systemProperties>
-                            <webApp>
-                                <contextPath>/${artifactId}</contextPath>
-                            </webApp>
-                            <scanIntervalSeconds>5</scanIntervalSeconds>
-                        </configuration>
-                        <dependencies>
-                           <!-- Tld scanning only works when JSF is included
-                                as container dependency. Add other jsf libraries
-                                here, so jetty:run goal can find and process them -->
-                           <dependency>
-                               <groupId>com.sun.faces</groupId>
-                               <artifactId>jsf-api</artifactId>
-                               <version>${symbol_dollar}{jsf-mojarra.version}</version>
-                               <scope>compile</scope>
-                           </dependency>
-                           <dependency>
-                               <groupId>com.sun.faces</groupId>
-                               <artifactId>jsf-impl</artifactId>
-                               <version>${symbol_dollar}{jsf-mojarra.version}</version>
-                               <scope>runtime</scope>
-                           </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-jta_1.1_spec</artifactId>
-                                <version>1.1.1</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-                                <version>1.0</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-atinject_1.0_spec</artifactId>
-                                <version>1.0</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-                                <version>1.0</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-validation_1.0_spec</artifactId>
-                                <version>1.1</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-jpa_1.0_spec</artifactId>
-                                <version>1.1.2</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-impl</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-jsf</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-web</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-spi</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-resource</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- MyFaces CODI -->
-                            <!-- the JSF independent core -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
-                                <artifactId>myfaces-extcdi-core-api</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
-                                <artifactId>myfaces-extcdi-core-impl</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- the JSF-2.0 specific library, which includes the JSF-1.2 parts -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-jsf20-module-api</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-jsf20-module-impl</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- the BV-1.0 specific library -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-bv1-module-api</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-bv1-module-impl</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- CODI JPA-1.0 Module -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-jpa1-module-api</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-jpa1-module-impl</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- CODI-I18N Message Module -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-message-module-api</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-message-module-impl</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- CODI-Scripting Module -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-scripting-module-api</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
-                                <artifactId>myfaces-extcdi-scripting-module-impl</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <!-- OPTIONAL: use the all-in-one jar instead of the individual CODI module dependencies -->
-                            <!--dependency>
-                                <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>
-                                <artifactId>myfaces-extcdi-bundle-jsf20</artifactId>
-                                <version>${symbol_dollar}{codi.version}</version>
-                                <scope>compile</scope>
-                            </dependency-->
-                        </dependencies>
-                    </plugin>
-                </plugins>
-            </build>
-            <repositories>
-                <repository>
-                    <id>java.net</id>
-                    <url>http://download.java.net/maven/2</url>
-                </repository>
-            </repositories>
-        </profile>
-    </profiles>
-
-</project>
+#set( $symbol_pound = '#' )

+#set( $symbol_dollar = '$' )

+#set( $symbol_escape = '\' )

+<?xml version="1.0" encoding="UTF-8"?>

+

+<!--

+ * 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.

+-->

+

+<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>

+    <groupId>${groupId}</groupId>

+    <artifactId>${artifactId}</artifactId>

+    <packaging>war</packaging>

+    <version>${version}</version>

+    <name>${artifactId}</name>

+    <description>A custom project using MyFaces 2.0, OpenWebBeans and MyFaces CODI</description>

+    <url>http://www.myorganization.org</url>

+

+    <!-- Instructions 

+      - Run using jetty 

+          mvn clean jetty:run

+          mvn clean -Dcontainer=jetty-mojarra jetty:run

+          Set your browser to http://localhost:8080/${artifactId}

+      - Run war using tomcat

+          mvn clean -Dcontainer=tomcat7 tomcat:run-war

+          Set your browser to http://localhost:8080/${artifactId}

+      - Run war using jetty (remove <webApp> config inside plugin config first)

+          mvn clean jetty:run-war

+          mvn clean -Dcontainer=jetty-mojarra jetty:run-war

+          Set your browser to http://localhost:8080

+      - Build war and bundle JSF jars 

+          mvn clean -Pbundle-myfaces install

+          mvn clean -Pbundle-mojarra install

+     -->

+

+    <properties>

+        <jsf-myfaces.version>2.1.7</jsf-myfaces.version>

+        <jsf-mojarra.version>2.1.7</jsf-mojarra.version>        

+        <jetty.maven.plugin.version>8.1.3.v20120416</jetty.maven.plugin.version>

+        <openwebbeans.version>1.1.4</openwebbeans.version>

+        <codi.version>1.0.5</codi.version>

+    </properties>

+

+    <build>

+        <finalName>${artifactId}</finalName>

+        <plugins>

+            <plugin>

+                <groupId>org.apache.maven.plugins</groupId>

+                <artifactId>maven-compiler-plugin</artifactId>

+                <configuration>

+                    <source>1.5</source>

+                    <target>1.5</target>

+                </configuration>

+            </plugin>

+        </plugins>

+    </build>

+

+    <!-- Project dependencies -->

+    <dependencies>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-servlet_2.5_spec</artifactId>

+            <version>1.2</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-el_2.2_spec</artifactId>

+            <version>1.0.2</version>

+            <scope>provided</scope>

+        </dependency>

+        

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-annotation_1.0_spec</artifactId>

+            <version>1.1.1</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <!-- Specifications -->

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-jta_1.1_spec</artifactId>

+            <version>1.1.1</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-interceptor_1.1_spec</artifactId>

+            <version>1.0</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <!-- JSR-330 -->

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-atinject_1.0_spec</artifactId>

+            <version>1.0</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-jcdi_1.0_spec</artifactId>

+            <version>1.0</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-validation_1.0_spec</artifactId>

+            <version>1.1</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-jpa_1.0_spec</artifactId>

+            <version>1.1.2</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <!-- JSF API: Add here as provided dependency and then add it

+             on jetty-maven-plugin as compile/runtime dependency.

+             The same goes for other JSF libraries. -->

+        <dependency>

+            <groupId>org.apache.myfaces.core</groupId>

+            <artifactId>myfaces-api</artifactId>

+            <version>${symbol_dollar}{jsf-myfaces.version}</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>javax.servlet</groupId>

+            <artifactId>jstl</artifactId>

+            <version>1.2</version>

+            <scope>runtime</scope>

+        </dependency>

+        

+        <dependency>

+            <groupId>dom4j</groupId>

+            <artifactId>dom4j</artifactId>

+            <version>1.6.1</version>

+        </dependency>

+

+        <dependency>

+            <groupId>org.apache.myfaces.extensions.cdi.core</groupId>

+            <artifactId>myfaces-extcdi-core-api</artifactId>

+            <version>${symbol_dollar}{codi.version}</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <!-- test dependencies -->

+        <dependency>

+            <groupId>junit</groupId>

+            <artifactId>junit</artifactId>

+            <version>4.8.2</version>

+            <scope>test</scope>

+        </dependency>

+

+    </dependencies>

+

+    <profiles>

+        <profile>

+            <id>bundle-myfaces</id>

+            <activation>

+                <property>

+                    <name>jsf</name>

+                    <value>myfaces</value>

+                </property>

+            </activation>

+            <!-- Include MyFaces jars into the war -->

+            <dependencies>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-api</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-impl</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jta_1.1_spec</artifactId>

+                    <version>1.1.1</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-atinject_1.0_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-validation_1.0_spec</artifactId>

+                    <version>1.1</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jpa_1.0_spec</artifactId>

+                    <version>1.1.2</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-impl</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-jsf</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-web</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-spi</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-resource</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- MyFaces CODI -->

+                <!-- the JSF independent core -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.core</groupId>

+                    <artifactId>myfaces-extcdi-core-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.core</groupId>

+                    <artifactId>myfaces-extcdi-core-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- the JSF-2.0 specific library, which includes the JSF-1.2 parts -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-jsf20-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-jsf20-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- the BV-1.0 specific library -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-bv1-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-bv1-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- CODI JPA-1.0 Module -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-jpa1-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-jpa1-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- CODI-I18N Message Module -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-message-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-message-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- CODI-Scripting Module -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-scripting-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-scripting-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- OPTIONAL: use the all-in-one jar instead of the individual CODI module dependencies -->

+                <!--dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>

+                    <artifactId>myfaces-extcdi-bundle-jsf20</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>compile</scope>

+                </dependency-->

+            </dependencies>

+        </profile>

+

+        <profile>

+            <!-- Plugin embedded jetty 8 container. 

+                 Just running use:

+                 mvn clean jetty:run

+            -->

+            <!-- For debugging use (attach debugger port 8000):

+                 mvnDebug clean jetty:run

+            -->

+            <id>jettyConfig</id>

+            <activation>

+                <property>

+                    <name>!container</name>

+                </property>

+            </activation>

+            <build>

+                <plugins>

+                    <plugin>

+                        <!--This plugin allows to run the war using mvn jetty:run -->

+                        <groupId>org.mortbay.jetty</groupId>

+                        <artifactId>jetty-maven-plugin</artifactId>

+                        <version>${symbol_dollar}{jetty.maven.plugin.version}</version>

+                        <configuration>

+                            <systemProperties>

+                                <systemProperty>

+                                    <!-- optional to use the ecj compiler -->

+                                    <name>org.apache.jasper.compiler.disablejsr199</name>

+                                    <value>true</value>

+                                </systemProperty>

+                            </systemProperties>

+                            <webApp>

+                                <contextPath>/${symbol_dollar}{artifactId}</contextPath>

+                            </webApp>

+                            <scanIntervalSeconds>5</scanIntervalSeconds>

+                        </configuration>

+                        <dependencies>

+                           <!-- Tld scanning only works when JSF is included

+                                as container dependency. Add other jsf libraries

+                                here, so jetty:run goal can find and process them -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.core</groupId>

+                                <artifactId>myfaces-api</artifactId>

+                                <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.core</groupId>

+                                <artifactId>myfaces-impl</artifactId>

+                                <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-jta_1.1_spec</artifactId>

+                                <version>1.1.1</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-interceptor_1.1_spec</artifactId>

+                                <version>1.0</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-atinject_1.0_spec</artifactId>

+                                <version>1.0</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-jcdi_1.0_spec</artifactId>

+                                <version>1.0</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-validation_1.0_spec</artifactId>

+                                <version>1.1</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-jpa_1.0_spec</artifactId>

+                                <version>1.1.2</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-impl</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-jsf</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-web</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-spi</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-resource</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- MyFaces CODI -->

+                            <!-- the JSF independent core -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.core</groupId>

+                                <artifactId>myfaces-extcdi-core-api</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.core</groupId>

+                                <artifactId>myfaces-extcdi-core-impl</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- the JSF-2.0 specific library, which includes the JSF-1.2 parts -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-jsf20-module-api</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-jsf20-module-impl</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- the BV-1.0 specific library -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-bv1-module-api</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-bv1-module-impl</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- CODI JPA-1.0 Module -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-jpa1-module-api</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-jpa1-module-impl</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- CODI-I18N Message Module -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-message-module-api</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-message-module-impl</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- CODI-Scripting Module -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-scripting-module-api</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-scripting-module-impl</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- OPTIONAL: use the all-in-one jar instead of the individual CODI module dependencies -->

+                            <!--dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>

+                                <artifactId>myfaces-extcdi-bundle-jsf20</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>compile</scope>

+                            </dependency-->

+                        </dependencies>

+                    </plugin>

+                </plugins>

+            </build>

+        </profile>

+        

+        <profile>

+            <id>bundle-mojarra</id>

+            <activation>

+                <property>

+                    <name>jsf</name>

+                    <value>mojarra</value>

+                </property>

+            </activation>

+            <!-- Include Mojarra jars into the war -->

+            <dependencies>

+                <dependency>

+                    <groupId>com.sun.faces</groupId>

+                    <artifactId>jsf-api</artifactId>

+                    <version>${symbol_dollar}{jsf-mojarra.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>com.sun.faces</groupId>

+                    <artifactId>jsf-impl</artifactId>

+                    <version>${symbol_dollar}{jsf-mojarra.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jta_1.1_spec</artifactId>

+                    <version>1.1.1</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-atinject_1.0_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-validation_1.0_spec</artifactId>

+                    <version>1.1</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jpa_1.0_spec</artifactId>

+                    <version>1.1.2</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-impl</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-jsf</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-web</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-spi</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-resource</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- MyFaces CODI -->

+                <!-- the JSF independent core -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.core</groupId>

+                    <artifactId>myfaces-extcdi-core-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.core</groupId>

+                    <artifactId>myfaces-extcdi-core-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- the JSF-2.0 specific library, which includes the JSF-1.2 parts -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-jsf20-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-jsf20-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- the BV-1.0 specific library -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-bv1-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-bv1-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- CODI JPA-1.0 Module -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-jpa1-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-jpa1-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- CODI-I18N Message Module -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-message-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-message-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- CODI-Scripting Module -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-scripting-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-scripting-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- OPTIONAL: use the all-in-one jar instead of the individual CODI module dependencies -->

+                <!--dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>

+                    <artifactId>myfaces-extcdi-bundle-jsf20</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>compile</scope>

+                </dependency-->

+            </dependencies>

+            <repositories>

+                <repository>

+                    <id>java.net</id>

+                    <url>http://download.java.net/maven/2</url>

+                </repository>

+            </repositories>

+        </profile>

+

+        <profile>

+            <!-- Plugin embedded jetty 8 container. 

+                 Just running use:

+                 mvn clean -Dcontainer=jetty-mojarra jetty:run 

+            -->

+            <!-- For debugging use (attach debugger port 8000):

+                 mvn clean -Dcontainer=jetty-mojarra jetty:run 

+            -->

+            <id>jettyConfig-mojarra</id>

+            <activation>

+                <property>

+                    <name>container</name>

+                    <value>jetty-mojarra</value>

+                </property>

+            </activation>

+            <build>

+                <plugins>

+                    <plugin>

+                        <!--This plugin allows to run the war using mvn jetty:run -->

+                        <groupId>org.mortbay.jetty</groupId>

+                        <artifactId>jetty-maven-plugin</artifactId>

+                        <version>${symbol_dollar}{jetty.maven.plugin.version}</version>

+                        <configuration>

+                            <systemProperties>

+                                <systemProperty>

+                                    <!-- optional to use the ecj compiler -->

+                                    <name>org.apache.jasper.compiler.disablejsr199</name>

+                                    <value>true</value>

+                                </systemProperty>

+                            </systemProperties>

+                            <webApp>

+                                <contextPath>/${symbol_dollar}{artifactId}</contextPath>

+                            </webApp>

+                            <scanIntervalSeconds>5</scanIntervalSeconds>

+                        </configuration>

+                        <dependencies>

+                           <!-- Tld scanning only works when JSF is included

+                                as container dependency. Add other jsf libraries

+                                here, so jetty:run goal can find and process them -->

+                           <dependency>

+                               <groupId>com.sun.faces</groupId>

+                               <artifactId>jsf-api</artifactId>

+                               <version>${symbol_dollar}{jsf-mojarra.version}</version>

+                               <scope>compile</scope>

+                           </dependency>

+                           <dependency>

+                               <groupId>com.sun.faces</groupId>

+                               <artifactId>jsf-impl</artifactId>

+                               <version>${symbol_dollar}{jsf-mojarra.version}</version>

+                               <scope>runtime</scope>

+                           </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-jta_1.1_spec</artifactId>

+                                <version>1.1.1</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-interceptor_1.1_spec</artifactId>

+                                <version>1.0</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-atinject_1.0_spec</artifactId>

+                                <version>1.0</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-jcdi_1.0_spec</artifactId>

+                                <version>1.0</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-validation_1.0_spec</artifactId>

+                                <version>1.1</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-jpa_1.0_spec</artifactId>

+                                <version>1.1.2</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-impl</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-jsf</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-web</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-spi</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-resource</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- MyFaces CODI -->

+                            <!-- the JSF independent core -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.core</groupId>

+                                <artifactId>myfaces-extcdi-core-api</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.core</groupId>

+                                <artifactId>myfaces-extcdi-core-impl</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- the JSF-2.0 specific library, which includes the JSF-1.2 parts -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-jsf20-module-api</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-jsf20-module-impl</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- the BV-1.0 specific library -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-bv1-module-api</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-bv1-module-impl</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- CODI JPA-1.0 Module -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-jpa1-module-api</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-jpa1-module-impl</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- CODI-I18N Message Module -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-message-module-api</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-message-module-impl</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- CODI-Scripting Module -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-scripting-module-api</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                                <artifactId>myfaces-extcdi-scripting-module-impl</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <!-- OPTIONAL: use the all-in-one jar instead of the individual CODI module dependencies -->

+                            <!--dependency>

+                                <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>

+                                <artifactId>myfaces-extcdi-bundle-jsf20</artifactId>

+                                <version>${symbol_dollar}{codi.version}</version>

+                                <scope>compile</scope>

+                            </dependency-->

+                        </dependencies>

+                    </plugin>

+                </plugins>

+            </build>

+            <repositories>

+                <repository>

+                    <id>java.net</id>

+                    <url>http://download.java.net/maven/2</url>

+                </repository>

+            </repositories>

+        </profile>

+        

+        <profile>

+            <id>maven-tomcat7</id>

+            <activation>

+                <property>

+                    <name>container</name>

+                    <value>tomcat7</value>

+                </property>

+            </activation>

+            <build>

+                <plugins>

+                    <plugin>

+                      <groupId>org.apache.tomcat.maven</groupId>

+                      <artifactId>tomcat7-maven-plugin</artifactId>

+                      <version>2.0-beta-1</version>

+                    </plugin>

+                </plugins>

+            </build>

+            <dependencies>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-api</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-impl</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jta_1.1_spec</artifactId>

+                    <version>1.1.1</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-atinject_1.0_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-validation_1.0_spec</artifactId>

+                    <version>1.1</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jpa_1.0_spec</artifactId>

+                    <version>1.1.2</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-impl</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-jsf</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-web</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-spi</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-resource</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- MyFaces CODI -->

+                <!-- the JSF independent core -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.core</groupId>

+                    <artifactId>myfaces-extcdi-core-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.core</groupId>

+                    <artifactId>myfaces-extcdi-core-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- the JSF-2.0 specific library, which includes the JSF-1.2 parts -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-jsf20-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-jsf20-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- the BV-1.0 specific library -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-bv1-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-bv1-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- CODI JPA-1.0 Module -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-jpa1-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-jpa1-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- CODI-I18N Message Module -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-message-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-message-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- CODI-Scripting Module -->

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-scripting-module-api</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>

+                    <artifactId>myfaces-extcdi-scripting-module-impl</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- OPTIONAL: use the all-in-one jar instead of the individual CODI module dependencies -->

+                <!--dependency>

+                    <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>

+                    <artifactId>myfaces-extcdi-bundle-jsf20</artifactId>

+                    <version>${symbol_dollar}{codi.version}</version>

+                    <scope>compile</scope>

+                </dependency-->

+            </dependencies>

+        </profile>

+

+    </profiles>

+

+</project>

diff --git a/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
index c676fad..2cb65ed 100644
--- a/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
+++ b/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
@@ -41,13 +41,19 @@
         <param-value>true</param-value>
     </context-param>
     <context-param>
-        <description>State saving method: "client" or "server" (= default)
-            See JSF Specification 2.5.3</description>
+        <description>Define the state method to be used. There are two different options 
+            defined by the specification: 'client' and 'server' state.</description>
         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
-        <param-value>client</param-value>
+        <param-value>server</param-value>
     </context-param>
 
     <!-- MyFaces specific parameters -->
+    <!-- See http://myfaces.apache.org/docindex.html for documentation 
+         about MyFaces Projects -->
+    <!-- See http://myfaces.apache.org/core21/myfaces-impl/webconfig.html 
+         for an updated list of web config parameters for MyFaces Core 
+         See http://wiki.apache.org/myfaces/Secure_Your_Application
+         for instructions about how to secure your web application -->
     <context-param>
         <description>Only applicable if state saving method is "server" (= default).
             Defines the amount (default = 20) of the latest views are stored in session.</description>
@@ -60,7 +66,7 @@
             is written to the session.
             If false the state will not be serialized to a byte stream.</description>
         <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
-        <param-value>true</param-value>
+        <param-value>false</param-value>
     </context-param>
     <context-param>
         <description>Only applicable if state saving method is "server" (= default) and if
@@ -68,49 +74,23 @@
             If true (default) the serialized state will be compressed before it
             is written to the session. If false the state will not be compressed.</description>
         <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <description>This parameter tells MyFaces if javascript code should be allowed in the
-            rendered HTML output.
-            If javascript is allowed, command_link anchors will have javascript code
-            that submits the corresponding form.
-            If javascript is not allowed, the state saving info and nested parameters
-            will be added as url parameters.
-            Default: "true"</description>
-        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
         <param-value>false</param-value>
     </context-param>
     <context-param>
-        <description>If true, rendered HTML code will be formatted, so that it is "human readable".
-            i.e. additional line separators and whitespace will be written, that do not
-            influence the HTML code.
-            Default: "true"</description>
-        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <description>If true, a javascript function will be rendered that is able to restore the
-            former vertical scroll on every request. Convenient feature if you have pages
-            with long lists and you do not want the browser page to always jump to the top
-            if you trigger a link or button action that stays on the same page.
-            Default: "false"</description>
-        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <description>Used for encrypting view state. Only relevant for client side
-            state saving. See MyFaces wiki/web site documentation for instructions
-            on how to configure an application for diffenent encryption strengths.
+        <description>Defines which packages to scan for beans, separated by commas.
+        Useful for when using maven and jetty:run (version 6) or tomcat:run
         </description>
-        <param-name>org.apache.myfaces.SECRET</param-name>
-        <param-value>NzY1NDMyMTA=</param-value>
+        <param-name>org.apache.myfaces.annotation.SCAN_PACKAGES</param-name>
+        <param-value>${package}</param-value>
     </context-param>
 
+    <!-- Listener for OpenWebBeans configuration -->
+    <listener>
+        <listener-class>
+            org.apache.webbeans.servlet.WebBeansConfigurationListener
+        </listener-class>
+    </listener>
+
     <!-- Faces Servlet -->
     <servlet>
         <servlet-name>Faces Servlet</servlet-name>
@@ -129,11 +109,4 @@
         <welcome-file>index.html</welcome-file>
     </welcome-file-list>
 
-    <!-- Listener for OpenWebBeans configuration -->
-    <listener>
-        <listener-class>
-            org.apache.webbeans.servlet.WebBeansConfigurationListener
-        </listener-class>
-    </listener>
-
 </web-app>
diff --git a/maven2-archetypes/myfaces-archetype-helloworld20-debug/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven2-archetypes/myfaces-archetype-helloworld20-debug/src/main/resources/META-INF/maven/archetype-metadata.xml
index b59d06a..291170f 100644
--- a/maven2-archetypes/myfaces-archetype-helloworld20-debug/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/maven2-archetypes/myfaces-archetype-helloworld20-debug/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -39,6 +39,15 @@
       </fileSet>
       <fileSet filtered="false" packaged="false">
           <directory>src/main/webapp/</directory>
+          <excludes>
+              <exclude>WEB-INF/web.xml</exclude>
+          </excludes>
+      </fileSet>
+      <fileSet filtered="true" packaged="false">
+          <directory>src/main/webapp/</directory>
+          <includes>
+              <include>WEB-INF/web.xml</include>
+          </includes>
       </fileSet>
   </fileSets>
 
diff --git a/maven2-archetypes/myfaces-archetype-helloworld20-debug/src/main/resources/archetype-resources/pom.xml b/maven2-archetypes/myfaces-archetype-helloworld20-debug/src/main/resources/archetype-resources/pom.xml
index ece2678..a81cc50 100644
--- a/maven2-archetypes/myfaces-archetype-helloworld20-debug/src/main/resources/archetype-resources/pom.xml
+++ b/maven2-archetypes/myfaces-archetype-helloworld20-debug/src/main/resources/archetype-resources/pom.xml
@@ -41,7 +41,17 @@
       - Run using jetty 
           mvn clean jetty:run
           mvn clean -Dcontainer=jetty-mojarra jetty:run
-        Set your browser to http://localhost:8080/${artifactId}
+          Set your browser to http://localhost:8080/${artifactId}
+      - Run using tomcat
+          mvn clean -Dcontainer=tomcat7 tomcat:run
+          Set your browser to http://localhost:8080/${artifactId}
+      - Run war using tomcat
+          mvn clean -Dcontainer=tomcat7 tomcat:run-war
+          Set your browser to http://localhost:8080/${artifactId}
+      - Run war using jetty (remove <webApp> config inside plugin config first)
+          mvn clean jetty:run-war
+          mvn clean -Dcontainer=jetty-mojarra jetty:run-war
+          Set your browser to http://localhost:8080
       - Build war and bundle JSF jars 
           mvn clean -Pbundle-myfaces install
           mvn clean -Pbundle-mojarra install
@@ -52,9 +62,9 @@
      -->
 
     <properties>
-        <jsf-myfaces.version>2.0.12</jsf-myfaces.version>
-        <jsf-mojarra.version>2.0.9</jsf-mojarra.version>        
-        <jetty.maven.plugin.version>8.1.1.v20120215</jetty.maven.plugin.version>
+        <jsf-myfaces.version>2.1.7</jsf-myfaces.version>
+        <jsf-mojarra.version>2.1.7</jsf-mojarra.version>        
+        <jetty.maven.plugin.version>8.1.3.v20120416</jetty.maven.plugin.version>
         <cargo.version>1.1.1</cargo.version>
     </properties>
 
@@ -350,6 +360,39 @@
         </profile>
         
         <profile>
+            <id>maven-tomcat7</id>
+            <activation>
+                <property>
+                    <name>container</name>
+                    <value>tomcat7</value>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                      <groupId>org.apache.tomcat.maven</groupId>
+                      <artifactId>tomcat7-maven-plugin</artifactId>
+                      <version>2.0-beta-1</version>
+                    </plugin>
+                </plugins>
+            </build>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.myfaces.core</groupId>
+                    <artifactId>myfaces-api</artifactId>
+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>
+                    <scope>compile</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.myfaces.core</groupId>
+                    <artifactId>myfaces-impl</artifactId>
+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>
+                    <scope>runtime</scope>
+                </dependency>
+            </dependencies>
+        </profile>
+
+        <profile>
             <!-- Plugin embedded tomcat 6 container. 
                  Just running use:
                  mvn clean -Dcontainer=tomcat tomcat:run-war 
diff --git a/maven2-archetypes/myfaces-archetype-helloworld20-debug/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/maven2-archetypes/myfaces-archetype-helloworld20-debug/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
index 4ca59cb..5dc3efa 100644
--- a/maven2-archetypes/myfaces-archetype-helloworld20-debug/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
+++ b/maven2-archetypes/myfaces-archetype-helloworld20-debug/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
@@ -41,13 +41,19 @@
         <param-value>true</param-value>
     </context-param>
     <context-param>
-        <description>State saving method: "client" or "server" (= default)
-            See JSF Specification 2.5.3</description>
+        <description>Define the state method to be used. There are two different options 
+            defined by the specification: 'client' and 'server' state.</description>
         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
         <param-value>server</param-value>
     </context-param>
 
     <!-- MyFaces specific parameters -->
+    <!-- See http://myfaces.apache.org/docindex.html for documentation 
+         about MyFaces Projects -->
+    <!-- See http://myfaces.apache.org/core21/myfaces-impl/webconfig.html 
+         for an updated list of web config parameters for MyFaces Core 
+         See http://wiki.apache.org/myfaces/Secure_Your_Application
+         for instructions about how to secure your web application -->
     <context-param>
         <description>Only applicable if state saving method is "server" (= default).
             Defines the amount (default = 20) of the latest views are stored in session.</description>
@@ -60,7 +66,7 @@
             is written to the session.
             If false the state will not be serialized to a byte stream.</description>
         <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
-        <param-value>true</param-value>
+        <param-value>false</param-value>
     </context-param>
     <context-param>
         <description>Only applicable if state saving method is "server" (= default) and if
@@ -68,47 +74,14 @@
             If true (default) the serialized state will be compressed before it
             is written to the session. If false the state will not be compressed.</description>
         <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <description>This parameter tells MyFaces if javascript code should be allowed in the
-            rendered HTML output.
-            If javascript is allowed, command_link anchors will have javascript code
-            that submits the corresponding form.
-            If javascript is not allowed, the state saving info and nested parameters
-            will be added as url parameters.
-            Default: "true"</description>
-        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
         <param-value>false</param-value>
     </context-param>
     <context-param>
-        <description>If true, rendered HTML code will be formatted, so that it is "human readable".
-            i.e. additional line separators and whitespace will be written, that do not
-            influence the HTML code.
-            Default: "true"</description>
-        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <description>If true, a javascript function will be rendered that is able to restore the
-            former vertical scroll on every request. Convenient feature if you have pages
-            with long lists and you do not want the browser page to always jump to the top
-            if you trigger a link or button action that stays on the same page.
-            Default: "false"</description>
-        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <description>Used for encrypting view state. Only relevant for client side
-            state saving. See MyFaces wiki/web site documentation for instructions
-            on how to configure an application for diffenent encryption strengths.
+        <description>Defines which packages to scan for beans, separated by commas.
+        Useful for when using maven and jetty:run (version 6) or tomcat:run
         </description>
-        <param-name>org.apache.myfaces.SECRET</param-name>
-        <param-value>NzY1NDMyMTA=</param-value>
+        <param-name>org.apache.myfaces.annotation.SCAN_PACKAGES</param-name>
+        <param-value>${package}</param-value>
     </context-param>
 
     <!-- Faces Servlet -->
diff --git a/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/META-INF/maven/archetype-metadata.xml
index a73fe72..1155aa6 100644
--- a/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -31,6 +31,15 @@
       </fileSet>
       <fileSet filtered="false" packaged="false">
           <directory>src/main/webapp/</directory>
+          <excludes>
+              <exclude>WEB-INF/web.xml</exclude>
+          </excludes>
+      </fileSet>
+      <fileSet filtered="true" packaged="false">
+          <directory>src/main/webapp/</directory>
+          <includes>
+              <include>WEB-INF/web.xml</include>
+          </includes>
       </fileSet>
       <fileSet filtered="false" packaged="false">
           <directory>src/main/resources/</directory>
diff --git a/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/pom.xml b/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/pom.xml
index b0bb64c..dbff015 100644
--- a/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/pom.xml
+++ b/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/pom.xml
@@ -1,539 +1,637 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * 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.
--->
-
-<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>
-    <groupId>${groupId}</groupId>
-    <artifactId>${artifactId}</artifactId>
-    <packaging>war</packaging>
-    <version>${version}</version>
-    <name>${artifactId}</name>
-    <description>A custom project using MyFaces 2.0 and OpenWebBeans</description>
-    <url>http://www.myorganization.org</url>
-
-    <!-- Instructions 
-      - Run using jetty 
-          mvn clean jetty:run
-          mvn clean -Dcontainer=jetty-mojarra jetty:run
-        Set your browser to http://localhost:8080/${artifactId}
-      - Build war and bundle JSF jars 
-          mvn clean -Pbundle-myfaces install
-          mvn clean -Pbundle-mojarra install
-     -->
-
-    <properties>
-        <jsf-myfaces.version>2.0.12</jsf-myfaces.version>
-        <jsf-mojarra.version>2.0.9</jsf-mojarra.version>        
-        <jetty.maven.plugin.version>8.1.1.v20120215</jetty.maven.plugin.version>
-        <openwebbeans.version>1.1.0</openwebbeans.version>
-    </properties>
-
-    <build>
-        <finalName>${artifactId}</finalName>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <!-- Project dependencies -->
-    <dependencies>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_2.5_spec</artifactId>
-            <version>1.2</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-el_2.2_spec</artifactId>
-            <version>1.0.2</version>
-            <scope>provided</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-annotation_1.0_spec</artifactId>
-            <version>1.1.1</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jta_1.1_spec</artifactId>
-            <version>1.1.1</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-            <version>1.0</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-atinject_1.0_spec</artifactId>
-            <version>1.0</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-            <version>1.0</version>
-            <scope>provided</scope>
-        </dependency>
-        
-        <!-- JSF API: Add here as provided dependency and then add it
-             on jetty-maven-plugin as compile/runtime dependency.
-             The same goes for other JSF libraries. -->
-        <dependency>
-            <groupId>org.apache.myfaces.core</groupId>
-            <artifactId>myfaces-api</artifactId>
-            <version>${symbol_dollar}{jsf-myfaces.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>jstl</artifactId>
-            <version>1.2</version>
-            <scope>runtime</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.8.2</version>
-            <scope>test</scope>
-        </dependency>
-
-    </dependencies>
-
-    <profiles>
-        <profile>
-            <id>bundle-myfaces</id>
-            <activation>
-                <property>
-                    <name>jsf</name>
-                    <value>myfaces</value>
-                </property>
-            </activation>
-            <!-- Include MyFaces jars into the war -->
-            <dependencies>
-                <dependency>
-                    <groupId>org.apache.myfaces.core</groupId>
-                    <artifactId>myfaces-api</artifactId>
-                    <version>${symbol_dollar}{jsf-myfaces.version}</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.core</groupId>
-                    <artifactId>myfaces-impl</artifactId>
-                    <version>${symbol_dollar}{jsf-myfaces.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jta_1.1_spec</artifactId>
-                    <version>1.1.1</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-atinject_1.0_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-impl</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-jsf</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-web</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-spi</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-resource</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-            </dependencies>
-        </profile>
-
-        <profile>
-            <!-- Plugin embedded jetty 8 container. 
-                 Just running use:
-                 mvn clean jetty:run
-            -->
-            <!-- For debugging use (attach debugger port 8000):
-                 mvnDebug clean jetty:run
-            -->
-            <id>jettyConfig</id>
-            <activation>
-                <property>
-                    <name>!container</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <!--This plugin allows to run the war using mvn jetty:run -->
-                        <groupId>org.mortbay.jetty</groupId>
-                        <artifactId>jetty-maven-plugin</artifactId>
-                        <version>${symbol_dollar}{jetty.maven.plugin.version}</version>
-                        <configuration>
-                            <systemProperties>
-                                <systemProperty>
-                                    <!-- optional to use the ecj compiler -->
-                                    <name>org.apache.jasper.compiler.disablejsr199</name>
-                                    <value>true</value>
-                                </systemProperty>
-                            </systemProperties>
-                            <webApp>
-                                <contextPath>/${artifactId}</contextPath>
-                            </webApp>
-                            <scanIntervalSeconds>5</scanIntervalSeconds>
-                        </configuration>
-                        <dependencies>
-                           <!-- Tld scanning only works when JSF is included
-                                as container dependency. Add other jsf libraries
-                                here, so jetty:run goal can find and process them -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.core</groupId>
-                                <artifactId>myfaces-api</artifactId>
-                                <version>${symbol_dollar}{jsf-myfaces.version}</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.core</groupId>
-                                <artifactId>myfaces-impl</artifactId>
-                                <version>${symbol_dollar}{jsf-myfaces.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-jta_1.1_spec</artifactId>
-                                <version>1.1.1</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-                                <version>1.0</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-atinject_1.0_spec</artifactId>
-                                <version>1.0</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-                                <version>1.0</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-impl</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-jsf</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-web</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-spi</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-resource</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                        </dependencies>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-        
-        <profile>
-            <id>bundle-mojarra</id>
-            <activation>
-                <property>
-                    <name>jsf</name>
-                    <value>mojarra</value>
-                </property>
-            </activation>
-            <!-- Include Mojarra jars into the war -->
-            <dependencies>
-                <dependency>
-                    <groupId>com.sun.faces</groupId>
-                    <artifactId>jsf-api</artifactId>
-                    <version>${symbol_dollar}{jsf-mojarra.version}</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>com.sun.faces</groupId>
-                    <artifactId>jsf-impl</artifactId>
-                    <version>${symbol_dollar}{jsf-mojarra.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jta_1.1_spec</artifactId>
-                    <version>1.1.1</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-atinject_1.0_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-                    <version>1.0</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-impl</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-jsf</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-web</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-spi</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-resource</artifactId>
-                    <version>${symbol_dollar}{openwebbeans.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-            </dependencies>
-            <repositories>
-                <repository>
-                    <id>java.net</id>
-                    <url>http://download.java.net/maven/2</url>
-                </repository>
-            </repositories>
-        </profile>
-
-        <profile>
-            <!-- Plugin embedded jetty 8 container. 
-                 Just running use:
-                 mvn clean -Dcontainer=jetty-mojarra jetty:run 
-            -->
-            <!-- For debugging use (attach debugger port 8000):
-                 mvn clean -Dcontainer=jetty-mojarra jetty:run 
-            -->
-            <id>jettyConfig-mojarra</id>
-            <activation>
-                <property>
-                    <name>container</name>
-                    <value>jetty-mojarra</value>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <!--This plugin allows to run the war using mvn jetty:run -->
-                        <groupId>org.mortbay.jetty</groupId>
-                        <artifactId>jetty-maven-plugin</artifactId>
-                        <version>${symbol_dollar}{jetty.maven.plugin.version}</version>
-                        <configuration>
-                            <systemProperties>
-                                <systemProperty>
-                                    <!-- optional to use the ecj compiler -->
-                                    <name>org.apache.jasper.compiler.disablejsr199</name>
-                                    <value>true</value>
-                                </systemProperty>
-                            </systemProperties>
-                            <webApp>
-                                <contextPath>/${artifactId}</contextPath>
-                            </webApp>
-                            <scanIntervalSeconds>5</scanIntervalSeconds>
-                        </configuration>
-                        <dependencies>
-                           <!-- Tld scanning only works when JSF is included
-                                as container dependency. Add other jsf libraries
-                                here, so jetty:run goal can find and process them -->
-                           <dependency>
-                               <groupId>com.sun.faces</groupId>
-                               <artifactId>jsf-api</artifactId>
-                               <version>${symbol_dollar}{jsf-mojarra.version}</version>
-                               <scope>compile</scope>
-                           </dependency>
-                           <dependency>
-                               <groupId>com.sun.faces</groupId>
-                               <artifactId>jsf-impl</artifactId>
-                               <version>${symbol_dollar}{jsf-mojarra.version}</version>
-                               <scope>runtime</scope>
-                           </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-jta_1.1_spec</artifactId>
-                                <version>1.1.1</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-                                <version>1.0</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-atinject_1.0_spec</artifactId>
-                                <version>1.0</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.geronimo.specs</groupId>
-                                <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-                                <version>1.0</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-impl</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-jsf</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-web</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-spi</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.openwebbeans</groupId>
-                                <artifactId>openwebbeans-resource</artifactId>
-                                <version>${symbol_dollar}{openwebbeans.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                        </dependencies>
-                    </plugin>
-                </plugins>
-            </build>
-            <repositories>
-                <repository>
-                    <id>java.net</id>
-                    <url>http://download.java.net/maven/2</url>
-                </repository>
-            </repositories>
-        </profile>
-    </profiles>
-
-</project>
+#set( $symbol_pound = '#' )

+#set( $symbol_dollar = '$' )

+#set( $symbol_escape = '\' )

+<?xml version="1.0" encoding="UTF-8"?>

+

+<!--

+ * 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.

+-->

+

+<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>

+    <groupId>${groupId}</groupId>

+    <artifactId>${artifactId}</artifactId>

+    <packaging>war</packaging>

+    <version>${version}</version>

+    <name>${artifactId}</name>

+    <description>A custom project using MyFaces 2.0 and OpenWebBeans</description>

+    <url>http://www.myorganization.org</url>

+

+    <!-- Instructions 

+      - Run using jetty 

+          mvn clean jetty:run

+          mvn clean -Dcontainer=jetty-mojarra jetty:run

+          Set your browser to http://localhost:8080/${artifactId}

+      - Run using tomcat

+          mvn clean -Dcontainer=tomcat7 tomcat:run

+          Set your browser to http://localhost:8080/${artifactId}

+      - Run war using tomcat

+          mvn clean -Dcontainer=tomcat7 tomcat:run-war

+          Set your browser to http://localhost:8080/${artifactId}

+      - Run war using jetty (remove <webApp> config inside plugin config first)

+          mvn clean jetty:run-war

+          mvn clean -Dcontainer=jetty-mojarra jetty:run-war

+          Set your browser to http://localhost:8080

+      - Build war and bundle JSF jars 

+          mvn clean -Pbundle-myfaces install

+          mvn clean -Pbundle-mojarra install

+     -->

+

+    <properties>

+        <jsf-myfaces.version>2.1.7</jsf-myfaces.version>

+        <jsf-mojarra.version>2.1.7</jsf-mojarra.version>        

+        <jetty.maven.plugin.version>8.1.3.v20120416</jetty.maven.plugin.version>

+        <openwebbeans.version>1.1.4</openwebbeans.version>

+    </properties>

+

+    <build>

+        <finalName>${artifactId}</finalName>

+        <plugins>

+            <plugin>

+                <groupId>org.apache.maven.plugins</groupId>

+                <artifactId>maven-compiler-plugin</artifactId>

+                <configuration>

+                    <source>1.5</source>

+                    <target>1.5</target>

+                </configuration>

+            </plugin>

+        </plugins>

+    </build>

+

+    <!-- Project dependencies -->

+    <dependencies>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-servlet_2.5_spec</artifactId>

+            <version>1.2</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-el_2.2_spec</artifactId>

+            <version>1.0.2</version>

+            <scope>provided</scope>

+        </dependency>

+        

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-annotation_1.0_spec</artifactId>

+            <version>1.1.1</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-jta_1.1_spec</artifactId>

+            <version>1.1.1</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-interceptor_1.1_spec</artifactId>

+            <version>1.0</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-atinject_1.0_spec</artifactId>

+            <version>1.0</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-jcdi_1.0_spec</artifactId>

+            <version>1.0</version>

+            <scope>provided</scope>

+        </dependency>

+        

+        <!-- JSF API: Add here as provided dependency and then add it

+             on jetty-maven-plugin as compile/runtime dependency.

+             The same goes for other JSF libraries. -->

+        <dependency>

+            <groupId>org.apache.myfaces.core</groupId>

+            <artifactId>myfaces-api</artifactId>

+            <version>${symbol_dollar}{jsf-myfaces.version}</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>javax.servlet</groupId>

+            <artifactId>jstl</artifactId>

+            <version>1.2</version>

+            <scope>runtime</scope>

+        </dependency>

+        

+        <dependency>

+            <groupId>junit</groupId>

+            <artifactId>junit</artifactId>

+            <version>4.8.2</version>

+            <scope>test</scope>

+        </dependency>

+

+    </dependencies>

+

+    <profiles>

+        <profile>

+            <id>bundle-myfaces</id>

+            <activation>

+                <property>

+                    <name>jsf</name>

+                    <value>myfaces</value>

+                </property>

+            </activation>

+            <!-- Include MyFaces jars into the war -->

+            <dependencies>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-api</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-impl</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jta_1.1_spec</artifactId>

+                    <version>1.1.1</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-atinject_1.0_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-impl</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-jsf</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-web</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-spi</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-resource</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+            </dependencies>

+        </profile>

+

+        <profile>

+            <!-- Plugin embedded jetty 8 container. 

+                 Just running use:

+                 mvn clean jetty:run

+            -->

+            <!-- For debugging use (attach debugger port 8000):

+                 mvnDebug clean jetty:run

+            -->

+            <id>jettyConfig</id>

+            <activation>

+                <property>

+                    <name>!container</name>

+                </property>

+            </activation>

+            <build>

+                <plugins>

+                    <plugin>

+                        <!--This plugin allows to run the war using mvn jetty:run -->

+                        <groupId>org.mortbay.jetty</groupId>

+                        <artifactId>jetty-maven-plugin</artifactId>

+                        <version>${symbol_dollar}{jetty.maven.plugin.version}</version>

+                        <configuration>

+                            <systemProperties>

+                                <systemProperty>

+                                    <!-- optional to use the ecj compiler -->

+                                    <name>org.apache.jasper.compiler.disablejsr199</name>

+                                    <value>true</value>

+                                </systemProperty>

+                            </systemProperties>

+                            <webApp>

+                                <contextPath>/${symbol_dollar}{artifactId}</contextPath>

+                            </webApp>

+                            <scanIntervalSeconds>5</scanIntervalSeconds>

+                        </configuration>

+                        <dependencies>

+                           <!-- Tld scanning only works when JSF is included

+                                as container dependency. Add other jsf libraries

+                                here, so jetty:run goal can find and process them -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.core</groupId>

+                                <artifactId>myfaces-api</artifactId>

+                                <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.core</groupId>

+                                <artifactId>myfaces-impl</artifactId>

+                                <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-jta_1.1_spec</artifactId>

+                                <version>1.1.1</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-interceptor_1.1_spec</artifactId>

+                                <version>1.0</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-atinject_1.0_spec</artifactId>

+                                <version>1.0</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-jcdi_1.0_spec</artifactId>

+                                <version>1.0</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-impl</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-jsf</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-web</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-spi</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-resource</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                        </dependencies>

+                    </plugin>

+                </plugins>

+            </build>

+        </profile>

+        

+        <profile>

+            <id>bundle-mojarra</id>

+            <activation>

+                <property>

+                    <name>jsf</name>

+                    <value>mojarra</value>

+                </property>

+            </activation>

+            <!-- Include Mojarra jars into the war -->

+            <dependencies>

+                <dependency>

+                    <groupId>com.sun.faces</groupId>

+                    <artifactId>jsf-api</artifactId>

+                    <version>${symbol_dollar}{jsf-mojarra.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>com.sun.faces</groupId>

+                    <artifactId>jsf-impl</artifactId>

+                    <version>${symbol_dollar}{jsf-mojarra.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jta_1.1_spec</artifactId>

+                    <version>1.1.1</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-atinject_1.0_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-impl</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-jsf</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-web</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-spi</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-resource</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+            </dependencies>

+            <repositories>

+                <repository>

+                    <id>java.net</id>

+                    <url>http://download.java.net/maven/2</url>

+                </repository>

+            </repositories>

+        </profile>

+

+        <profile>

+            <!-- Plugin embedded jetty 8 container. 

+                 Just running use:

+                 mvn clean -Dcontainer=jetty-mojarra jetty:run 

+            -->

+            <!-- For debugging use (attach debugger port 8000):

+                 mvn clean -Dcontainer=jetty-mojarra jetty:run 

+            -->

+            <id>jettyConfig-mojarra</id>

+            <activation>

+                <property>

+                    <name>container</name>

+                    <value>jetty-mojarra</value>

+                </property>

+            </activation>

+            <build>

+                <plugins>

+                    <plugin>

+                        <!--This plugin allows to run the war using mvn jetty:run -->

+                        <groupId>org.mortbay.jetty</groupId>

+                        <artifactId>jetty-maven-plugin</artifactId>

+                        <version>${symbol_dollar}{jetty.maven.plugin.version}</version>

+                        <configuration>

+                            <systemProperties>

+                                <systemProperty>

+                                    <!-- optional to use the ecj compiler -->

+                                    <name>org.apache.jasper.compiler.disablejsr199</name>

+                                    <value>true</value>

+                                </systemProperty>

+                            </systemProperties>

+                            <webApp>

+                                <contextPath>/${symbol_dollar}{artifactId}</contextPath>

+                            </webApp>

+                            <scanIntervalSeconds>5</scanIntervalSeconds>

+                        </configuration>

+                        <dependencies>

+                           <!-- Tld scanning only works when JSF is included

+                                as container dependency. Add other jsf libraries

+                                here, so jetty:run goal can find and process them -->

+                           <dependency>

+                               <groupId>com.sun.faces</groupId>

+                               <artifactId>jsf-api</artifactId>

+                               <version>${symbol_dollar}{jsf-mojarra.version}</version>

+                               <scope>compile</scope>

+                           </dependency>

+                           <dependency>

+                               <groupId>com.sun.faces</groupId>

+                               <artifactId>jsf-impl</artifactId>

+                               <version>${symbol_dollar}{jsf-mojarra.version}</version>

+                               <scope>runtime</scope>

+                           </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-jta_1.1_spec</artifactId>

+                                <version>1.1.1</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-interceptor_1.1_spec</artifactId>

+                                <version>1.0</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-atinject_1.0_spec</artifactId>

+                                <version>1.0</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.geronimo.specs</groupId>

+                                <artifactId>geronimo-jcdi_1.0_spec</artifactId>

+                                <version>1.0</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-impl</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-jsf</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-web</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-spi</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.openwebbeans</groupId>

+                                <artifactId>openwebbeans-resource</artifactId>

+                                <version>${symbol_dollar}{openwebbeans.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                        </dependencies>

+                    </plugin>

+                </plugins>

+            </build>

+            <repositories>

+                <repository>

+                    <id>java.net</id>

+                    <url>http://download.java.net/maven/2</url>

+                </repository>

+            </repositories>

+        </profile>

+        

+        <profile>

+            <id>maven-tomcat7</id>

+            <activation>

+                <property>

+                    <name>container</name>

+                    <value>tomcat7</value>

+                </property>

+            </activation>

+            <build>

+                <plugins>

+                    <plugin>

+                      <groupId>org.apache.tomcat.maven</groupId>

+                      <artifactId>tomcat7-maven-plugin</artifactId>

+                      <version>2.0-beta-1</version>

+                    </plugin>

+                </plugins>

+            </build>

+            <dependencies>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-api</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-impl</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jta_1.1_spec</artifactId>

+                    <version>1.1.1</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-atinject_1.0_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.geronimo.specs</groupId>

+                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>

+                    <version>1.0</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-impl</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-jsf</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-web</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-spi</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.openwebbeans</groupId>

+                    <artifactId>openwebbeans-resource</artifactId>

+                    <version>${symbol_dollar}{openwebbeans.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+            </dependencies>

+        </profile>

+

+    </profiles>

+

+</project>

diff --git a/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
index 946a125..111f637 100644
--- a/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
+++ b/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
@@ -41,13 +41,19 @@
         <param-value>true</param-value>
     </context-param>
     <context-param>
-        <description>State saving method: "client" or "server" (= default)
-            See JSF Specification 2.5.3</description>
+        <description>Define the state method to be used. There are two different options 
+            defined by the specification: 'client' and 'server' state.</description>
         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
-        <param-value>client</param-value>
+        <param-value>server</param-value>
     </context-param>
 
     <!-- MyFaces specific parameters -->
+    <!-- See http://myfaces.apache.org/docindex.html for documentation 
+         about MyFaces Projects -->
+    <!-- See http://myfaces.apache.org/core21/myfaces-impl/webconfig.html 
+         for an updated list of web config parameters for MyFaces Core 
+         See http://wiki.apache.org/myfaces/Secure_Your_Application
+         for instructions about how to secure your web application -->
     <context-param>
         <description>Only applicable if state saving method is "server" (= default).
             Defines the amount (default = 20) of the latest views are stored in session.</description>
@@ -60,7 +66,7 @@
             is written to the session.
             If false the state will not be serialized to a byte stream.</description>
         <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
-        <param-value>true</param-value>
+        <param-value>false</param-value>
     </context-param>
     <context-param>
         <description>Only applicable if state saving method is "server" (= default) and if
@@ -68,47 +74,14 @@
             If true (default) the serialized state will be compressed before it
             is written to the session. If false the state will not be compressed.</description>
         <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <description>This parameter tells MyFaces if javascript code should be allowed in the
-            rendered HTML output.
-            If javascript is allowed, command_link anchors will have javascript code
-            that submits the corresponding form.
-            If javascript is not allowed, the state saving info and nested parameters
-            will be added as url parameters.
-            Default: "true"</description>
-        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
         <param-value>false</param-value>
     </context-param>
     <context-param>
-        <description>If true, rendered HTML code will be formatted, so that it is "human readable".
-            i.e. additional line separators and whitespace will be written, that do not
-            influence the HTML code.
-            Default: "true"</description>
-        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <description>If true, a javascript function will be rendered that is able to restore the
-            former vertical scroll on every request. Convenient feature if you have pages
-            with long lists and you do not want the browser page to always jump to the top
-            if you trigger a link or button action that stays on the same page.
-            Default: "false"</description>
-        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <description>Used for encrypting view state. Only relevant for client side
-            state saving. See MyFaces wiki/web site documentation for instructions
-            on how to configure an application for diffenent encryption strengths.
+        <description>Defines which packages to scan for beans, separated by commas.
+        Useful for when using maven and jetty:run (version 6) or tomcat:run
         </description>
-        <param-name>org.apache.myfaces.SECRET</param-name>
-        <param-value>NzY1NDMyMTA=</param-value>
+        <param-name>org.apache.myfaces.annotation.SCAN_PACKAGES</param-name>
+        <param-value>${package}</param-value>
     </context-param>
 
 	<!-- Listener for OpenWebBeans configuration -->
diff --git a/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/src/main/webapp/page2.xhtml b/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/src/main/webapp/page2.xhtml
index a81f30b..0f2df6d 100644
--- a/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/src/main/webapp/page2.xhtml
+++ b/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/src/main/webapp/page2.xhtml
@@ -35,4 +35,3 @@
     </div>
 </h:body>
 </html>
-        
\ No newline at end of file
diff --git a/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/src/main/webapp/resources/css/style.css b/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/src/main/webapp/resources/css/style.css
index 6ec3481..5d1ec09 100644
--- a/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/src/main/webapp/resources/css/style.css
+++ b/maven2-archetypes/myfaces-archetype-helloworld20-owb/src/main/resources/archetype-resources/src/main/webapp/resources/css/style.css
@@ -16,6 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+
 body {
     background-color: rgb(0, 35, 75);
     font-family: tahoma, arial, helvetica, sans-serif;
@@ -31,4 +32,4 @@
 
 h1 {
     font-size: 20px;
-}
\ No newline at end of file
+}
diff --git a/maven2-archetypes/myfaces-archetype-helloworld20/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven2-archetypes/myfaces-archetype-helloworld20/src/main/resources/META-INF/maven/archetype-metadata.xml
index 93a1096..322108f 100644
--- a/maven2-archetypes/myfaces-archetype-helloworld20/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/maven2-archetypes/myfaces-archetype-helloworld20/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -1,39 +1,48 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
-                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                      xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
-
-                      name="myfaces-archetype-helloworld20" partial="false">
-
-  <requiredProperties/>
-
-  <fileSets>
-      <fileSet filtered="true" packaged="true">
-          <directory>src/main/java/</directory>
-      </fileSet>
-      <fileSet filtered="false" packaged="false">
-          <directory>src/main/webapp/</directory>
-      </fileSet>
-  </fileSets>
-
-  <modules/>
-
-</archetype-descriptor>
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+    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.

+-->

+<archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"

+                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

+                      xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"

+

+                      name="myfaces-archetype-helloworld20" partial="false">

+

+  <requiredProperties/>

+

+  <fileSets>

+      <fileSet filtered="true" packaged="true">

+          <directory>src/main/java/</directory>

+      </fileSet>

+      <fileSet filtered="false" packaged="false">

+          <directory>src/main/webapp/</directory>

+          <excludes>

+              <exclude>WEB-INF/web.xml</exclude>

+          </excludes>

+      </fileSet>

+      <fileSet filtered="true" packaged="false">

+          <directory>src/main/webapp/</directory>

+          <includes>

+              <include>WEB-INF/web.xml</include>

+          </includes>

+      </fileSet>

+  </fileSets>

+

+  <modules/>

+

+</archetype-descriptor>

diff --git a/maven2-archetypes/myfaces-archetype-helloworld20/src/main/resources/archetype-resources/pom.xml b/maven2-archetypes/myfaces-archetype-helloworld20/src/main/resources/archetype-resources/pom.xml
index 8606d35..2ce5e3d 100644
--- a/maven2-archetypes/myfaces-archetype-helloworld20/src/main/resources/archetype-resources/pom.xml
+++ b/maven2-archetypes/myfaces-archetype-helloworld20/src/main/resources/archetype-resources/pom.xml
@@ -1,294 +1,338 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * 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.
--->
-
-<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>
-    <groupId>${groupId}</groupId>
-    <artifactId>${artifactId}</artifactId>
-    <packaging>war</packaging>
-    <version>${version}</version>
-    <name>${artifactId}</name>
-    <description>A custom project using MyFaces 2.0</description>
-    <url>http://www.myorganization.org</url>
-
-    <!-- Instructions 
-      - Run using jetty 
-          mvn clean jetty:run
-          mvn clean -Dcontainer=jetty-mojarra jetty:run
-        Set your browser to http://localhost:8080/${artifactId}
-      - Build war and bundle JSF jars 
-          mvn clean -Pbundle-myfaces install
-          mvn clean -Pbundle-mojarra install
-     -->
-
-    <properties>
-        <jsf-myfaces.version>2.0.12</jsf-myfaces.version>
-        <jsf-mojarra.version>2.0.9</jsf-mojarra.version>        
-        <jetty.maven.plugin.version>8.1.1.v20120215</jetty.maven.plugin.version>
-    </properties>
-
-    <build>
-        <finalName>${artifactId}</finalName>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <!-- Project dependencies -->
-    <dependencies>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_2.5_spec</artifactId>
-            <version>1.2</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-el_2.2_spec</artifactId>
-            <version>1.0.2</version>
-            <scope>provided</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-annotation_1.0_spec</artifactId>
-            <version>1.1.1</version>
-            <scope>provided</scope>
-        </dependency>
-        
-        <!-- JSF API: Add here as provided dependency and then add it
-             on jetty-maven-plugin as compile/runtime dependency.
-             The same goes for other JSF libraries. -->
-        <dependency>
-            <groupId>org.apache.myfaces.core</groupId>
-            <artifactId>myfaces-api</artifactId>
-            <version>${symbol_dollar}{jsf-myfaces.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>jstl</artifactId>
-            <version>1.2</version>
-            <scope>runtime</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.8.2</version>
-            <scope>test</scope>
-        </dependency>
-
-    </dependencies>
-
-    <profiles>
-        <profile>
-            <id>bundle-myfaces</id>
-            <activation>
-                <property>
-                    <name>jsf</name>
-                    <value>myfaces</value>
-                </property>
-            </activation>
-            <!-- Include MyFaces jars into the war -->
-            <dependencies>
-                <dependency>
-                    <groupId>org.apache.myfaces.core</groupId>
-                    <artifactId>myfaces-api</artifactId>
-                    <version>${symbol_dollar}{jsf-myfaces.version}</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.myfaces.core</groupId>
-                    <artifactId>myfaces-impl</artifactId>
-                    <version>${symbol_dollar}{jsf-myfaces.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-            </dependencies>
-        </profile>
-
-        <profile>
-            <!-- Plugin embedded jetty 8 container. 
-                 Just running use:
-                 mvn clean jetty:run
-            -->
-            <!-- For debugging use (attach debugger port 8000):
-                 mvnDebug clean jetty:run
-            -->
-            <id>jettyConfig</id>
-            <activation>
-                <property>
-                    <name>!container</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <!--This plugin allows to run the war using mvn jetty:run -->
-                        <groupId>org.mortbay.jetty</groupId>
-                        <artifactId>jetty-maven-plugin</artifactId>
-                        <version>${symbol_dollar}{jetty.maven.plugin.version}</version>
-                        <configuration>
-                            <systemProperties>
-                                <systemProperty>
-                                    <!-- optional to use the ecj compiler -->
-                                    <name>org.apache.jasper.compiler.disablejsr199</name>
-                                    <value>true</value>
-                                </systemProperty>
-                            </systemProperties>
-                            <webApp>
-                                <contextPath>/${artifactId}</contextPath>
-                            </webApp>
-                            <scanIntervalSeconds>5</scanIntervalSeconds>
-                        </configuration>
-                        <dependencies>
-                           <!-- Tld scanning only works when JSF is included
-                                as container dependency. Add other jsf libraries
-                                here, so jetty:run goal can find and process them -->
-                            <dependency>
-                                <groupId>org.apache.myfaces.core</groupId>
-                                <artifactId>myfaces-api</artifactId>
-                                <version>${symbol_dollar}{jsf-myfaces.version}</version>
-                                <scope>compile</scope>
-                            </dependency>
-                            <dependency>
-                                <groupId>org.apache.myfaces.core</groupId>
-                                <artifactId>myfaces-impl</artifactId>
-                                <version>${symbol_dollar}{jsf-myfaces.version}</version>
-                                <scope>runtime</scope>
-                            </dependency>
-                        </dependencies>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-        
-        <profile>
-            <id>bundle-mojarra</id>
-            <activation>
-                <property>
-                    <name>jsf</name>
-                    <value>mojarra</value>
-                </property>
-            </activation>
-            <!-- Include Mojarra jars into the war -->
-            <dependencies>
-                <dependency>
-                    <groupId>com.sun.faces</groupId>
-                    <artifactId>jsf-api</artifactId>
-                    <version>${symbol_dollar}{jsf-mojarra.version}</version>
-                    <scope>compile</scope>
-                </dependency>
-                <dependency>
-                    <groupId>com.sun.faces</groupId>
-                    <artifactId>jsf-impl</artifactId>
-                    <version>${symbol_dollar}{jsf-mojarra.version}</version>
-                    <scope>runtime</scope>
-                </dependency>
-            </dependencies>
-            <repositories>
-                <repository>
-                    <id>java.net</id>
-                    <url>http://download.java.net/maven/2</url>
-                </repository>
-            </repositories>
-        </profile>
-
-        <profile>
-            <!-- Plugin embedded jetty 8 container. 
-                 Just running use:
-                 mvn clean -Dcontainer=jetty-mojarra jetty:run 
-            -->
-            <!-- For debugging use (attach debugger port 8000):
-                 mvn clean -Dcontainer=jetty-mojarra jetty:run 
-            -->
-            <id>jettyConfig-mojarra</id>
-            <activation>
-                <property>
-                    <name>container</name>
-                    <value>jetty-mojarra</value>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <!--This plugin allows to run the war using mvn jetty:run -->
-                        <groupId>org.mortbay.jetty</groupId>
-                        <artifactId>jetty-maven-plugin</artifactId>
-                        <version>${symbol_dollar}{jetty.maven.plugin.version}</version>
-                        <configuration>
-                            <systemProperties>
-                                <systemProperty>
-                                    <!-- optional to use the ecj compiler -->
-                                    <name>org.apache.jasper.compiler.disablejsr199</name>
-                                    <value>true</value>
-                                </systemProperty>
-                            </systemProperties>
-                            <webApp>
-                                <contextPath>/${artifactId}</contextPath>
-                            </webApp>
-                            <scanIntervalSeconds>5</scanIntervalSeconds>
-                        </configuration>
-                        <dependencies>
-                           <!-- Tld scanning only works when JSF is included
-                                as container dependency. Add other jsf libraries
-                                here, so jetty:run goal can find and process them -->
-                           <dependency>
-                               <groupId>com.sun.faces</groupId>
-                               <artifactId>jsf-api</artifactId>
-                               <version>${symbol_dollar}{jsf-mojarra.version}</version>
-                               <scope>compile</scope>
-                           </dependency>
-                           <dependency>
-                               <groupId>com.sun.faces</groupId>
-                               <artifactId>jsf-impl</artifactId>
-                               <version>${symbol_dollar}{jsf-mojarra.version}</version>
-                               <scope>runtime</scope>
-                           </dependency>
-                        </dependencies>
-                    </plugin>
-                </plugins>
-            </build>
-            <repositories>
-                <repository>
-                    <id>java.net</id>
-                    <url>http://download.java.net/maven/2</url>
-                </repository>
-            </repositories>
-        </profile>
-    </profiles>
-
-</project>
+#set( $symbol_pound = '#' )

+#set( $symbol_dollar = '$' )

+#set( $symbol_escape = '\' )

+<?xml version="1.0" encoding="UTF-8"?>

+

+<!--

+ * 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.

+-->

+

+<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>

+    <groupId>${groupId}</groupId>

+    <artifactId>${artifactId}</artifactId>

+    <packaging>war</packaging>

+    <version>${version}</version>

+    <name>${artifactId}</name>

+    <description>A custom project using MyFaces 2.0</description>

+    <url>http://www.myorganization.org</url>

+

+    <!-- Instructions 

+      - Run using jetty 

+          mvn clean jetty:run

+          mvn clean -Dcontainer=jetty-mojarra jetty:run

+          Set your browser to http://localhost:8080/${artifactId}

+      - Run using tomcat

+          mvn clean -Dcontainer=tomcat7 tomcat:run

+          Set your browser to http://localhost:8080/${artifactId}

+      - Run war using tomcat

+          mvn clean -Dcontainer=tomcat7 tomcat:run-war

+          Set your browser to http://localhost:8080/${artifactId}

+      - Run war using jetty (remove <webApp> config inside plugin config first)

+          mvn clean jetty:run-war

+          mvn clean -Dcontainer=jetty-mojarra jetty:run-war

+          Set your browser to http://localhost:8080

+      - Build war and bundle JSF jars 

+          mvn clean -Pbundle-myfaces install

+          mvn clean -Pbundle-mojarra install

+     -->

+

+    <properties>

+        <jsf-myfaces.version>2.1.7</jsf-myfaces.version>

+        <jsf-mojarra.version>2.1.7</jsf-mojarra.version>        

+        <jetty.maven.plugin.version>8.1.3.v20120416</jetty.maven.plugin.version>

+    </properties>

+

+    <build>

+        <finalName>${artifactId}</finalName>

+        <plugins>

+            <plugin>

+                <groupId>org.apache.maven.plugins</groupId>

+                <artifactId>maven-compiler-plugin</artifactId>

+                <configuration>

+                    <source>1.5</source>

+                    <target>1.5</target>

+                </configuration>

+            </plugin>

+        </plugins>

+    </build>

+

+    <!-- Project dependencies -->

+    <dependencies>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-servlet_2.5_spec</artifactId>

+            <version>1.2</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-el_2.2_spec</artifactId>

+            <version>1.0.2</version>

+            <scope>provided</scope>

+        </dependency>

+        

+        <dependency>

+            <groupId>org.apache.geronimo.specs</groupId>

+            <artifactId>geronimo-annotation_1.0_spec</artifactId>

+            <version>1.1.1</version>

+            <scope>provided</scope>

+        </dependency>

+        

+        <!-- JSF API: Add here as provided dependency and then add it

+             on jetty-maven-plugin as compile/runtime dependency.

+             The same goes for other JSF libraries. -->

+        <dependency>

+            <groupId>org.apache.myfaces.core</groupId>

+            <artifactId>myfaces-api</artifactId>

+            <version>${symbol_dollar}{jsf-myfaces.version}</version>

+            <scope>provided</scope>

+        </dependency>

+

+        <dependency>

+            <groupId>javax.servlet</groupId>

+            <artifactId>jstl</artifactId>

+            <version>1.2</version>

+            <scope>runtime</scope>

+        </dependency>

+        

+        <dependency>

+            <groupId>junit</groupId>

+            <artifactId>junit</artifactId>

+            <version>4.8.2</version>

+            <scope>test</scope>

+        </dependency>

+

+    </dependencies>

+

+    <profiles>

+        <profile>

+            <id>bundle-myfaces</id>

+            <activation>

+                <property>

+                    <name>jsf</name>

+                    <value>myfaces</value>

+                </property>

+            </activation>

+            <!-- Include MyFaces jars into the war -->

+            <dependencies>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-api</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-impl</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+            </dependencies>

+        </profile>

+

+        <profile>

+            <!-- Plugin embedded jetty 8 container. 

+                 Just running use:

+                 mvn clean jetty:run

+            -->

+            <!-- For debugging use (attach debugger port 8000):

+                 mvnDebug clean jetty:run

+            -->

+            <id>jettyConfig</id>

+            <activation>

+                <property>

+                    <name>!container</name>

+                </property>

+            </activation>

+            <build>

+                <plugins>

+                    <plugin>

+                        <!--This plugin allows to run the war using mvn jetty:run -->

+                        <groupId>org.mortbay.jetty</groupId>

+                        <artifactId>jetty-maven-plugin</artifactId>

+                        <version>${symbol_dollar}{jetty.maven.plugin.version}</version>

+                        <configuration>

+                            <systemProperties>

+                                <systemProperty>

+                                    <!-- optional to use the ecj compiler -->

+                                    <name>org.apache.jasper.compiler.disablejsr199</name>

+                                    <value>true</value>

+                                </systemProperty>

+                            </systemProperties>

+                            <webApp>

+                                <contextPath>/${symbol_dollar}{artifactId}</contextPath>

+                            </webApp>

+                            <scanIntervalSeconds>5</scanIntervalSeconds>

+                        </configuration>

+                        <dependencies>

+                           <!-- Tld scanning only works when JSF is included

+                                as container dependency. Add other jsf libraries

+                                here, so jetty:run goal can find and process them -->

+                            <dependency>

+                                <groupId>org.apache.myfaces.core</groupId>

+                                <artifactId>myfaces-api</artifactId>

+                                <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                                <scope>compile</scope>

+                            </dependency>

+                            <dependency>

+                                <groupId>org.apache.myfaces.core</groupId>

+                                <artifactId>myfaces-impl</artifactId>

+                                <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                                <scope>runtime</scope>

+                            </dependency>

+                        </dependencies>

+                    </plugin>

+                </plugins>

+            </build>

+        </profile>

+        

+        <profile>

+            <id>bundle-mojarra</id>

+            <activation>

+                <property>

+                    <name>jsf</name>

+                    <value>mojarra</value>

+                </property>

+            </activation>

+            <!-- Include Mojarra jars into the war -->

+            <dependencies>

+                <dependency>

+                    <groupId>com.sun.faces</groupId>

+                    <artifactId>jsf-api</artifactId>

+                    <version>${symbol_dollar}{jsf-mojarra.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>com.sun.faces</groupId>

+                    <artifactId>jsf-impl</artifactId>

+                    <version>${symbol_dollar}{jsf-mojarra.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+            </dependencies>

+            <repositories>

+                <repository>

+                    <id>java.net</id>

+                    <url>http://download.java.net/maven/2</url>

+                </repository>

+            </repositories>

+        </profile>

+

+        <profile>

+            <!-- Plugin embedded jetty 8 container. 

+                 Just running use:

+                 mvn clean -Dcontainer=jetty-mojarra jetty:run 

+            -->

+            <!-- For debugging use (attach debugger port 8000):

+                 mvn clean -Dcontainer=jetty-mojarra jetty:run 

+            -->

+            <id>jettyConfig-mojarra</id>

+            <activation>

+                <property>

+                    <name>container</name>

+                    <value>jetty-mojarra</value>

+                </property>

+            </activation>

+            <build>

+                <plugins>

+                    <plugin>

+                        <!--This plugin allows to run the war using mvn jetty:run -->

+                        <groupId>org.mortbay.jetty</groupId>

+                        <artifactId>jetty-maven-plugin</artifactId>

+                        <version>${symbol_dollar}{jetty.maven.plugin.version}</version>

+                        <configuration>

+                            <systemProperties>

+                                <systemProperty>

+                                    <!-- optional to use the ecj compiler -->

+                                    <name>org.apache.jasper.compiler.disablejsr199</name>

+                                    <value>true</value>

+                                </systemProperty>

+                            </systemProperties>

+                            <webApp>

+                                <contextPath>/${symbol_dollar}{artifactId}</contextPath>

+                            </webApp>

+                            <scanIntervalSeconds>5</scanIntervalSeconds>

+                        </configuration>

+                        <dependencies>

+                           <!-- Tld scanning only works when JSF is included

+                                as container dependency. Add other jsf libraries

+                                here, so jetty:run goal can find and process them -->

+                           <dependency>

+                               <groupId>com.sun.faces</groupId>

+                               <artifactId>jsf-api</artifactId>

+                               <version>${symbol_dollar}{jsf-mojarra.version}</version>

+                               <scope>compile</scope>

+                           </dependency>

+                           <dependency>

+                               <groupId>com.sun.faces</groupId>

+                               <artifactId>jsf-impl</artifactId>

+                               <version>${symbol_dollar}{jsf-mojarra.version}</version>

+                               <scope>runtime</scope>

+                           </dependency>

+                        </dependencies>

+                    </plugin>

+                </plugins>

+            </build>

+            <repositories>

+                <repository>

+                    <id>java.net</id>

+                    <url>http://download.java.net/maven/2</url>

+                </repository>

+            </repositories>

+        </profile>

+        

+        <profile>

+            <id>maven-tomcat7</id>

+            <activation>

+                <property>

+                    <name>container</name>

+                    <value>tomcat7</value>

+                </property>

+            </activation>

+            <build>

+                <plugins>

+                    <plugin>

+                      <groupId>org.apache.tomcat.maven</groupId>

+                      <artifactId>tomcat7-maven-plugin</artifactId>

+                      <version>2.0-beta-1</version>

+                    </plugin>

+                </plugins>

+            </build>

+            <dependencies>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-api</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-impl</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+            </dependencies>

+        </profile>

+

+    </profiles>

+

+</project>

diff --git a/maven2-archetypes/myfaces-archetype-helloworld20/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/maven2-archetypes/myfaces-archetype-helloworld20/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
index 98f87ab..5dc3efa 100644
--- a/maven2-archetypes/myfaces-archetype-helloworld20/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
+++ b/maven2-archetypes/myfaces-archetype-helloworld20/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
@@ -41,13 +41,19 @@
         <param-value>true</param-value>
     </context-param>
     <context-param>
-        <description>State saving method: "client" or "server" (= default)
-            See JSF Specification 2.5.3</description>
+        <description>Define the state method to be used. There are two different options 
+            defined by the specification: 'client' and 'server' state.</description>
         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
-        <param-value>client</param-value>
+        <param-value>server</param-value>
     </context-param>
 
     <!-- MyFaces specific parameters -->
+    <!-- See http://myfaces.apache.org/docindex.html for documentation 
+         about MyFaces Projects -->
+    <!-- See http://myfaces.apache.org/core21/myfaces-impl/webconfig.html 
+         for an updated list of web config parameters for MyFaces Core 
+         See http://wiki.apache.org/myfaces/Secure_Your_Application
+         for instructions about how to secure your web application -->
     <context-param>
         <description>Only applicable if state saving method is "server" (= default).
             Defines the amount (default = 20) of the latest views are stored in session.</description>
@@ -60,7 +66,7 @@
             is written to the session.
             If false the state will not be serialized to a byte stream.</description>
         <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
-        <param-value>true</param-value>
+        <param-value>false</param-value>
     </context-param>
     <context-param>
         <description>Only applicable if state saving method is "server" (= default) and if
@@ -68,47 +74,14 @@
             If true (default) the serialized state will be compressed before it
             is written to the session. If false the state will not be compressed.</description>
         <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <description>This parameter tells MyFaces if javascript code should be allowed in the
-            rendered HTML output.
-            If javascript is allowed, command_link anchors will have javascript code
-            that submits the corresponding form.
-            If javascript is not allowed, the state saving info and nested parameters
-            will be added as url parameters.
-            Default: "true"</description>
-        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
         <param-value>false</param-value>
     </context-param>
     <context-param>
-        <description>If true, rendered HTML code will be formatted, so that it is "human readable".
-            i.e. additional line separators and whitespace will be written, that do not
-            influence the HTML code.
-            Default: "true"</description>
-        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <description>If true, a javascript function will be rendered that is able to restore the
-            former vertical scroll on every request. Convenient feature if you have pages
-            with long lists and you do not want the browser page to always jump to the top
-            if you trigger a link or button action that stays on the same page.
-            Default: "false"</description>
-        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
-        <param-value>true</param-value>
-    </context-param>
-    <context-param>
-        <description>Used for encrypting view state. Only relevant for client side
-            state saving. See MyFaces wiki/web site documentation for instructions
-            on how to configure an application for diffenent encryption strengths.
+        <description>Defines which packages to scan for beans, separated by commas.
+        Useful for when using maven and jetty:run (version 6) or tomcat:run
         </description>
-        <param-name>org.apache.myfaces.SECRET</param-name>
-        <param-value>NzY1NDMyMTA=</param-value>
+        <param-name>org.apache.myfaces.annotation.SCAN_PACKAGES</param-name>
+        <param-value>${package}</param-value>
     </context-param>
 
     <!-- Faces Servlet -->
diff --git a/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/maven/archetype-metadata.xml
index 18f3366..dad9b0a 100644
--- a/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -55,6 +55,15 @@
               </fileSet>

               <fileSet filtered="false" packaged="false">

                   <directory>src/main/webapp/</directory>

+                  <excludes>

+                      <exclude>WEB-INF/web.xml</exclude>

+                  </excludes>

+              </fileSet>

+              <fileSet filtered="true" packaged="false">

+                  <directory>src/main/webapp/</directory>

+                  <includes>

+                      <include>WEB-INF/web.xml</include>

+                  </includes>

               </fileSet>

           </fileSets>

       </module>

diff --git a/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/pom.xml b/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/pom.xml
index 19c6911..9af73dc 100644
--- a/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/pom.xml
+++ b/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/pom.xml
@@ -40,7 +40,17 @@
       - Run using jetty 

           mvn clean jetty:run

           mvn clean -Dcontainer=jetty-mojarra jetty:run

-        Set your browser to http://localhost:8080/${artifactId}-examples

+          Set your browser to http://localhost:8080/${artifactId}-examples

+      - Run using tomcat

+          mvn clean -Dcontainer=tomcat7 tomcat:run

+          Set your browser to http://localhost:8080/${artifactId}-examples

+      - Run war using tomcat

+          mvn clean -Dcontainer=tomcat7 tomcat:run-war

+          Set your browser to http://localhost:8080/${artifactId}-examples

+      - Run war using jetty (remove <webApp> config inside plugin config first)

+          mvn clean jetty:run-war

+          mvn clean -Dcontainer=jetty-mojarra jetty:run-war

+          Set your browser to http://localhost:8080

       - Build war and bundle JSF jars 

           mvn clean -Pbundle-myfaces install

           mvn clean -Pbundle-mojarra install

@@ -275,7 +285,8 @@
                         </configuration>

                         <dependencies>

                            <!-- Tld scanning only works when JSF is included

-                                as container dependency. -->

+                                as container dependency. Add other jsf libraries

+                                here, so jetty:run goal can find and process them -->

                            <dependency>

                                <groupId>com.sun.faces</groupId>

                                <artifactId>jsf-api</artifactId>

@@ -308,6 +319,47 @@
                 <jsf_implementation>Mojarra</jsf_implementation>

             </properties>

         </profile>

+        

+        <profile>

+            <id>maven-tomcat7</id>

+            <activation>

+                <property>

+                    <name>container</name>

+                    <value>tomcat7</value>

+                </property>

+            </activation>

+            <build>

+                <plugins>

+                    <plugin>

+                      <groupId>org.apache.tomcat.maven</groupId>

+                      <artifactId>tomcat7-maven-plugin</artifactId>

+                      <version>2.0-beta-1</version>

+                    </plugin>

+                </plugins>

+            </build>

+            <dependencies>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-api</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-impl</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.examples.jsfcomponents20</groupId>

+                    <artifactId>myfaces-jsfcomponents20-core</artifactId>

+                    <version>${symbol_dollar}{project.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+

+            </dependencies>

+        </profile>

+

     </profiles>

 

 </project>

diff --git a/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/WEB-INF/web.xml b/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/WEB-INF/web.xml
index dac4e96..8d34ff8 100644
--- a/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/WEB-INF/web.xml
+++ b/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/WEB-INF/web.xml
@@ -1,53 +1,114 @@
 <?xml version="1.0" encoding="UTF-8"?>

 <!--

-    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.

+ * 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.

 -->

-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd" version="2.5">

-  <description>debug web.xml</description>

-  <context-param>

-    <description>Comma separated list of URIs of (additional) faces config files.

+<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">

+

+    <description>MyProject web.xml</description>

+

+    <!-- JSF standard parameters -->

+    <context-param>

+        <description>Project stage for the application (new in 2.0). Expects one of

+            the following values: Development, Production, SystemTest, UnitTest

+        </description>

+        <param-name>javax.faces.PROJECT_STAGE</param-name>

+        <param-value>Development</param-value>

+    </context-param>

+    <context-param>

+        <description>

+            If this parameter is set to true and the submitted value of a component is

+            the empty string, the submitted value will be set to null

+        </description>

+        <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>

+        <param-value>true</param-value>

+    </context-param>

+    <context-param>

+        <description>Define the state method to be used. There are two different options 

+            defined by the specification: 'client' and 'server' state.</description>

+        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

+        <param-value>server</param-value>

+    </context-param>

+    <context-param>

+        <description>Comma separated list of URIs of (additional) faces config files.

             (e.g. /WEB-INF/my-config.xml)

             See JSF 1.0 PRD2, 10.3.2

             Attention: You do not need to put /WEB-INF/faces-config.xml in here.

-    </description>

-    <param-name>javax.faces.CONFIG_FILES</param-name>

-    <param-value>/WEB-INF/examples-config.xml</param-value>

-  </context-param>

-  <context-param>

-    <description>State saving method: &quot;client&quot; or &quot;server&quot; (= default)

-            See JSF Specification 2.5.3</description>

-    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

-    <param-value>server</param-value>

-  </context-param>

-  <context-param>

-    <param-name>javax.faces.PROJECT_STAGE</param-name>

-    <param-value>Development</param-value>

-  </context-param>

-  <servlet>

-    <servlet-name>Faces Servlet</servlet-name>

-    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

-    <load-on-startup>1</load-on-startup>

-  </servlet>

-  <servlet-mapping>

-    <servlet-name>Faces Servlet</servlet-name>

-    <url-pattern>*.jsf</url-pattern>

-  </servlet-mapping>

-  <welcome-file-list>

-    <welcome-file>index.html</welcome-file>

-  </welcome-file-list>

+        </description>

+        <param-name>javax.faces.CONFIG_FILES</param-name>

+        <param-value>/WEB-INF/examples-config.xml</param-value>

+    </context-param>

+

+    <!-- MyFaces specific parameters -->

+    <!-- See http://myfaces.apache.org/docindex.html for documentation 

+         about MyFaces Projects -->

+    <!-- See http://myfaces.apache.org/core21/myfaces-impl/webconfig.html 

+         for an updated list of web config parameters for MyFaces Core 

+         See http://wiki.apache.org/myfaces/Secure_Your_Application

+         for instructions about how to secure your web application -->

+    <context-param>

+        <description>Only applicable if state saving method is "server" (= default).

+            Defines the amount (default = 20) of the latest views are stored in session.</description>

+        <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>

+        <param-value>20</param-value>

+    </context-param>

+    <context-param>

+        <description>Only applicable if state saving method is "server" (= default).

+            If true (default) the state will be serialized to a byte stream before it

+            is written to the session.

+            If false the state will not be serialized to a byte stream.</description>

+        <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>

+        <param-value>false</param-value>

+    </context-param>

+    <context-param>

+        <description>Only applicable if state saving method is "server" (= default) and if

+            org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (= default)

+            If true (default) the serialized state will be compressed before it

+            is written to the session. If false the state will not be compressed.</description>

+        <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>

+        <param-value>false</param-value>

+    </context-param>

+    <context-param>

+        <description>Defines which packages to scan for beans, separated by commas.

+        Useful for when using maven and jetty:run (version 6) or tomcat:run

+        </description>

+        <param-name>org.apache.myfaces.annotation.SCAN_PACKAGES</param-name>

+        <param-value>org.myorganization.component.example</param-value>

+    </context-param>

+

+    <!-- Faces Servlet -->

+    <servlet>

+        <servlet-name>Faces Servlet</servlet-name>

+        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

+        <load-on-startup>1</load-on-startup>

+    </servlet>

+

+    <!-- Faces Servlet Mapping -->

+    <servlet-mapping>

+        <servlet-name>Faces Servlet</servlet-name>

+        <url-pattern>*.jsf</url-pattern>

+    </servlet-mapping>

+

+    <!-- Welcome files -->

+    <welcome-file-list>

+        <welcome-file>index.html</welcome-file>

+    </welcome-file-list>

+

 </web-app>

diff --git a/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/index.html b/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/index.html
index 98e85fd..1c35673 100644
--- a/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/index.html
+++ b/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/index.html
@@ -1,5 +1,23 @@
+<!--

+    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.

+-->

 <html>

 <head>

     <meta http-equiv="refresh" content="0; URL=home.jsf"/>

 </head>

-</html>
\ No newline at end of file
+</html>

diff --git a/maven2-archetypes/myfaces-archetype-trinidad20/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven2-archetypes/myfaces-archetype-trinidad20/src/main/resources/META-INF/maven/archetype-metadata.xml
index fa55d9d..a309309 100644
--- a/maven2-archetypes/myfaces-archetype-trinidad20/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/maven2-archetypes/myfaces-archetype-trinidad20/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -31,6 +31,15 @@
       </fileSet>

       <fileSet filtered="false" packaged="false">

           <directory>src/main/webapp/</directory>

+          <excludes>

+              <exclude>WEB-INF/web.xml</exclude>

+          </excludes>

+      </fileSet>

+      <fileSet filtered="true" packaged="false">

+          <directory>src/main/webapp/</directory>

+          <includes>

+              <include>WEB-INF/web.xml</include>

+          </includes>

       </fileSet>

       <fileSet filtered="false" packaged="false">

           <directory>src/main/log4j/</directory>

@@ -39,4 +48,4 @@
 

   <modules/>

 

-</archetype-descriptor>
\ No newline at end of file
+</archetype-descriptor>

diff --git a/maven2-archetypes/myfaces-archetype-trinidad20/src/main/resources/archetype-resources/pom.xml b/maven2-archetypes/myfaces-archetype-trinidad20/src/main/resources/archetype-resources/pom.xml
index e7c9bcb..53a272f 100644
--- a/maven2-archetypes/myfaces-archetype-trinidad20/src/main/resources/archetype-resources/pom.xml
+++ b/maven2-archetypes/myfaces-archetype-trinidad20/src/main/resources/archetype-resources/pom.xml
@@ -38,17 +38,27 @@
       - Run using jetty 

           mvn clean jetty:run

           mvn clean -Dcontainer=jetty-mojarra jetty:run

-        Set your browser to http://localhost:8080/${artifactId}

+          Set your browser to http://localhost:8080/${artifactId}

+      - Run using tomcat

+          mvn clean -Dcontainer=tomcat7 tomcat:run

+          Set your browser to http://localhost:8080/${artifactId}

+      - Run war using tomcat

+          mvn clean -Dcontainer=tomcat7 tomcat:run-war

+          Set your browser to http://localhost:8080/${artifactId}

+      - Run war using jetty (remove <webApp> config inside plugin config first)

+          mvn clean jetty:run-war

+          mvn clean -Dcontainer=jetty-mojarra jetty:run-war

+          Set your browser to http://localhost:8080

       - Build war and bundle JSF jars 

           mvn clean -Pbundle-myfaces install

           mvn clean -Pbundle-mojarra install

      -->

 

     <properties>

-        <jsf-myfaces.version>2.0.12</jsf-myfaces.version>

-        <jsf-mojarra.version>2.0.9</jsf-mojarra.version>        

-        <jetty.maven.plugin.version>8.1.1.v20120215</jetty.maven.plugin.version>

-        <trinidad.version>2.0.0-beta-2</trinidad.version>        

+        <jsf-myfaces.version>2.1.7</jsf-myfaces.version>

+        <jsf-mojarra.version>2.1.7</jsf-mojarra.version>        

+        <jetty.maven.plugin.version>8.1.3.v20120416</jetty.maven.plugin.version>

+        <trinidad.version>2.0.1</trinidad.version>        

     </properties>

 

     <build>

@@ -152,6 +162,19 @@
                     <version>${symbol_dollar}{jsf-myfaces.version}</version>

                     <scope>runtime</scope>

                 </dependency>

+                <!-- Apache Trinidad -->

+                <dependency>

+                    <groupId>org.apache.myfaces.trinidad</groupId>

+                    <artifactId>trinidad-api</artifactId>

+                    <version>${symbol_dollar}{trinidad.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.trinidad</groupId>

+                    <artifactId>trinidad-impl</artifactId>

+                    <version>${symbol_dollar}{trinidad.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

             </dependencies>

         </profile>

 

@@ -185,7 +208,7 @@
                                 </systemProperty>

                             </systemProperties>

                             <webApp>

-                                <contextPath>/${artifactId}</contextPath>

+                                <contextPath>/${symbol_dollar}{artifactId}</contextPath>

                             </webApp>

                             <scanIntervalSeconds>5</scanIntervalSeconds>

                         </configuration>

@@ -223,7 +246,7 @@
                 </plugins>

             </build>

         </profile>

-

+        

         <profile>

             <id>bundle-mojarra</id>

             <activation>

@@ -246,6 +269,19 @@
                     <version>${symbol_dollar}{jsf-mojarra.version}</version>

                     <scope>runtime</scope>

                 </dependency>

+                <!-- Apache Trinidad -->

+                <dependency>

+                    <groupId>org.apache.myfaces.trinidad</groupId>

+                    <artifactId>trinidad-api</artifactId>

+                    <version>${symbol_dollar}{trinidad.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.trinidad</groupId>

+                    <artifactId>trinidad-impl</artifactId>

+                    <version>${symbol_dollar}{trinidad.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

             </dependencies>

             <repositories>

                 <repository>

@@ -286,7 +322,7 @@
                                 </systemProperty>

                             </systemProperties>

                             <webApp>

-                                <contextPath>/${artifactId}</contextPath>

+                                <contextPath>/${symbol_dollar}{artifactId}</contextPath>

                             </webApp>

                             <scanIntervalSeconds>5</scanIntervalSeconds>

                         </configuration>

@@ -330,6 +366,54 @@
                 </repository>

             </repositories>

         </profile>

+        

+        <profile>

+            <id>maven-tomcat7</id>

+            <activation>

+                <property>

+                    <name>container</name>

+                    <value>tomcat7</value>

+                </property>

+            </activation>

+            <build>

+                <plugins>

+                    <plugin>

+                      <groupId>org.apache.tomcat.maven</groupId>

+                      <artifactId>tomcat7-maven-plugin</artifactId>

+                      <version>2.0-beta-1</version>

+                    </plugin>

+                </plugins>

+            </build>

+            <dependencies>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-api</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.core</groupId>

+                    <artifactId>myfaces-impl</artifactId>

+                    <version>${symbol_dollar}{jsf-myfaces.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+                <!-- Apache Trinidad -->

+                <dependency>

+                    <groupId>org.apache.myfaces.trinidad</groupId>

+                    <artifactId>trinidad-api</artifactId>

+                    <version>${symbol_dollar}{trinidad.version}</version>

+                    <scope>compile</scope>

+                </dependency>

+                <dependency>

+                    <groupId>org.apache.myfaces.trinidad</groupId>

+                    <artifactId>trinidad-impl</artifactId>

+                    <version>${symbol_dollar}{trinidad.version}</version>

+                    <scope>runtime</scope>

+                </dependency>

+

+            </dependencies>

+        </profile>

+

     </profiles>

 

 </project>

diff --git a/maven2-archetypes/myfaces-archetype-trinidad20/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/maven2-archetypes/myfaces-archetype-trinidad20/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
index 383b0a8..3648722 100644
--- a/maven2-archetypes/myfaces-archetype-trinidad20/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
+++ b/maven2-archetypes/myfaces-archetype-trinidad20/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
@@ -1,27 +1,26 @@
 <?xml version = '1.0' encoding = 'ISO-8859-1'?>

 <!--

-    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.

-	   

+ * 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.

 -->

-<web-app xmlns="http://java.sun.com/xml/ns/j2ee"

-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"

-         version="2.4">

+<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">

 

   <context-param>

     <description>Project stage for the application (new in 2.0). Expects one of

@@ -38,6 +37,14 @@
     <param-value>client</param-value>

     <!--param-value>server</param-value-->

   </context-param>

+  <context-param>

+    <description>Defines which packages to scan for beans, separated by commas.

+    Useful for when using maven and jetty:run (version 6) or tomcat:run

+    </description>

+    <param-name>org.apache.myfaces.annotation.SCAN_PACKAGES</param-name>

+    <param-value>${package}</param-value>

+  </context-param>

+

 

   <!-- Trinidad by default uses an optimized client-side state saving

        mechanism. To disable that, uncomment the following -->

@@ -118,4 +125,4 @@
     <welcome-file>index.jsp</welcome-file>

   </welcome-file-list>

 

-</web-app>
\ No newline at end of file
+</web-app>