Migrate to jdk 21 (#2295)
* docker containers using images with jre 21 * project is still building with target java 17 - so jar artifacts are java 17 compatible * provided option to have different version for client libraries (e.g. ddi and management REST api) Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
2
.github/workflows/trivy-scan.yml
vendored
2
.github/workflows/trivy-scan.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
java-version: "17"
|
java-version: 21
|
||||||
cache: "maven"
|
cache: "maven"
|
||||||
|
|
||||||
- name: Create hawkBit container images
|
- name: Create hawkBit container images
|
||||||
|
|||||||
4
.github/workflows/verify-hibernate.yml
vendored
4
.github/workflows/verify-hibernate.yml
vendored
@@ -32,11 +32,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 21
|
||||||
cache: 'maven'
|
cache: 'maven'
|
||||||
|
|
||||||
- name: Cache local Maven repository
|
- name: Cache local Maven repository
|
||||||
|
|||||||
4
.github/workflows/verify.yml
vendored
4
.github/workflows/verify.yml
vendored
@@ -32,11 +32,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 21
|
||||||
cache: 'maven'
|
cache: 'maven'
|
||||||
|
|
||||||
- name: Cache local Maven repository
|
- name: Cache local Maven repository
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# set Java
|
# set Java
|
||||||
ARG JAVA_VERSION=17.0.14_7
|
ARG JAVA_VERSION=21.0.6_7
|
||||||
# extracts spring layers from the app jar (to optimize boot)
|
# extracts spring layers from the app jar (to optimize boot)
|
||||||
FROM eclipse-temurin:${JAVA_VERSION}-jre-alpine as build
|
FROM eclipse-temurin:${JAVA_VERSION}-jre-alpine as build
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# set Java
|
# set Java
|
||||||
ARG JAVA_VERSION=17.0.14_7
|
ARG JAVA_VERSION=21.0.6_7
|
||||||
# extracts spring layers from the app jar (to optimize boot)
|
# extracts spring layers from the app jar (to optimize boot)
|
||||||
FROM eclipse-temurin:${JAVA_VERSION}-jre-alpine as build
|
FROM eclipse-temurin:${JAVA_VERSION}-jre-alpine as build
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,10 @@
|
|||||||
<artifactId>hawkbit-ddi-api</artifactId>
|
<artifactId>hawkbit-ddi-api</artifactId>
|
||||||
<name>hawkBit :: DDI :: REST API</name>
|
<name>hawkBit :: DDI :: REST API</name>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<java.version>${java.client.version}</java.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.hawkbit</groupId>
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
<artifactId>hawkbit-mgmt-api</artifactId>
|
<artifactId>hawkbit-mgmt-api</artifactId>
|
||||||
<name>hawkBit :: Management :: REST API</name>
|
<name>hawkBit :: Management :: REST API</name>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<java.version>${java.client.version}</java.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.hawkbit</groupId>
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import org.springframework.context.annotation.Bean;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.PropertySource;
|
import org.springframework.context.annotation.PropertySource;
|
||||||
import org.springframework.core.Ordered;
|
import org.springframework.core.Ordered;
|
||||||
import org.springframework.core.annotation.Order;;
|
import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||||
import org.springframework.security.web.firewall.FirewalledRequest;
|
import org.springframework.security.web.firewall.FirewalledRequest;
|
||||||
import org.springframework.security.web.firewall.HttpFirewall;
|
import org.springframework.security.web.firewall.HttpFirewall;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
<spring-cloud-starter-openfeign.version>4.2.1</spring-cloud-starter-openfeign.version>
|
<spring-cloud-starter-openfeign.version>4.2.1</spring-cloud-starter-openfeign.version>
|
||||||
<openfeign-hc5.version>13.5</openfeign-hc5.version>
|
<openfeign-hc5.version>13.5</openfeign-hc5.version>
|
||||||
<bouncycastle.version>1.80</bouncycastle.version>
|
<bouncycastle.version>1.80</bouncycastle.version>
|
||||||
|
<java.version>${java.client.version}</java.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
3
pom.xml
3
pom.xml
@@ -37,6 +37,9 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<revision>0-SNAPSHOT</revision>
|
<revision>0-SNAPSHOT</revision>
|
||||||
<java.version>17</java.version>
|
<java.version>17</java.version>
|
||||||
|
<!-- java.version is used to build the hawkbit in general, however, some artifacts which could be used
|
||||||
|
as libraries in other projects might be compiled with a different, lower, java version. -->
|
||||||
|
<java.client.version>17</java.client.version>
|
||||||
|
|
||||||
<snapshotDependencyAllowed>true</snapshotDependencyAllowed>
|
<snapshotDependencyAllowed>true</snapshotDependencyAllowed>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user