From 6d4c6f304dd597a7faf60ed2fa3fa8e485c3d1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gst=C3=B6hl?= Date: Fri, 2 Dec 2022 06:19:51 +0000 Subject: [PATCH 1/5] java 17 and spring boot 2.7 --- swisscovid-cn-sdk-backend/pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swisscovid-cn-sdk-backend/pom.xml b/swisscovid-cn-sdk-backend/pom.xml index de590a7..ecf13d3 100644 --- a/swisscovid-cn-sdk-backend/pom.xml +++ b/swisscovid-cn-sdk-backend/pom.xml @@ -21,15 +21,15 @@ SwissCovid CN SDK Backend - 11 + 17 UTF-8 UTF-8 - 2.11.1 + 2.14.1 0.11.2 - 3.12.1 - 2.5.4 + 3.21.9 + 2.7.6 1.16.0 4.24.0 From 8a85a5a017519e6cfd1eb2a1b838ab7aae53b53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gst=C3=B6hl?= Date: Fri, 2 Dec 2022 06:57:13 +0000 Subject: [PATCH 2/5] update workflows for java 17 --- .github/workflows/build.yml | 7 ++++--- .github/workflows/tagged_release.yml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 809799a..6da050a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,10 +12,11 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 + distribution: 'zulu' - name: Cache SonarCloud packages uses: actions/cache@v1 with: diff --git a/.github/workflows/tagged_release.yml b/.github/workflows/tagged_release.yml index 29adad8..ef16d9b 100644 --- a/.github/workflows/tagged_release.yml +++ b/.github/workflows/tagged_release.yml @@ -13,10 +13,11 @@ jobs: - uses: actions/checkout@v2 - run: | git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 + distribution: 'zulu' - name: Build with Maven run: | mvn install --file swisscovid-cn-sdk-backend/pom.xml; From 951cd9285ccf2ff2b66c6fdc7fabcd68cc39d63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gst=C3=B6hl?= Date: Fri, 2 Dec 2022 07:37:27 +0000 Subject: [PATCH 3/5] make sure all object mappers support java time --- .../swisscovid/cn/sdk/backend/ws/config/WSBaseConfig.java | 2 +- .../ubique/swisscovid/cn/sdk/backend/ws/util/KeyHelper.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/swisscovid-cn-sdk-backend/swisscovid-cn-sdk-backend-ws/src/main/java/ch/ubique/swisscovid/cn/sdk/backend/ws/config/WSBaseConfig.java b/swisscovid-cn-sdk-backend/swisscovid-cn-sdk-backend-ws/src/main/java/ch/ubique/swisscovid/cn/sdk/backend/ws/config/WSBaseConfig.java index 430f138..c46ff6c 100644 --- a/swisscovid-cn-sdk-backend/swisscovid-cn-sdk-backend-ws/src/main/java/ch/ubique/swisscovid/cn/sdk/backend/ws/config/WSBaseConfig.java +++ b/swisscovid-cn-sdk-backend/swisscovid-cn-sdk-backend-ws/src/main/java/ch/ubique/swisscovid/cn/sdk/backend/ws/config/WSBaseConfig.java @@ -191,7 +191,7 @@ public MappingJackson2HttpMessageConverter converter() { new ObjectMapper() .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false) .setSerializationInclusion(JsonInclude.Include.NON_ABSENT) - .registerModules(new ProtobufModule(), new Jdk8Module()); + .registerModules(new ProtobufModule(), new Jdk8Module(), new JavaTimeModule()); return new MappingJackson2HttpMessageConverter(mapper); } diff --git a/swisscovid-cn-sdk-backend/swisscovid-cn-sdk-backend-ws/src/main/java/ch/ubique/swisscovid/cn/sdk/backend/ws/util/KeyHelper.java b/swisscovid-cn-sdk-backend/swisscovid-cn-sdk-backend-ws/src/main/java/ch/ubique/swisscovid/cn/sdk/backend/ws/util/KeyHelper.java index 7c2e0ae..eae0784 100644 --- a/swisscovid-cn-sdk-backend/swisscovid-cn-sdk-backend-ws/src/main/java/ch/ubique/swisscovid/cn/sdk/backend/ws/util/KeyHelper.java +++ b/swisscovid-cn-sdk-backend/swisscovid-cn-sdk-backend-ws/src/main/java/ch/ubique/swisscovid/cn/sdk/backend/ws/util/KeyHelper.java @@ -12,12 +12,14 @@ import ch.ubique.swisscovid.cn.sdk.backend.model.keycloak.KeyCloakPublicKey; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; + import java.io.IOException; import java.net.URL; public class KeyHelper { - private static ObjectMapper objectMapper = new ObjectMapper(); + private static ObjectMapper objectMapper = new ObjectMapper().registerModule(new JavaTimeModule()); private KeyHelper() {} From 515035f97f9e5cab5c52add5219654475e9f048e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gst=C3=B6hl?= Date: Fri, 2 Dec 2022 07:53:35 +0000 Subject: [PATCH 4/5] set jacoco version --- swisscovid-cn-sdk-backend/pom.xml | 1 + .../swisscovid-cn-sdk-backend-report/pom.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/swisscovid-cn-sdk-backend/pom.xml b/swisscovid-cn-sdk-backend/pom.xml index ecf13d3..569d209 100644 --- a/swisscovid-cn-sdk-backend/pom.xml +++ b/swisscovid-cn-sdk-backend/pom.xml @@ -422,6 +422,7 @@ org.jacoco jacoco-maven-plugin + 0.8.8 diff --git a/swisscovid-cn-sdk-backend/swisscovid-cn-sdk-backend-report/pom.xml b/swisscovid-cn-sdk-backend/swisscovid-cn-sdk-backend-report/pom.xml index b8a0c2e..f181375 100644 --- a/swisscovid-cn-sdk-backend/swisscovid-cn-sdk-backend-report/pom.xml +++ b/swisscovid-cn-sdk-backend/swisscovid-cn-sdk-backend-report/pom.xml @@ -54,6 +54,7 @@ org.jacoco jacoco-maven-plugin + 0.8.8 report-aggregate From 7925743cfd7c72b3dd6dd8be7b2e5f8fae6e0444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gst=C3=B6hl?= Date: Fri, 2 Dec 2022 08:09:21 +0000 Subject: [PATCH 5/5] update git commit id plugin --- swisscovid-cn-sdk-backend/pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/swisscovid-cn-sdk-backend/pom.xml b/swisscovid-cn-sdk-backend/pom.xml index 569d209..fd6a496 100644 --- a/swisscovid-cn-sdk-backend/pom.xml +++ b/swisscovid-cn-sdk-backend/pom.xml @@ -344,8 +344,9 @@ - pl.project13.maven - git-commit-id-plugin + io.github.git-commit-id + git-commit-id-maven-plugin + 5.0.0 retrieve-git-info