Repository: iluwatar/java-design-patterns
Issue: Java 11 support: Run the build on JDK 11
Labels: epic: build issue

This task is part of the Java 11 transition plan https://github.com/iluwatar/java-design-patterns/wiki/16.-Java-11-Transition

In this task we run the regular build entirely on the newer JDK 11 in a way that lets us gather all errors instead of stopping the build to the first failure (see https://blog.codefx.org/java/planning-your-java-9-update/). Report the list of errors under this issue.

Issue comments:
Lets give it a try..
Ok @perwramdemark 
@iluwatar would it be possible to setup CI build with JDK11?
Added issue https://github.com/iluwatar/java-design-patterns/issues/973 where this is resolved
Build with JDK11 from current master branch (commit 90ea4506caa653711f69fabb99ee7ac26c4ecce7) produces the following output.

![image](https://user-images.githubusercontent.com/582346/66600101-6fdaf180-ebad-11e9-894c-79c277a725a3.png)

The modules that are failing
- service-layer
- naked-objects
- repository
- layers
- cqrs
- eip-wire-tap
- eip-splitter
- eip-aggregator
- trampoline

Full build output in the attachment 
[output.txt](https://github.com/iluwatar/java-design-patterns/files/3714293/output.txt)

Let's continue from here in other issues
See https://github.com/iluwatar/java-design-patterns/issues/976
@perwramdemark will you work on that?

Pull request review comments:

Patch that resolved the issue:
diff --git a/cqrs/pom.xml b/cqrs/pom.xml
index beb195473ced..fc89a93b7c79 100644
--- a/cqrs/pom.xml
+++ b/cqrs/pom.xml
@@ -39,4 +39,25 @@
 			<artifactId>hibernate-core</artifactId>
 		</dependency>
 	</dependencies>
+	<profiles>
+		<profile>
+			<id>jdk11-deps</id>
+			<activation>
+				<jdk>[11,)</jdk>
+			</activation>
+			<dependencies>
+				<dependency>
+					<groupId>com.sun.xml.bind</groupId>
+					<artifactId>jaxb-impl</artifactId>
+					<scope>test</scope>
+					<version>2.1.17</version>
+				</dependency>
+				<dependency>
+					<groupId>javax.xml.bind</groupId>
+					<artifactId>jaxb-api</artifactId>
+					<scope>test</scope>
+				</dependency>
+			</dependencies>
+		</profile>
+	</profiles>
 </project>
diff --git a/eip-aggregator/pom.xml b/eip-aggregator/pom.xml
index f56ae78deb73..39270f02097e 100644
--- a/eip-aggregator/pom.xml
+++ b/eip-aggregator/pom.xml
@@ -70,4 +70,24 @@
         </dependency>
 
     </dependencies>
+
+    <profiles>
+        <profile>
+            <id>jdk11-deps</id>
+            <activation>
+                <jdk>[11,)</jdk>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>com.sun.xml.bind</groupId>
+                    <artifactId>jaxb-impl</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>javax.xml.bind</groupId>
+                    <artifactId>jaxb-api</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/eip-splitter/pom.xml b/eip-splitter/pom.xml
index 2bc3eec8402b..7319f651939c 100644
--- a/eip-splitter/pom.xml
+++ b/eip-splitter/pom.xml
@@ -70,4 +70,25 @@
         </dependency>
 
     </dependencies>
+
+    <profiles>
+        <profile>
+            <id>jdk11-deps</id>
+            <activation>
+                <jdk>[11,)</jdk>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>com.sun.xml.bind</groupId>
+                    <artifactId>jaxb-impl</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>javax.xml.bind</groupId>
+                    <artifactId>jaxb-api</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+
+
 </project>
diff --git a/eip-wire-tap/pom.xml b/eip-wire-tap/pom.xml
index efca8d3c4cfb..a9d30924204a 100644
--- a/eip-wire-tap/pom.xml
+++ b/eip-wire-tap/pom.xml
@@ -70,4 +70,23 @@
         </dependency>
 
     </dependencies>
+
+    <profiles>
+        <profile>
+            <id>jdk11-deps</id>
+            <activation>
+                <jdk>[11,)</jdk>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>com.sun.xml.bind</groupId>
+                    <artifactId>jaxb-impl</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>javax.xml.bind</groupId>
+                    <artifactId>jaxb-api</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
 </project>
diff --git a/naked-objects/dom/exclude-pmd.properties b/naked-objects/dom/exclude-pmd.properties
new file mode 100644
index 000000000000..bda3929accc6
--- /dev/null
+++ b/naked-objects/dom/exclude-pmd.properties
@@ -0,0 +1,24 @@
+#
+# The MIT License
+# Copyright (c) 2014-2016 Ilkka Seppälä
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+
+domainapp.dom.modules.simple.QSimpleObject=UnusedFormalParameter
\ No newline at end of file
diff --git a/naked-objects/dom/pom.xml b/naked-objects/dom/pom.xml
index 69365bd4b00a..039afc373727 100644
--- a/naked-objects/dom/pom.xml
+++ b/naked-objects/dom/pom.xml
@@ -78,7 +78,7 @@
 				<activeByDefault>true</activeByDefault>
 			</activation>
 			<properties>
-                <datanucleus-maven-plugin.version>4.0.1</datanucleus-maven-plugin.version>
+                <datanucleus-maven-plugin.version>5.2.1</datanucleus-maven-plugin.version>
 			</properties>
 			<build>
 				<pluginManagement>
diff --git a/naked-objects/integtests/pom.xml b/naked-objects/integtests/pom.xml
index c4dd52dcf652..f12f4ae1e368 100644
--- a/naked-objects/integtests/pom.xml
+++ b/naked-objects/integtests/pom.xml
@@ -122,6 +122,20 @@
         </repository>  
     </repositories>  
      -->
+	<profiles>
+		<profile>
+			<id>jdk11-deps</id>
+			<activation>
+				<jdk>[11,)</jdk>
+			</activation>
+			<dependencies>
+				<dependency>
+					<groupId>javax.annotation</groupId>
+					<artifactId>javax.annotation-api</artifactId>
+				</dependency>
+			</dependencies>
+		</profile>
+	</profiles>
 
 
 </project>
diff --git a/pom.xml b/pom.xml
index d812d27c4c54..efeee185c788 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,7 +56,8 @@
         <jackson.version>2.8.5</jackson.version>
         <pmd.version>3.12.0</pmd.version>
         <log4j.version>1.2.17</log4j.version>
-        <jaxb-api.version>2.3.0</jaxb-api.version>
+        <jaxb-api.version>2.3.1</jaxb-api.version>
+        <jaxb-impl.version>2.3.2</jaxb-impl.version>
         <annotation-api.version>1.3.1</annotation-api.version>
     </properties>
     <modules>
@@ -314,6 +315,11 @@
                 <artifactId>javax.annotation-api</artifactId>
                 <version>${annotation-api.version}</version>
             </dependency>
+            <dependency>
+                <groupId>com.sun.xml.bind</groupId>
+                <artifactId>jaxb-impl</artifactId>
+                <version>${jaxb-impl.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 
@@ -494,4 +500,27 @@
         </plugins>
     </reporting>
 
+    <profiles>
+        <profile>
+            <id>jdk11-dep-management</id>
+            <activation>
+                <jdk>[11,)</jdk>
+            </activation>
+            <dependencyManagement>
+	            <dependencies>
+	                <dependency>
+	                    <groupId>org.javassist</groupId>
+	                    <artifactId>javassist</artifactId>
+	                    <version>3.25.0-GA</version>
+	                </dependency>
+	                <dependency>
+	                    <groupId>javax.annotation</groupId>
+	                    <artifactId>javax.annotation-api</artifactId>
+	                    <version>1.3.2</version>
+	                </dependency>
+	            </dependencies>
+            </dependencyManagement>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/service-layer/pom.xml b/service-layer/pom.xml
index 403a896a4613..4edd950740a8 100644
--- a/service-layer/pom.xml
+++ b/service-layer/pom.xml
@@ -52,4 +52,22 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+  <profiles>
+      <profile>
+          <id>jdk11-deps</id>
+          <activation>
+              <jdk>[11,)</jdk>
+          </activation>
+          <dependencies>
+              <dependency>
+                  <groupId>com.sun.xml.bind</groupId>
+                  <artifactId>jaxb-impl</artifactId>
+              </dependency>
+              <dependency>
+                  <groupId>javax.xml.bind</groupId>
+                  <artifactId>jaxb-api</artifactId>
+              </dependency>
+          </dependencies>
+      </profile>
+  </profiles>
 </project>
diff --git a/trampoline/pom.xml b/trampoline/pom.xml
index 1e019ef31297..86726a1186bc 100644
--- a/trampoline/pom.xml
+++ b/trampoline/pom.xml
@@ -51,7 +51,7 @@
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
-            <version>1.16.18</version>
+            <version>1.18.10</version>
         </dependency>
 
 


Test patch: