Skip to content

Commit e4460f5

Browse files
wbornkaikreuzer
authored andcommitted
Switch to Java 11 and drop Java 8 support (openhab#160)
* Switch to Java 11 and drop Java 8 support Signed-off-by: Wouter Born <[email protected]>
1 parent baadca6 commit e4460f5

File tree

12 files changed

+33
-15
lines changed

12 files changed

+33
-15
lines changed

.travis.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
sudo: required
2-
dist: xenial
2+
dist: bionic
33

44
language: java
55

6-
jdk:
7-
- openjdk8
8-
- openjdk11
6+
jdk: openjdk11
97

108
cache:
119
directories:

bundles/org.openhab.ui.basic/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<attribute name="test" value="true"/>
1919
</attributes>
2020
</classpathentry>
21-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
21+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
2222
<attributes>
2323
<attribute name="maven.pomderived" value="true"/>
2424
</attributes>

bundles/org.openhab.ui.basic/BasicUI Setup.launch

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
<stringAttribute key="M2_USER_SETTINGS" value=""/>
1414
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
1515
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
16-
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JRE for JavaSE-1.8"/>
16+
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JRE for JavaSE-11"/>
1717
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:/org.openhab.ui.basic}"/>
1818
</launchConfiguration>

bundles/org.openhab.ui.cometvisu.php/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<attribute name="test" value="true"/>
1414
</attributes>
1515
</classpathentry>
16-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
16+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
1717
<attributes>
1818
<attribute name="maven.pomderived" value="true"/>
1919
</attributes>

bundles/org.openhab.ui.cometvisu/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</attributes>
2020
</classpathentry>
2121
<classpathentry kind="src" path="src/gen/java"/>
22-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
22+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
2323
<attributes>
2424
<attribute name="maven.pomderived" value="true"/>
2525
</attributes>

bundles/org.openhab.ui.dashboard/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<attribute name="test" value="true"/>
2929
</attributes>
3030
</classpathentry>
31-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
31+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
3232
<attributes>
3333
<attribute name="maven.pomderived" value="true"/>
3434
</attributes>

bundles/org.openhab.ui.habot/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<attribute name="test" value="true"/>
3030
</attributes>
3131
</classpathentry>
32-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
32+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
3333
<attributes>
3434
<attribute name="maven.pomderived" value="true"/>
3535
</attributes>

bundles/org.openhab.ui.habpanel/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<attribute name="test" value="true"/>
2424
</attributes>
2525
</classpathentry>
26-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
26+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
2727
<attributes>
2828
<attribute name="maven.pomderived" value="true"/>
2929
</attributes>

bundles/org.openhab.ui.homebuilder/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<attribute name="test" value="true"/>
1919
</attributes>
2020
</classpathentry>
21-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
21+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
2222
<attributes>
2323
<attribute name="maven.pomderived" value="true"/>
2424
</attributes>

bundles/org.openhab.ui.iconset.classic/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<attribute name="test" value="true"/>
1919
</attributes>
2020
</classpathentry>
21-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
21+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
2222
<attributes>
2323
<attribute name="maven.pomderived" value="true"/>
2424
</attributes>

bundles/org.openhab.ui.restdocs/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<attribute name="test" value="true"/>
1919
</attributes>
2020
</classpathentry>
21-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
21+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
2222
<attributes>
2323
<attribute name="maven.pomderived" value="true"/>
2424
</attributes>

pom.xml

+21-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<properties>
5555
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5656
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
57-
<oh.java.version>1.8</oh.java.version>
57+
<oh.java.version>11</oh.java.version>
5858
<maven.compiler.source>${oh.java.version}</maven.compiler.source>
5959
<maven.compiler.target>${oh.java.version}</maven.compiler.target>
6060
<maven.compiler.compilerVersion>${oh.java.version}</maven.compiler.compilerVersion>
@@ -450,6 +450,26 @@ Import-Package: \\
450450
</execution>
451451
</executions>
452452
</plugin>
453+
454+
<plugin>
455+
<groupId>org.apache.maven.plugins</groupId>
456+
<artifactId>maven-enforcer-plugin</artifactId>
457+
<executions>
458+
<execution>
459+
<id>enforce-java</id>
460+
<goals>
461+
<goal>enforce</goal>
462+
</goals>
463+
<configuration>
464+
<rules>
465+
<requireJavaVersion>
466+
<version>[11.0,12.0)</version>
467+
</requireJavaVersion>
468+
</rules>
469+
</configuration>
470+
</execution>
471+
</executions>
472+
</plugin>
453473
</plugins>
454474
</build>
455475

0 commit comments

Comments
 (0)