You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2019/01/04 17:57:15 UTC

[myfaces-tobago] branch master updated: TOBAGO-1970: Configure web.xml listeners via JARs (for Mojarra, MyFaces, OWB, etc.)

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new 3df3fdb  TOBAGO-1970: Configure web.xml listeners via JARs (for Mojarra, MyFaces, OWB, etc.)
3df3fdb is described below

commit 3df3fdb7dc8e9c688593a52a99e5b25112a7febc
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Fri Jan 4 18:45:39 2019 +0100

    TOBAGO-1970: Configure web.xml listeners via JARs (for Mojarra, MyFaces, OWB, etc.)
---
 pom.xml                                            |   3 +-
 tobago-example/pom.xml                             | 102 ++++++++++++---------
 .../src/test/jetty/override-mojarra-web.xml        |  39 --------
 .../src/test/jetty/override-myfaces-web.xml        |  39 --------
 tobago-example/tobago-example-demo/pom.xml         |  46 +++++++++-
 .../tobago/example/demo/DockerController.java      |   5 +-
 .../myfaces/tobago/example/demo/DockerServer.java  |  32 ++++++-
 .../src/main/webapp/WEB-INF/web.xml                |   2 +-
 .../webapp/content/10-intro/20-docker/Docker.xhtml |   4 +-
 tobago-tool/pom.xml                                |   4 +
 tobago-tool/{ => tobago-config-dev}/pom.xml        |  22 ++---
 .../src/main/resources/META-INF/web-fragment.xml   |  19 ++--
 tobago-tool/{ => tobago-config-mojarra}/pom.xml    |  30 +++---
 .../src/main/resources/META-INF/web-fragment.xml   |  24 +++--
 tobago-tool/{ => tobago-config-myfaces}/pom.xml    |  28 +++---
 .../src/main/resources/META-INF/web-fragment.xml   |  24 +++--
 tobago-tool/{ => tobago-config-owb}/pom.xml        |  29 +++---
 .../src/main/resources/META-INF/web-fragment.xml   |  27 ++++--
 18 files changed, 270 insertions(+), 209 deletions(-)

diff --git a/pom.xml b/pom.xml
index 3a0919f..b4d33d0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,8 +39,9 @@
     <myfaces-test.version>1.0.8</myfaces-test.version>
     <mojarra20.version>2.0.11-04</mojarra20.version>
     <mojarra21.version>2.1.29-08</mojarra21.version>
-    <mojarra22.version>2.2.16</mojarra22.version>
+    <mojarra22.version>2.2.18</mojarra22.version>
     <mojarra23.version>2.3.3</mojarra23.version>
+    <openwebbeans.version>2.0.9</openwebbeans.version>
     <slf4j.version>1.7.25</slf4j.version>
     <logback.version>1.2.3</logback.version>
     <maven.compile.source>1.8</maven.compile.source>
diff --git a/tobago-example/pom.xml b/tobago-example/pom.xml
index 6aa64b0..26554a4 100644
--- a/tobago-example/pom.xml
+++ b/tobago-example/pom.xml
@@ -84,12 +84,9 @@
         <plugin>
           <groupId>org.eclipse.jetty</groupId>
           <artifactId>jetty-maven-plugin</artifactId>
-          <version>9.4.7.v20170914</version>
+          <version>9.4.14.v20181114</version>
           <configuration>
             <scanIntervalSeconds>5</scanIntervalSeconds>
-            <webAppConfig>
-              <overrideDescriptor>${override-web-xml}</overrideDescriptor>
-            </webAppConfig>
 <!--
             <systemProperties>
               <systemProperty>
@@ -166,19 +163,32 @@
     </dependency>
   </dependencies>
 
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>javax.servlet</groupId>
-        <artifactId>jstl</artifactId>
-        <version>1.2</version>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-
   <profiles>
 
     <profile>
