Merge pull request #1 from apache/master

update from origin
diff --git a/README.adoc b/README.adoc
index 597fb3d..8895239 100644
--- a/README.adoc
+++ b/README.adoc
@@ -1,8 +1,21 @@
 = Meecrowave Sample
 
-This project shows how to use meecrowave for simple applications.
+This project shows how to use https://openwebbeans.apache.org/meecrowave/[Apache Meecrowave] for simple applications.
 
-Here what it provides:
+== About Apache Meecrowave
+
+Apache Meecrowave is a 9 MByte small embeddable Java Application Server based on the following Apache JavaEE 8 projects:
+
+* Apache Tomcat-9.x
+* Apache OpenWebBeans-2.x
+* Apache Johnzon-1.1.x
+* Apache CXF-3.2.x
+* Apache log4j2 (optional, JUL supported as well)
+
+
+== About our Examples
+
+Here's what it provides:
 
 0. A pom.xml with the dependencies for this sample and meecrowave-maven-plugin setup so you can launch `mvn package meecrowave-run`.
 1. A sample JAX-RS application: in src/main/java/com/superbiz/sample/jaxrs
@@ -10,3 +23,23 @@
 3. in src/main/java/com/superbiz/configuration/Defaults some enrichment of the meecrowave Cli options for the application.
 
 To use it launch meecrowave main (org.apache.meecrowave.runner.Cli) with option `--app-default-name foo`.
