releng: Make JDK version configurable in pom.xml

Requires updating Tycho to version 2.3.0 and maven to version 3.6.3.

Requires JDK 11 Execution Environment to be set for the current target.

[Changed] Require JDK 11 for building with default target and settings

Change-Id: I69eefb1df81e29bbdc293f34398fea01a5a5b626
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/167129
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
diff --git a/pom.xml b/pom.xml
index 3d78802..9289546 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,17 +40,20 @@
   </licenses>
 
   <properties>
-    <required-maven-version>3.3</required-maven-version>
+    <required-maven-version>3.6.3</required-maven-version>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <testArgLine></testArgLine>
 
+    <jdk.version>11</jdk.version>
+    <jdk.release>11</jdk.release>
+
     <skip-tc-core-tests>false</skip-tc-core-tests>
     <skip-short-tc-ui-tests>false</skip-short-tc-ui-tests>
     <skip-long-tc-ui-tests>false</skip-long-tc-ui-tests>
 
-    <tycho-version>1.3.0</tycho-version>
-    <tycho-extras-version>1.3.0</tycho-extras-version>
+    <tycho-version>2.3.0</tycho-version>
+    <tycho-extras-version>2.3.0</tycho-extras-version>
     <tycho.scmUrl>scm:git:git://git.eclipse.org/gitroot/tracecompass/org.eclipse.tracecompass.git</tycho.scmUrl>
     <cbi-plugins.version>1.3.1</cbi-plugins.version>
     <target-platform>tracecompass-e4.19</target-platform>
@@ -63,7 +66,7 @@
     <!-- Sonar rule configuration -->
     <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
     <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
-    <sonar.java.source>1.8</sonar.java.source>
+    <sonar.java.source>${jdk.version}</sonar.java.source>
     <sonar.exclusions>**/tests/**,**/test/**,**/stubs/**,**/Messages*,**/alltests/**,**/ITmfEventField.java</sonar.exclusions>
     <sonar.skippedModules>org.eclipse.tracecompass.ctf.parser,org.eclipse.tracecompass.examples</sonar.skippedModules>
     <jacoco.destFile>${project.basedir}/../../target/jacoco.exec</jacoco.destFile>
@@ -337,7 +340,7 @@
                   <version>${required-maven-version}</version>
                 </requireMavenVersion>
                 <requireJavaVersion>
-                  <version>1.8</version>
+                  <version>${jdk.version}</version>
                 </requireJavaVersion>
               </rules>
               <fail>true</fail>
@@ -350,6 +353,7 @@
         <groupId>org.eclipse.tycho</groupId>
         <artifactId>target-platform-configuration</artifactId>
         <configuration>
+          <executionEnvironment>JavaSE-${jdk.version}</executionEnvironment>
           <includePackedArtifacts>true</includePackedArtifacts>
           <environments>
             <environment>
@@ -458,8 +462,9 @@
           <artifactId>tycho-compiler-plugin</artifactId>
           <version>${tycho-version}</version>
           <configuration>
-            <source>1.8</source>
-            <target>1.8</target>
+            <source>${jdk.version}</source>
+            <target>${jdk.version}</target>
+            <release>${jdk.release}</release>
             <encoding>UTF-8</encoding>
             <compilerArguments>
               <annotationpath>common/org.eclipse.tracecompass.common.core/annotations</annotationpath>
@@ -500,6 +505,7 @@
           <version>${tycho-version}</version>
           <configuration>
             <!-- Default configuration, UI tests may have to override these -->
+            <excludes>**/*Tests.java,**/*$*</excludes>
             <useUIHarness>false</useUIHarness>
             <useUIThread>false</useUIThread>
             <dependencies>
@@ -542,6 +548,25 @@
 
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-toolchains-plugin</artifactId>
+          <executions>
+            <execution>
+              <goals>
+                <goal>toolchain</goal>
+              </goals>
+            </execution>
+          </executions>
+          <configuration>
+            <toolchains>
+              <jdk>
+                <version>${jdk.version}</version>
+              </jdk>
+            </toolchains>
+          </configuration>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-resources-plugin</artifactId>
           <version>3.0.2</version>
           <configuration>
@@ -644,7 +669,7 @@
                 <type>eclipse-plugin</type>
               </dependency>
             </dependencies>
-            <!-- This needs to be explicitely set now, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=395281 -->
+            <!-- This needs to be explicitly set now, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=395281 -->
             <repositories>
               <repository>
                 <id>platform</id>
@@ -652,7 +677,7 @@
                 <url>${help-docs-eclipserun-repo}</url>
               </repository>
             </repositories>
-            <executionEnvironment>JavaSE-1.8</executionEnvironment>
+            <executionEnvironment>JavaSE-${jdk.version}</executionEnvironment>
           </configuration>
           <executions>
             <execution>