+      <id>dev</id>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-dev</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
+
+    <!-- XXX JSTL is only needed, if jsf=mojarra... and Server = Tomcat-->
+    <profile>
+      <id>jstl</id>
+      <dependencies>
+        <dependency>
+          <groupId>javax.servlet</groupId>
+          <artifactId>jstl</artifactId>
+          <version>1.2</version>
+        </dependency>
+      </dependencies>
+    </profile>
+
+    <profile>
       <id>jsf-provided</id>
       <activation>
         <property>
@@ -209,9 +219,6 @@
           <name>!jsf</name>
         </property>
       </activation>
-      <properties>
-        <override-web-xml>../src/test/jetty/override-myfaces-web.xml</override-web-xml>
-      </properties>
       <dependencies>
         <dependency>
           <groupId>org.apache.myfaces.core</groupId>
@@ -225,6 +232,11 @@
           <version>${myfaces20.version}</version>
           <scope>runtime</scope>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-myfaces</artifactId>
+          <version>${project.version}</version>
+        </dependency>
       </dependencies>
     </profile>
 
@@ -236,9 +248,6 @@
           <value>myfaces-2.1</value>
         </property>
       </activation>
-      <properties>
-        <override-web-xml>../src/test/jetty/override-myfaces-web.xml</override-web-xml>
-      </properties>
       <dependencies>
         <dependency>
           <groupId>org.apache.myfaces.core</groupId>
@@ -252,6 +261,11 @@
           <version>${myfaces21.version}</version>
           <scope>runtime</scope>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-myfaces</artifactId>
+          <version>${project.version}</version>
+        </dependency>
       </dependencies>
     </profile>
 
@@ -263,9 +277,6 @@
           <value>myfaces-2.2</value>
         </property>
       </activation>
-      <properties>
-        <override-web-xml>../src/test/jetty/override-myfaces-web.xml</override-web-xml>
-      </properties>
       <dependencies>
         <dependency>
           <groupId>org.apache.myfaces.core</groupId>
@@ -279,6 +290,11 @@
           <version>${myfaces22.version}</version>
           <scope>runtime</scope>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-myfaces</artifactId>
+          <version>${project.version}</version>
+        </dependency>
       </dependencies>
     </profile>
 
@@ -290,9 +306,6 @@
           <value>myfaces-2.3</value>
         </property>
       </activation>
-      <properties>
-        <override-web-xml>../src/test/jetty/override-myfaces-web.xml</override-web-xml>
-      </properties>
       <dependencies>
         <dependency>
           <groupId>org.apache.myfaces.core</groupId>
@@ -306,6 +319,11 @@
           <version>${myfaces23.version}</version>
           <scope>runtime</scope>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-myfaces</artifactId>
+          <version>${project.version}</version>
+        </dependency>
       </dependencies>
     </profile>
 
@@ -317,9 +335,6 @@
           <value>mojarra-2.0</value>
         </property>
       </activation>
-      <properties>
-        <override-web-xml>../src/test/jetty/override-mojarra-web.xml</override-web-xml>
-      </properties>
       <dependencies>
         <dependency>
           <groupId>com.sun.faces</groupId>
@@ -334,8 +349,9 @@
           <scope>runtime</scope>
         </dependency>
         <dependency>
-          <groupId>javax.servlet</groupId>
-          <artifactId>jstl</artifactId>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-mojarra</artifactId>
+          <version>${project.version}</version>
         </dependency>
       </dependencies>
     </profile>
@@ -348,9 +364,6 @@
           <value>mojarra-2.1</value>
         </property>
       </activation>
-      <properties>
-        <override-web-xml>../src/test/jetty/override-mojarra-web.xml</override-web-xml>
-      </properties>
       <dependencies>
         <dependency>
           <groupId>com.sun.faces</groupId>
@@ -365,8 +378,9 @@
           <scope>runtime</scope>
         </dependency>
         <dependency>
-          <groupId>javax.servlet</groupId>
-          <artifactId>jstl</artifactId>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-mojarra</artifactId>
+          <version>${project.version}</version>
         </dependency>
       </dependencies>
     </profile>
@@ -379,9 +393,6 @@
           <value>mojarra-2.2</value>
         </property>
       </activation>
-      <properties>
-        <override-web-xml>../src/test/jetty/override-mojarra-web.xml</override-web-xml>
-      </properties>
       <dependencies>
         <dependency>
           <groupId>com.sun.faces</groupId>
@@ -396,8 +407,9 @@
           <scope>runtime</scope>
         </dependency>
         <dependency>
-          <groupId>javax.servlet</groupId>
-          <artifactId>jstl</artifactId>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-mojarra</artifactId>
+          <version>${project.version}</version>
         </dependency>
       </dependencies>
     </profile>
@@ -410,9 +422,6 @@
           <value>mojarra-2.3</value>
         </property>
       </activation>
-      <properties>
-        <override-web-xml>../src/test/jetty/override-mojarra-web.xml</override-web-xml>
-      </properties>
       <dependencies>
         <dependency>
           <groupId>org.glassfish</groupId>
@@ -420,6 +429,11 @@
           <version>${mojarra23.version}</version>
           <optional>true</optional>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-mojarra</artifactId>
+          <version>${project.version}</version>
+        </dependency>
       </dependencies>
     </profile>
 
diff --git a/tobago-example/src/test/jetty/override-mojarra-web.xml b/tobago-example/src/test/jetty/override-mojarra-web.xml
deleted file mode 100644
index 6458e5f..0000000
--- a/tobago-example/src/test/jetty/override-mojarra-web.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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.
--->
-
-<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_3_0.xsd"
-         version="3.0">
-
-  <context-param>
-    <param-name>javax.faces.PROJECT_STAGE</param-name>
-    <param-value>Development</param-value>
-    <!--<param-value>Production</param-value>-->
-  </context-param>
-
-  <listener>
-    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
-  </listener>
-
-  <listener>
-    <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
-  </listener>
-
-</web-app>
diff --git a/tobago-example/src/test/jetty/override-myfaces-web.xml b/tobago-example/src/test/jetty/override-myfaces-web.xml
deleted file mode 100644
index 2e93b21..0000000
--- a/tobago-example/src/test/jetty/override-myfaces-web.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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.
--->
-
-<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_3_0.xsd"
-         version="3.0">
-
-  <context-param>
-    <param-name>javax.faces.PROJECT_STAGE</param-name>
-    <param-value>Development</param-value>
-    <!--<param-value>Production</param-value>-->
-  </context-param>
-
-  <listener>
-    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
-  </listener>
-
-  <listener>
-    <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
-  </listener>
-
-</web-app>
diff --git a/tobago-example/tobago-example-demo/pom.xml b/tobago-example/tobago-example-demo/pom.xml
index 8d0b7d3..d20029b 100644
--- a/tobago-example/tobago-example-demo/pom.xml
+++ b/tobago-example/tobago-example-demo/pom.xml
@@ -32,7 +32,6 @@
   -->
 
   <properties>
-    <openwebbeans.version>2.0.8</openwebbeans.version>
     <deltaspike.version>1.9.0</deltaspike.version>
     <selenium.version>3.12.0</selenium.version>
     <tomee.version>7.0.5</tomee.version>
@@ -327,6 +326,11 @@
           <artifactId>openwebbeans-resource</artifactId>
           <version>${openwebbeans.version}</version>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-owb</artifactId>
+          <version>${project.version}</version>
+        </dependency>
 
       </dependencies>
     </profile>
@@ -379,6 +383,11 @@
           <artifactId>openwebbeans-resource</artifactId>
           <version>${openwebbeans.version}</version>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-owb</artifactId>
+          <version>${project.version}</version>
+        </dependency>
 
       </dependencies>
     </profile>
@@ -431,6 +440,11 @@
           <artifactId>openwebbeans-resource</artifactId>
           <version>${openwebbeans.version}</version>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-owb</artifactId>
+          <version>${project.version}</version>
+        </dependency>
 
       </dependencies>
     </profile>
@@ -487,6 +501,11 @@
           <artifactId>openwebbeans-resource</artifactId>
           <version>${openwebbeans.version}</version>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-owb</artifactId>
+          <version>${project.version}</version>
+        </dependency>
 
       </dependencies>
     </profile>