+
+You can also use the `meecrowave-maven-plugin`and type
+
+----
+$> mvn clean install meecrowave:run
+----
+
+For debugging your application attach with your IDE to port 8000 and start Meecrowave in debug mode with
+----
+$> mvnDebug clean install meecrowave:run
+----
+
+== Further Resources
+
+=== Bug Reporting
+Please use our official https://issues.apache.org/jira/projects/MEECROWAVE[Meecrowave Bug Tracker] for reporting bugs or enhancement requests.
+
+=== Apache Meecrowave resources
+
+Please find more information about Meecrowave on our https://openwebbeans.apache.org/meecrowave/[Apache Meecrowave Project Site]
diff --git a/mw_bundle_config/README.adoc b/mw_bundle_config/README.adoc
new file mode 100644
index 0000000..cae240c
--- /dev/null
+++ b/mw_bundle_config/README.adoc
@@ -0,0 +1,17 @@
+= Apache Meecrowave
+
+== Bundle Configuration
+
+This example shows how to configure Meecrowave via a property file in a distribution bundle
+
+=== Serving static resources
+The sample contains a link:src/main/resources/META-INF/resources/index.html[static index.html file].
+Since we do not package a WAR file but a simple jar we have to provide the file as a WebResource.
+Since JavaEE 6 (Servlets-3.0) every file under META-INF/resources/ is served as a WebResource.
+If you start up Meecrowave then you can browse this file under http://localhost:8090/index.html
+
+=== meecrowave.properties
+To configure Apache Meecrowave you can leverage the provided meecrowave.properties file support.
+This file can either reside in `src/main/meecrowave/conf` or in the ClassPath.
+Please see the documentation in the link:src/main/resources/meecrowave.properties[meecrowave.properties] file for more explanation about what can get configured.
+
diff --git a/mw_bundle_config/pom.xml b/mw_bundle_config/pom.xml
new file mode 100644
index 0000000..8b36824
--- /dev/null
+++ b/mw_bundle_config/pom.xml
@@ -0,0 +1,77 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.meecrowave</groupId>
+        <artifactId>meecrowave-examples</artifactId>
+        <version>1.2.2-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>samples-bundle-config</artifactId>
+    <name>Bundle Config Example</name>
+
+    <dependencies>
+        <!-- this package contains the javax APIs for CDI, JAX-RS, JSONP, JSONB and Servlet4 -->
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-specs-api</artifactId>
+            <version>${meecrowave.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-core</artifactId>
+            <version>${meecrowave.version}</version>
+        </dependency>
+
+        <!-- our test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit4.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-junit</artifactId>
+            <version>${meecrowave.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <!--
+                    For starting meecrowave via Maven. Just run
+                    $> mvn clean install meecrowave:run
+                -->
+                <groupId>org.apache.meecrowave</groupId>
+                <artifactId>meecrowave-maven-plugin</artifactId>
+                <version>${meecrowave.version}</version>
+            </plugin>
+
+        </plugins>
+    </build>
+
+
+</project>
\ No newline at end of file
diff --git a/mw_bundle_config/src/main/resources/META-INF/resources/index.html b/mw_bundle_config/src/main/resources/META-INF/resources/index.html
new file mode 100644
index 0000000..5805907
--- /dev/null
+++ b/mw_bundle_config/src/main/resources/META-INF/resources/index.html
@@ -0,0 +1,8 @@
+<html>
+<head>
+    <title>Apache Meecrowave bundleconfig example</title>
+</head>
+<body>
+Yikes this is a sample page.
+</body>
+</html>
\ No newline at end of file
diff --git a/mw_bundle_config/src/main/resources/meecrowave.properties b/mw_bundle_config/src/main/resources/meecrowave.properties
new file mode 100644
index 0000000..62a8c96
--- /dev/null
+++ b/mw_bundle_config/src/main/resources/meecrowave.properties
@@ -0,0 +1,20 @@
+# We serve on port 8090
+http=8090
+
+# And use a specific tempDir
+tempDir=target/mwtmp
+
+# Default but set again
+jsonbEncoding = UTF-8
+jsonb-binary-strategy=BASE_64
+
+# Set the session timeout to 20 minutes:
+web-session-timeout=20
+
+
+# And now also configure a Valve, e.g. the built-in ErrorHandlerValve
+# Disable showing the Tomcat version number:
+properties.valves.errorreport._className=org.apache.catalina.valves.ErrorReportValve
+properties.valves.errorreport._order=1
+properties.valves.errorreport.showReport=false
+properties.valves.errorreport.showServerInfo=false
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index a75f354..bd2b650 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache</groupId>
         <artifactId>apache</artifactId>
-        <version>18</version>
+        <version>20</version>
     </parent>
 
     <groupId>org.apache.meecrowave</groupId>
@@ -39,12 +39,13 @@
         <module>rest-trivial</module>
         <module>rest</module>
         <module>servlet-trivial</module>
+        <module>mw_bundle_config</module>
         <module>servlet-vaadin-v08</module>
         <module>servlet-vaadin-v10</module>
     </modules>
 
     <properties>
-        <meecrowave.version>1.2.2-SNAPSHOT</meecrowave.version>
+        <meecrowave.version>1.2.2</meecrowave.version>
 
         <maven.compiler.target>1.8</maven.compiler.target>
         <maven.compiler.source>1.8</maven.compiler.source>
@@ -58,95 +59,15 @@
         <pitest.version>1.4.0</pitest.version>
         <pitest-junit5-plugin.version>0.5</pitest-junit5-plugin.version>
 
-        <junit.version>4.12</junit.version>
+        <junit4.version>4.12</junit4.version>
         <junit.jupiter.version>5.1.1</junit.jupiter.version>
         <junit.platform.version>1.1.1</junit.platform.version>
 
     </properties>
 
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.meecrowave</groupId>
-            <artifactId>meecrowave-core</artifactId>
-            <version>${meecrowave.version}</version>
-        </dependency>
 
-        <!--jUnit5-->
 
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-api</artifactId>
-            <version>${junit.jupiter.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-params</artifactId>
-            <version>${junit.jupiter.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.junit.platform</groupId>
-            <artifactId>junit-platform-launcher</artifactId>
-            <version>${junit.platform.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <!-- Only required to run tests in an IDE that bundles an older version -->
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-engine</artifactId>
-            <version>${junit.jupiter.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <!-- Only required to run tests in an IDE that bundles an older version -->
-        <dependency>
-            <groupId>org.junit.vintage</groupId>
-            <artifactId>junit-vintage-engine</artifactId>
-            <version>${junit.jupiter.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <!--Meecrowave-->
-        <dependency>
-            <groupId>org.apache.meecrowave</groupId>
-            <artifactId>meecrowave-junit</artifactId>
-            <version>${meecrowave.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <!--Logger-->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <version>1.7.25</version>
-            <!--<scope>test</scope>-->
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-simple</artifactId>
-            <version>1.7.25</version>
-            <!--<scope>test</scope>-->
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-web</artifactId>
-            <version>2.11.0</version>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.meecrowave</groupId>
-                <artifactId>meecrowave-maven-plugin</artifactId>
-                <version>${meecrowave.version}</version>
-            </plugin>
-        </plugins>
-    </build>
-
+    <!-- Just to disable any accidential deployment to maven.central -->
     <distributionManagement>
         <repository>
             <id>localhost</id>
diff --git a/rest-trivial/README.adoc b/rest-trivial/README.adoc
new file mode 100644
index 0000000..7f9b567
--- /dev/null
+++ b/rest-trivial/README.adoc
@@ -0,0 +1,11 @@
+= Apache Meecrowave
+
+== Trivial REST Example
+
+This example shows probably the smallest JavaEE REST Service.
+It is the REST version of the famous 'Hello World' program.
+It contains just a link:src/main/java/com/superbiz/jaxrs/HelloEndpoint.java[Hello Resource].
+The important parst of this class are the @Path(`"hello")` and the `@GET' annotated method.
+
+Note that the Resource is a CDI bean annotated with `@ApplicationScoped`.
+Thus only one instance exists.
\ No newline at end of file
diff --git a/rest-trivial/pom.xml b/rest-trivial/pom.xml
index 296d21f..5a1b18a 100644
--- a/rest-trivial/pom.xml
+++ b/rest-trivial/pom.xml
@@ -2,14 +2,58 @@
 <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns="http://maven.apache.org/POM/4.0.0"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
     <parent>
         <groupId>org.apache.meecrowave</groupId>
         <artifactId>meecrowave-examples</artifactId>
         <version>1.2.2-SNAPSHOT</version>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
+
 
     <artifactId>samples-rest-trivial</artifactId>
     <name>REST (trivial)</name>
 
+    <dependencies>
+        <!-- this package contains the javax APIs for CDI, JAX-RS, JSONP, JSONB and Servlet4 -->
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-specs-api</artifactId>
+            <version>${meecrowave.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-core</artifactId>
+            <version>${meecrowave.version}</version>
+        </dependency>
+
+        <!-- our test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit4.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-junit</artifactId>
+            <version>${meecrowave.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <!--
+                    For starting meecrowave via Maven. Just run
+                    $> mvn clean install meecrowave:run
+                -->
+                <groupId>org.apache.meecrowave</groupId>
+                <artifactId>meecrowave-maven-plugin</artifactId>
+                <version>${meecrowave.version}</version>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>
\ No newline at end of file
diff --git a/rest/pom.xml b/rest/pom.xml
index 6bf61b2..8503ee2 100644
--- a/rest/pom.xml
+++ b/rest/pom.xml
@@ -12,4 +12,48 @@
     <artifactId>samples-rest</artifactId>
     <name>REST</name>
 
+    <dependencies>
+        <!-- this package contains the javax APIs for CDI, JAX-RS, JSONP, JSONB and Servlet4 -->
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-specs-api</artifactId>
+            <version>${meecrowave.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-core</artifactId>
+            <version>${meecrowave.version}</version>
+        </dependency>
+
+        <!-- our test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit4.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-junit</artifactId>
+            <version>${meecrowave.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <!--
+                    For starting meecrowave via Maven. Just run
+                    $> mvn clean install meecrowave:run
+                -->
+                <groupId>org.apache.meecrowave</groupId>
+                <artifactId>meecrowave-maven-plugin</artifactId>
+                <version>${meecrowave.version}</version>
+            </plugin>
+
+        </plugins>
+    </build>
+
+
 </project>
\ No newline at end of file
diff --git a/servlet-trivial/pom.xml b/servlet-trivial/pom.xml
index faec477..fdc91b8 100644
--- a/servlet-trivial/pom.xml
+++ b/servlet-trivial/pom.xml
@@ -31,4 +31,48 @@
     <name>Servlet (trivial)</name>
 
 
+    <dependencies>
+        <!-- this package contains the javax APIs for CDI, JAX-RS, JSONP, JSONB and Servlet4 -->
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-specs-api</artifactId>
+            <version>${meecrowave.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-core</artifactId>
+            <version>${meecrowave.version}</version>
+        </dependency>
+
+        <!-- our test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit4.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-junit</artifactId>
+            <version>${meecrowave.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <!--
+                    For starting meecrowave via Maven. Just run
+                    $> mvn clean install meecrowave:run
+                -->
+                <groupId>org.apache.meecrowave</groupId>
+                <artifactId>meecrowave-maven-plugin</artifactId>
+                <version>${meecrowave.version}</version>
+            </plugin>
+
+        </plugins>
+    </build>
+
+
 </project>
\ No newline at end of file
diff --git a/servlet-vaadin-v08/pom.xml b/servlet-vaadin-v08/pom.xml
index cec6067..12d3364 100644
--- a/servlet-vaadin-v08/pom.xml
+++ b/servlet-vaadin-v08/pom.xml
@@ -59,6 +59,46 @@
             <artifactId>vaadin-client-compiled</artifactId>
         </dependency>
 
+        <!-- this package contains the javax APIs for CDI, JAX-RS, JSONP, JSONB and Servlet4 -->
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-specs-api</artifactId>
+            <version>${meecrowave.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-core</artifactId>
+            <version>${meecrowave.version}</version>
+        </dependency>
+
+        <!-- our test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit4.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-junit</artifactId>
+            <version>${meecrowave.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <!--
+                    For starting meecrowave via Maven. Just run
+                    $> mvn clean install meecrowave:run
+                -->
+                <groupId>org.apache.meecrowave</groupId>
+                <artifactId>meecrowave-maven-plugin</artifactId>
+                <version>${meecrowave.version}</version>
+            </plugin>
+
+        </plugins>
+    </build>
+
 </project>
\ No newline at end of file
diff --git a/servlet-vaadin-v10/pom.xml b/servlet-vaadin-v10/pom.xml
index 552b02a..5cf644b 100644
--- a/servlet-vaadin-v10/pom.xml
+++ b/servlet-vaadin-v10/pom.xml
@@ -72,6 +72,13 @@
     </dependencyManagement>
 
     <dependencies>
+        <!-- this package contains the javax APIs for CDI, JAX-RS, JSONP, JSONB and Servlet4 -->
+        <dependency>
+            <groupId>org.apache.meecrowave</groupId>
+            <artifactId>meecrowave-specs-api</artifactId>
+            <version>${meecrowave.version}</version>
+        </dependency>
+
         <!--Vaadin -->
         <dependency>
             <groupId>com.vaadin</groupId>
@@ -83,6 +90,16 @@
     <build>
         <plugins>
             <plugin>
+                <!--
+                    For starting meecrowave via Maven. Just run
+                    $> mvn clean install meecrowave:run
+                -->
+                <groupId>org.apache.meecrowave</groupId>
+                <artifactId>meecrowave-maven-plugin</artifactId>
+                <version>${meecrowave.version}</version>
+            </plugin>
+
+            <plugin>
                 <groupId>com.vaadin</groupId>
                 <artifactId>vaadin-maven-plugin</artifactId>
                 <version>${vaadin.version}</version>