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 2018/11/29 14:34:34 UTC

[myfaces-tobago] 03/03: TOBAGO-1757: Docker example for demo

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

commit 809fdebf9d796c79b6ecdde61c0a2085d0403b9b
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Thu Nov 29 15:34:08 2018 +0100

    TOBAGO-1757: Docker example for demo
    
    * runnable with Websphere Liberty
    * runnable with Wildfly
---
 .../src/test/jetty/override-mojarra-web.xml        |  4 +++
 .../src/test/jetty/override-myfaces-web.xml        |  4 +++
 tobago-example/tobago-example-demo/pom.xml         |  4 ++-
 .../myfaces/tobago/example/demo/DockerServer.java  | 16 ++++++++++
 .../src/main/webapp/WEB-INF/web.xml                | 36 ++++++----------------
 5 files changed, 36 insertions(+), 28 deletions(-)

diff --git a/tobago-example/src/test/jetty/override-mojarra-web.xml b/tobago-example/src/test/jetty/override-mojarra-web.xml
index f75d69f..6458e5f 100644
--- a/tobago-example/src/test/jetty/override-mojarra-web.xml
+++ b/tobago-example/src/test/jetty/override-mojarra-web.xml
@@ -32,4 +32,8 @@
     <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
index c7de889..2e93b21 100644
--- a/tobago-example/src/test/jetty/override-myfaces-web.xml
+++ b/tobago-example/src/test/jetty/override-myfaces-web.xml
@@ -32,4 +32,8 @@
     <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 0d62817..64c0cf5 100644
--- a/tobago-example/tobago-example-demo/pom.xml
+++ b/tobago-example/tobago-example-demo/pom.xml
@@ -207,14 +207,16 @@
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-annotation_1.0_spec</artifactId>
       <!-- compile or provided depends on the used server -->
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
 
+<!--
     <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-validator</artifactId>
       <version>4.3.2.Final</version>
     </dependency>
+-->
     <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpcore</artifactId>
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 e0716df..27c2745 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
@@ -44,6 +44,22 @@ public enum DockerServer implements Serializable {
       new String[]{
           "webProfile7",
           "webProfile8"},
+      true),
+  wildfly(
+      "Wildfly",
+      "/opt/jboss/wildfly/standalone/deployments/demo.war",
+      8080,
+      8443,
+      "jboss/wildfly",
+      new String[]{
+          "8.2.1.Final",
+          "9.0.2.Final",
+          "10.1.0.Final",
+          "11.0.0.Final",
+          "12.0.0.Final",
+          "13.0.0.Final",
+          "14.0.1.Final"
+      },
       true);
 
   private String displayName;
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 2b50e21..8bbf9d9 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
@@ -84,37 +84,18 @@
   </listener>
 
   <!-- activate this for some containers -->
-  <!--<listener>
-    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
-  </listener>-->
-
-<!-- this is not needed for websphere 8.5 -->
-<!-- and neither for tomcat if setup correctly... but needed for jetty -->
+  <!--
   <listener>
-    <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
+    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
   </listener>
+  -->
 
-
-<!-- this is an alternative to the WebBeansConfigurationListener
-     you need it e.g. for Tomcat 5.5 or WebSphere 6.1 (see TOBAGO-1043)
--->
-<!--
-  <filter>
-      <filter-name>webbeans</filter-name>
-      <filter-class>org.apache.webbeans.servlet.WebBeansConfigurationFilter</filter-class>
-    </filter>
-
-  <filter-mapping>
-      <filter-name>webbeans</filter-name>
-      <servlet-name>FacesServlet</servlet-name>
-      <dispatcher>REQUEST</dispatcher>
-      <dispatcher>ERROR</dispatcher>
-  </filter-mapping>
-
+  <!-- activate this for some containers -->
+  <!--
   <listener>
-    <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationHttpSessionListener</listener-class>
+    <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
   </listener>
--->
+  -->
 
   <filter>
     <filter-name>LoggingMdcFilter</filter-name>
@@ -131,7 +112,8 @@
     <servlet-name>FacesServlet</servlet-name>
     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
     <load-on-startup>3</load-on-startup>
-    <!-- This is needed, for file upload e.g. <tc:file> with JSF 2.0 or 2.1, JSF 2.2 doesn't need it. -->
+    <!-- This is needed, for file upload e.g. <tc:file> with JSF 2.0 or 2.1.
+     Version JSF 2.2 or higher doesn't need it! -->
     <multipart-config>
       <max-file-size>1000000</max-file-size>
       <max-request-size>20000000</max-request-size>