@@ -539,6 +558,11 @@
           <artifactId>openwebbeans-resource</artifactId>
           <version>${openwebbeans.version}</version>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-owb</artifactId>
+          <version>${project.version}</version>
+        </dependency>
 
       </dependencies>
     </profile>
@@ -591,6 +615,11 @@
           <artifactId>openwebbeans-resource</artifactId>
           <version>${openwebbeans.version}</version>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-owb</artifactId>
+          <version>${project.version}</version>
+        </dependency>
 
       </dependencies>
     </profile>
@@ -643,6 +672,11 @@
           <artifactId>openwebbeans-resource</artifactId>
           <version>${openwebbeans.version}</version>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-owb</artifactId>
+          <version>${project.version}</version>
+        </dependency>
 
       </dependencies>
     </profile>
@@ -695,6 +729,11 @@
           <artifactId>openwebbeans-resource</artifactId>
           <version>${openwebbeans.version}</version>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-owb</artifactId>
+          <version>${project.version}</version>
+        </dependency>
 
       </dependencies>
     </profile>
@@ -1134,6 +1173,11 @@
           <artifactId>tomcat-jasper-el</artifactId>
           <version>${tomcat.version}</version>
         </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.tobago</groupId>
+          <artifactId>tobago-config-myfaces</artifactId>
+          <version>${project.version}</version>
+        </dependency>
       </dependencies>
 
       <build>
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DockerController.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DockerController.java
index 9574e6f..d24bdbd 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DockerController.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DockerController.java
@@ -81,7 +81,10 @@ public class DockerController implements Serializable {
 
   public String getCommandLine() {
     final StringBuilder builder = new StringBuilder();
-    builder.append("mvn clean install -Djsf=provided\ndocker run -it --rm");
+    builder.append("mvn clean install");
+    builder.append(" -Pdev");
+    builder.append(server.getMavenOptions());
+    builder.append("\ndocker run -it --rm");
     builder.append(" -p ");
     builder.append(port);
     builder.append(":");
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DockerServer.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DockerServer.java
index 27c2745..9476a40 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DockerServer.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DockerServer.java
@@ -23,6 +23,21 @@ import java.io.Serializable;
 
 public enum DockerServer implements Serializable {
 
+  tomcat(
+      "Tomcat",
+      "/usr/local/tomcat/webapps/demo.war",
+      8080,
+      0,
+      "tomcat",
+      new String[]{
+          "7-jre8",
+          "8-jre8",
+          "8-jre11",
+          "9-jre8",
+          "9-jre11"},
+      false,
+//    XXX JSTL is only needed, if jsf=mojarra... and Server = Tomcat
+      ""),
   tomee(
       "TomEE",
       "/usr/local/tomee/webapps/demo.war",
@@ -34,7 +49,8 @@ public enum DockerServer implements Serializable {
           "8-jre-7.0.5-plus",
           "8-jre-7.1.0-plus",
           "8-jre-8.0.0-M1-plus"},
-      false),
+      false,
+      " -Djsf=provided"),
   liberty(
       "Liberty",
       "/config/dropins/demo.war",
@@ -44,7 +60,8 @@ public enum DockerServer implements Serializable {
       new String[]{
           "webProfile7",
           "webProfile8"},
-      true),
+      true,
+      " -Djsf=provided"),
   wildfly(
       "Wildfly",
       "/opt/jboss/wildfly/standalone/deployments/demo.war",
@@ -60,7 +77,8 @@ public enum DockerServer implements Serializable {
           "13.0.0.Final",
           "14.0.1.Final"
       },
-      true);
+      true,
+      " -Djsf=provided");
 
   private String displayName;
   private String volume;
@@ -69,10 +87,11 @@ public enum DockerServer implements Serializable {
   private String image;
   private String[] tags;
   private boolean ssl;
+  private String mavenOptions;
 
   DockerServer(
       final String displayName, final String volume, final int port, final int sslPort,
-      final String image, final String[] tags, final boolean ssl) {
+      final String image, final String[] tags, final boolean ssl, final String mavenOptions) {
     this.displayName = displayName;
     this.volume = volume;
     this.port = port;
@@ -80,6 +99,7 @@ public enum DockerServer implements Serializable {
     this.image = image;
     this.tags = tags;
     this.ssl = ssl;
+    this.mavenOptions = mavenOptions;
   }
 
   public String getDisplayName() {
@@ -109,4 +129,8 @@ public enum DockerServer implements Serializable {
   public boolean isSsl() {
     return ssl;
   }
+
+  public String getMavenOptions() {
+    return mavenOptions;
+  }
 }
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml b/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml
index 8bbf9d9..cc8bc3f 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml
@@ -25,7 +25,7 @@
 
   <display-name>Tobago Demo Application</display-name>
 
-  <!-- for jetty also check src/test/jetty/override-myfaces-web.xml or src/test/jetty/override-mojarra-web.xml -->
+  <!-- for local development you can set a Maven profile with -Pdev to set the stage to Development -->
   <context-param>
     <param-name>javax.faces.PROJECT_STAGE</param-name>
     <!--<param-value>Development</param-value>-->
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/Docker.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/Docker.xhtml
index d018b68..def4754 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/Docker.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/20-docker/Docker.xhtml
@@ -66,8 +66,8 @@
         <tc:dataAttribute name="copy-clipboard-from" value="commandLine"/>
       </tc:button>
 
-      <tc:button label="HTTP" link="#{dockerController.url}"/>
-      <tc:button label="HTTPS" link="#{dockerController.sslUrl}" disabled="#{not dockerController.server.ssl}"/>
+      <tc:button label="Browse via HTTP" link="#{dockerController.url}"/>
+      <tc:button label="Browse via HTTPS" link="#{dockerController.sslUrl}" disabled="#{not dockerController.server.ssl}"/>
     </tc:box>
 
   </tc:section>
diff --git a/tobago-tool/pom.xml b/tobago-tool/pom.xml
index e2d0836..f60a79b 100644
--- a/tobago-tool/pom.xml
+++ b/tobago-tool/pom.xml
@@ -27,6 +27,10 @@
   <artifactId>tobago-tool</artifactId>
 
   <modules>
+    <module>tobago-config-dev</module>
+    <module>tobago-config-mojarra</module>
+    <module>tobago-config-myfaces</module>
+    <module>tobago-config-owb</module>
     <module>tobago-pack-jquery-ui</module>
     <module>tobago-pack-typeahead</module>
     <module>tobago-tool-apt</module>
diff --git a/tobago-tool/pom.xml b/tobago-tool/tobago-config-dev/pom.xml
similarity index 61%
copy from tobago-tool/pom.xml
copy to tobago-tool/tobago-config-dev/pom.xml
index e2d0836..99e035e 100644
--- a/tobago-tool/pom.xml
+++ b/tobago-tool/tobago-config-dev/pom.xml
@@ -13,25 +13,19 @@
  * 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.e.
+ * 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">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.myfaces.tobago</groupId>
-    <artifactId>tobago</artifactId>
+    <artifactId>tobago-tool</artifactId>
     <version>5.0.0-SNAPSHOT</version>
   </parent>
-  <packaging>pom</packaging>
-  <name>Tobago Tool</name>
-  <artifactId>tobago-tool</artifactId>
-
-  <modules>
-    <module>tobago-pack-jquery-ui</module>
-    <module>tobago-pack-typeahead</module>
-    <module>tobago-tool-apt</module>
-    <module>tobago-tool-annotation</module>
-    <module>tobago-tool-test</module>
-  </modules>
 
+  <artifactId>tobago-config-dev</artifactId>
+  <packaging>jar</packaging>
+  <name>Tobago Helper to set Project stage to Development</name>
 </project>
diff --git a/tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml b/tobago-tool/tobago-config-dev/src/main/resources/META-INF/web-fragment.xml
similarity index 63%
copy from tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml
copy to tobago-tool/tobago-config-dev/src/main/resources/META-INF/web-fragment.xml
index 31f0893..6912ae2 100644
--- a/tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml
+++ b/tobago-tool/tobago-config-dev/src/main/resources/META-INF/web-fragment.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
 
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,10 +17,17 @@
  * limitations under the License.
 -->
 
-<!-- marker file for CDI -->
+<web-fragment
+    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-fragment_3_0.xsd"
+    version="3.0">
 
-<beans 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/beans_1_0.xsd">
+  <name>tobago_config_dev</name>
 
-</beans>
+  <context-param>
+    <param-name>javax.faces.PROJECT_STAGE</param-name>
+    <param-value>Development</param-value>
+  </context-param>
+
+</web-fragment>
diff --git a/tobago-tool/pom.xml b/tobago-tool/tobago-config-mojarra/pom.xml
similarity index 57%
copy from tobago-tool/pom.xml
copy to tobago-tool/tobago-config-mojarra/pom.xml
index e2d0836..3d8a658 100644
--- a/tobago-tool/pom.xml
+++ b/tobago-tool/tobago-config-mojarra/pom.xml
@@ -13,25 +13,29 @@
  * 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.e.
+ * 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">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.myfaces.tobago</groupId>
-    <artifactId>tobago</artifactId>
+    <artifactId>tobago-tool</artifactId>
     <version>5.0.0-SNAPSHOT</version>
   </parent>
-  <packaging>pom</packaging>
-  <name>Tobago Tool</name>
-  <artifactId>tobago-tool</artifactId>
 
-  <modules>
-    <module>tobago-pack-jquery-ui</module>
-    <module>tobago-pack-typeahead</module>
-    <module>tobago-tool-apt</module>
-    <module>tobago-tool-annotation</module>
-    <module>tobago-tool-test</module>
-  </modules>
+  <artifactId>tobago-config-mojarra</artifactId>
+  <packaging>jar</packaging>
+  <name>Tobago Helper to activate Mojarra</name>
+  <description>Includes the Mojarra activation listener.</description>
 
+  <dependencies>
+    <dependency>
+      <groupId>com.sun.faces</groupId>
+      <artifactId>jsf-impl</artifactId>
+      <version>${mojarra20.version}</version>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
 </project>
diff --git a/tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml b/tobago-tool/tobago-config-mojarra/src/main/resources/META-INF/web-fragment.xml
similarity index 61%
copy from tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml
copy to tobago-tool/tobago-config-mojarra/src/main/resources/META-INF/web-fragment.xml
index 31f0893..f088423 100644
--- a/tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml
+++ b/tobago-tool/tobago-config-mojarra/src/main/resources/META-INF/web-fragment.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
 
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,10 +17,22 @@
  * limitations under the License.
 -->
 
-<!-- marker file for CDI -->
+<web-fragment
+    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-fragment_3_0.xsd"
+    version="3.0">
 
-<beans 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/beans_1_0.xsd">
+  <name>tobago_config_mojarra</name>
 
-</beans>
+  <ordering>
+    <after>
+      <name>tobago_core</name>
+    </after>
+  </ordering>
+
+  <listener>
+    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+  </listener>
+
+</web-fragment>
diff --git a/tobago-tool/pom.xml b/tobago-tool/tobago-config-myfaces/pom.xml
similarity index 59%
copy from tobago-tool/pom.xml
copy to tobago-tool/tobago-config-myfaces/pom.xml
index e2d0836..8b2c58c 100644
--- a/tobago-tool/pom.xml
+++ b/tobago-tool/tobago-config-myfaces/pom.xml
@@ -13,25 +13,27 @@
  * 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.e.
+ * 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">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.myfaces.tobago</groupId>
-    <artifactId>tobago</artifactId>
+    <artifactId>tobago-tool</artifactId>
     <version>5.0.0-SNAPSHOT</version>
   </parent>
-  <packaging>pom</packaging>
-  <name>Tobago Tool</name>
-  <artifactId>tobago-tool</artifactId>
 
-  <modules>
-    <module>tobago-pack-jquery-ui</module>
-    <module>tobago-pack-typeahead</module>
-    <module>tobago-tool-apt</module>
-    <module>tobago-tool-annotation</module>
-    <module>tobago-tool-test</module>
-  </modules>
+  <artifactId>tobago-config-myfaces</artifactId>
+  <packaging>jar</packaging>
+  <name>Tobago Helper to activate MyFaces</name>
+  <description>Includes the MyFaces activation listener.</description>
 
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.myfaces.core</groupId>
+      <artifactId>myfaces-impl</artifactId>
+    </dependency>
+  </dependencies>
 </project>
diff --git a/tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml b/tobago-tool/tobago-config-myfaces/src/main/resources/META-INF/web-fragment.xml
similarity index 60%
copy from tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml
copy to tobago-tool/tobago-config-myfaces/src/main/resources/META-INF/web-fragment.xml
index 31f0893..c995bca 100644
--- a/tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml
+++ b/tobago-tool/tobago-config-myfaces/src/main/resources/META-INF/web-fragment.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
 
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,10 +17,22 @@
  * limitations under the License.
 -->
 
-<!-- marker file for CDI -->
+<web-fragment
+    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-fragment_3_0.xsd"
+    version="3.0">
 
-<beans 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/beans_1_0.xsd">
+  <name>tobago_config_myfaces</name>
 
-</beans>
+  <ordering>
+    <after>
+      <name>tobago_core</name>
+    </after>
+  </ordering>
+
+  <listener>
+    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+  </listener>
+
+</web-fragment>
diff --git a/tobago-tool/pom.xml b/tobago-tool/tobago-config-owb/pom.xml
similarity index 57%
copy from tobago-tool/pom.xml
copy to tobago-tool/tobago-config-owb/pom.xml
index e2d0836..0e53193 100644
--- a/tobago-tool/pom.xml
+++ b/tobago-tool/tobago-config-owb/pom.xml
@@ -13,25 +13,28 @@
  * 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.e.
+ * 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">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.myfaces.tobago</groupId>
-    <artifactId>tobago</artifactId>
+    <artifactId>tobago-tool</artifactId>
     <version>5.0.0-SNAPSHOT</version>
   </parent>
-  <packaging>pom</packaging>
-  <name>Tobago Tool</name>
-  <artifactId>tobago-tool</artifactId>
 
-  <modules>
-    <module>tobago-pack-jquery-ui</module>
-    <module>tobago-pack-typeahead</module>
-    <module>tobago-tool-apt</module>
-    <module>tobago-tool-annotation</module>
-    <module>tobago-tool-test</module>
-  </modules>
+  <artifactId>tobago-config-owb</artifactId>
+  <packaging>jar</packaging>
+  <name>Tobago Helper to activate OpenWebBeans</name>
+  <description>Includes the OWB activation listener.</description>
 
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.openwebbeans</groupId>
+      <artifactId>openwebbeans-web</artifactId>
+      <version>${openwebbeans.version}</version>
+    </dependency>
+  </dependencies>
 </project>
diff --git a/tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml b/tobago-tool/tobago-config-owb/src/main/resources/META-INF/web-fragment.xml
similarity index 52%
rename from tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml
rename to tobago-tool/tobago-config-owb/src/main/resources/META-INF/web-fragment.xml
index 31f0893..370b7f6 100644
--- a/tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml
+++ b/tobago-tool/tobago-config-owb/src/main/resources/META-INF/web-fragment.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
 
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,10 +17,25 @@
  * limitations under the License.
 -->
 
-<!-- marker file for CDI -->
+<web-fragment
+    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-fragment_3_0.xsd"
+    version="3.0">
 
-<beans 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/beans_1_0.xsd">
+  <name>tobago_config_owb</name>
 
-</beans>
+  <ordering>
+    <after>
+      <!-- XXX Jetty doesn't allow undefined names here: NullPointerException in AnnotationConfiguration -->
+      <!--<name>tobago_config_mojarra</name>-->
+      <!--<name>tobago_config_myfaces</name>-->
+      <name>tobago_core</name>
+    </after>
+  </ordering>
+
+  <listener>
+    <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
+  </listener>
+
+</web-fragment>