Skip to content

Commit

Permalink
Raise minimum JDK version to 17 (openhab#2994)
Browse files Browse the repository at this point in the history
* Raise source level to Java 17 (except for model classes)
* Remove Nashorn script engine
* Upgrade spotless and add jvm options
  See diffplug/spotless#834
* Add suppression for findBugs false positive error
* Upgrade xtext to 2.29.0
* Adjust JNA
* Resolve itests

Signed-off-by: Jan N. Klug <github@klug.nrw>
GitOrigin-RevId: 41ba3ff
  • Loading branch information
J-N-K authored and splatch committed Jul 12, 2023
1 parent e285223 commit 13913ad
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 202 deletions.
2 changes: 1 addition & 1 deletion bom/compile-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
<dependency>
<groupId>org.eclipse.orbit.bundles</groupId>
<artifactId>io.github.classgraph</artifactId>
<version>4.8.138.v20211212-1642 </version>
<version>4.8.149.v20220915-0556</version>
<scope>compile</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion bom/compile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.9</version>
<version>2.9.1</version>
<scope>compile</scope>
</dependency>

Expand Down
9 changes: 2 additions & 7 deletions bom/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.9</version>
<version>2.9.1</version>
<scope>compile</scope>
</dependency>

Expand Down Expand Up @@ -771,7 +771,7 @@
<dependency>
<groupId>org.eclipse.orbit.bundles</groupId>
<artifactId>io.github.classgraph</artifactId>
<version>4.8.138.v20211212-1642 </version>
<version>4.8.149.v20220915-0556</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -878,11 +878,6 @@
<version>${xtext.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion bundles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>unpack-eea</id>
Expand Down
6 changes: 3 additions & 3 deletions features/karaf/openhab-core/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<feature dependency="true">openhab.tp-gson</feature>

<requirement>openhab.tp;filter:="(&amp;(feature=xtext)(version&gt;=2.26.0)(!(version&gt;=2.27.0)))"</requirement>
<requirement>openhab.tp;filter:="(&amp;(feature=xtext)(version&gt;=2.29.0)(!(version&gt;=2.30.0)))"</requirement>
<feature dependency="true">openhab.tp-xtext</feature>

<requirement>openhab.tp;filter:="(feature=jax-rs-whiteboard)"</requirement>
Expand Down Expand Up @@ -349,10 +349,10 @@

<feature name="openhab-core-model-lsp" version="${project.version}">

<requirement>openhab.tp;filter:="(&amp;(feature=xtext-ide)(version&gt;=2.26.0)(!(version&gt;=2.27.0)))"</requirement>
<requirement>openhab.tp;filter:="(&amp;(feature=xtext-ide)(version&gt;=2.29.0)(!(version&gt;=2.30.0)))"</requirement>
<feature dependency="true">openhab.tp-xtext-ide</feature>

<requirement>openhab.tp;filter:="(&amp;(feature=lsp4j)(version&gt;=0.12.0)(!(version&gt;=0.13.0)))"</requirement>
<requirement>openhab.tp;filter:="(&amp;(feature=lsp4j)(version&gt;=0.19.0)(!(version&gt;=0.20.0)))"</requirement>
<feature dependency="true">openhab.tp-lsp4j</feature>

<feature>openhab-core-model-item-ide</feature>
Expand Down
2 changes: 1 addition & 1 deletion features/karaf/openhab-tp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<properties>
<jetty.version>9.4.46.v20220331</jetty.version>
<jna.version>5.11.0</jna.version>
<jna.version>5.12.1</jna.version>
</properties>

<build>
Expand Down
38 changes: 19 additions & 19 deletions features/karaf/openhab-tp/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
</feature>

<feature name="openhab.tp-gson" description="Gson" version="${project.version}">
<capability>openhab.tp;feature=gson;version=2.8.9</capability>
<bundle>mvn:com.google.code.gson/gson/2.8.9</bundle>
<capability>openhab.tp;feature=gson;version=2.9.1</capability>
<bundle>mvn:com.google.code.gson/gson/2.9.1</bundle>
</feature>

<feature name="openhab.tp-hivemqclient" description="MQTT Client" version="${project.version}">
Expand Down Expand Up @@ -200,9 +200,9 @@
</feature>

<feature name="openhab.tp-lsp4j" description="Eclipse LSP4J" version="${project.version}">
<capability>openhab.tp;feature=lsp4j;version=0.12.0</capability>
<bundle>mvn:org.eclipse.lsp4j/org.eclipse.lsp4j/0.12.0</bundle>
<bundle>mvn:org.eclipse.lsp4j/org.eclipse.lsp4j.jsonrpc/0.12.0</bundle>
<capability>openhab.tp;feature=lsp4j;version=0.19.0</capability>
<bundle>mvn:org.eclipse.lsp4j/org.eclipse.lsp4j/0.19.0</bundle>
<bundle>mvn:org.eclipse.lsp4j/org.eclipse.lsp4j.jsonrpc/0.19.0</bundle>

<feature dependency="true">openhab.tp-gson</feature>
<feature dependency="true">openhab.tp-xtext</feature>
Expand All @@ -222,32 +222,32 @@
</feature>

<feature name="openhab.tp-xtext" description="Xtext - Language Engineering Made Easy" version="${project.version}">
<capability>openhab.tp;feature=xtext;version=2.26.0</capability>
<capability>openhab.tp;feature=xtext;version=2.29.0</capability>

<bundle>mvn:org.eclipse.xtext/org.eclipse.xtext/2.26.0</bundle>
<bundle>mvn:org.eclipse.xtext/org.eclipse.xtext/2.29.0</bundle>

<bundle dependency="true">mvn:org.eclipse.emf/org.eclipse.emf.common/2.17.0</bundle>
<bundle dependency="true">mvn:org.eclipse.emf/org.eclipse.emf.ecore/2.20.0</bundle>
<bundle dependency="true">mvn:org.eclipse.emf/org.eclipse.emf.ecore.change/2.14.0</bundle>
<bundle dependency="true">mvn:org.eclipse.emf/org.eclipse.emf.ecore.xmi/2.16.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.common.types/2.26.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.common.types/2.29.0</bundle>

<bundle dependency="true">mvn:javax.annotation/javax.annotation-api/1.2</bundle>

<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.xbase/2.26.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.xbase.lib/2.26.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.smap/2.26.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.util/2.26.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtend/org.eclipse.xtend.lib/2.26.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtend/org.eclipse.xtend.lib.macro/2.26.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.xbase/2.29.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.xbase.lib/2.29.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.smap/2.29.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.util/2.29.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtend/org.eclipse.xtend.lib/2.29.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtend/org.eclipse.xtend.lib.macro/2.29.0</bundle>

<bundle dependency="true">mvn:com.google.guava/failureaccess/1.0.1</bundle>
<bundle dependency="true">mvn:com.google.guava/guava/30.1-jre</bundle>
<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax-inject/1_2</bundle>

<bundle dependency="true">mvn:org.eclipse.orbit.bundles/org.aopalliance/1.0.0.v201105210816</bundle>
<bundle dependency="true">mvn:org.eclipse.orbit.bundles/com.google.inject/5.0.1.v20210324-2015</bundle>
<bundle dependency="true">mvn:org.eclipse.orbit.bundles/io.github.classgraph/4.8.138.v20211212-1642</bundle>
<bundle dependency="true">mvn:org.eclipse.orbit.bundles/io.github.classgraph/4.8.149.v20220915-0556</bundle>
<bundle dependency="true">mvn:org.eclipse.orbit.bundles/org.antlr.runtime/3.2.0.v201101311130</bundle>

<bundle dependency="true">mvn:org.eclipse.platform/org.eclipse.equinox.common/3.13.0</bundle>
Expand All @@ -256,16 +256,16 @@

<!-- Add ASM package -->
<!-- org.eclipse.xtext.common.types is using Require-Bundle -->
<bundle dependency="true" start-level="20">mvn:org.ow2.asm/asm/9.2</bundle>
<bundle dependency="true" start-level="20">mvn:org.ow2.asm/asm/9.4</bundle>
</feature>

<feature name="openhab.tp-xtext-ide" description="Xtext - IDE Support" version="${project.version}">
<capability>openhab.tp;feature=xtext-ide;version=2.26.0</capability>
<capability>openhab.tp;feature=xtext-ide;version=2.29.0</capability>
<feature dependency="true">openhab.tp-xtext</feature>

<!-- Support for the Language Server Protocol -->
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.ide/2.26.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.xbase.ide/2.26.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.ide/2.29.0</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.xbase.ide/2.29.0</bundle>
</feature>

<feature name="openhab.tp-swagger-jaxrs" description="JAX-RS Whiteboard Swagger Support" version="${project.version}">
Expand Down

This file was deleted.

4 changes: 4 additions & 0 deletions tools/static-code-analysis/spotbugs/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@
<Match>
<Bug pattern="SLF4J_SIGN_ONLY_FORMAT"/>
</Match>
<Match>
<!-- see https://github.com/spotbugs/spotbugs/issues/1992 -->
<Bug pattern="SA_LOCAL_SELF_COMPARISON"/>
</Match>
</FindBugsFilter>

0 comments on commit 13913ad

Please sign in to comment.