mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Allow for compiling with Java 21 (#4161)
* Support Java 17 and 21, default compilation to Java 17 class files, use maven.compiler.release instead of source and target * Add profile "j21" to compile to Java 21 class files * Upgrade SAT to 0.16.0, adapt code which breaks build with new SAT checks * Use model-specific-profile to pin xtend to Java 17 Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
+1
-1
@@ -107,7 +107,7 @@ public class CronSchedulerImpl implements CronScheduler {
|
||||
for (Iterator<Cron> cron = crons.iterator(); cron.hasNext();) {
|
||||
final Cron c = cron.next();
|
||||
|
||||
if (c.target == s) {
|
||||
if (c.target.equals(s)) {
|
||||
cron.remove();
|
||||
c.schedule.cancel(true);
|
||||
}
|
||||
|
||||
@@ -276,6 +276,10 @@
|
||||
<exists>model.profile-marker</exists>
|
||||
</file>
|
||||
</activation>
|
||||
<properties>
|
||||
<!-- workaround for Java 21 build, necessary until xtend supports Java 21 -->
|
||||
<maven.compiler.release>17</maven.compiler.release>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.openhab.core.bom</groupId>
|
||||
|
||||
@@ -64,17 +64,14 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<oh.java.version>17</oh.java.version>
|
||||
<maven.compiler.source>${oh.java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${oh.java.version}</maven.compiler.target>
|
||||
<maven.compiler.compilerVersion>${oh.java.version}</maven.compiler.compilerVersion>
|
||||
<maven.compiler.release>17</maven.compiler.release>
|
||||
|
||||
<bnd.version>7.0.0</bnd.version>
|
||||
<commons.net.version>3.7.2</commons.net.version>
|
||||
<eea.version>2.3.0</eea.version>
|
||||
<karaf.compile.version>4.4.5</karaf.compile.version>
|
||||
<karaf.tooling.version>4.4.5</karaf.tooling.version>
|
||||
<sat.version>0.15.0</sat.version>
|
||||
<sat.version>0.16.0</sat.version>
|
||||
<slf4j.version>2.0.7</slf4j.version>
|
||||
<xtext.version>2.34.0</xtext.version>
|
||||
<spotless.version>2.38.0</spotless.version>
|
||||
@@ -670,7 +667,7 @@ Import-Package: \\
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireJavaVersion>
|
||||
<version>[17.0,18.0)</version>
|
||||
<version>[17.0,18.0),[21.0,22.0)</version>
|
||||
</requireJavaVersion>
|
||||
</rules>
|
||||
</configuration>
|
||||
@@ -845,5 +842,11 @@ Import-Package: \\
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>j21</id>
|
||||
<properties>
|
||||
<maven.compiler.release>21</maven.compiler.release>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user