From d0ec3a3daf7b6b273e4f071a2d22c595cfd04bbd Mon Sep 17 00:00:00 2001 From: Marja van Aken Date: Fri, 12 Apr 2024 11:34:00 +0200 Subject: [PATCH 1/6] #424: Update release version from java 11 to java 17. Change the build matrix options from 11 and 17 to 17 and 21. --- .appveyor.yml | 4 ++-- .github/workflows/build.yml | 14 +++++++------- pom.xml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 4c6ed45d..7d98a5f1 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,8 +9,8 @@ environment: APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -mx0 -mmt=0 -snl -snh MAVEN_OPTS: "-Dmaven.repo.local=C:/Users/appveyor/.m2" matrix: - - JAVA_HOME: "C:/Program Files/Java/jdk11" - - JAVA_HOME: "C:/Program Files/Java/jdk12" + - JAVA_HOME: "C:/Program Files/Java/jdk17" + - JAVA_HOME: "C:/Program Files/Java/jdk21" cache: - C:\Users\appveyor\.m2 -> pom.xml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42a9293f..9e4ee58d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: distribution: [ temurin, corretto ] - java-version: [ 11, 17 ] + java-version: [ 17, 21 ] steps: - name: Checkout @@ -36,25 +36,25 @@ jobs: java-version: ${{ matrix.java-version }} distribution: ${{ matrix.distribution }} - - name: Build and deploy with Maven and analyze with Sonar - # Deploy and analyze only the Corretto 11 build + - name: Build with Maven and analyze with Sonar + # Analyze only the Corretto 17 build with Sonar if: matrix.distribution == 'corretto' && matrix.java-version == '17' env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # The value of sonar.projectKey is generated by Sonar and needs to map to its internal project name run: mvn -B --update-snapshots -Dmaven.test.failure.ignore=true package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=parsingdata_metal -Dsonar.organization=parsingdata - - name: Build and deploy with Maven + - name: Deploy with Maven env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: matrix.distribution == 'corretto' && matrix.java-version == '11' + if: matrix.distribution == 'corretto' && matrix.java-version == '17' run: mvn -B --update-snapshots -Dmaven.test.failure.ignore=true deploy - name: Build with Maven - if: matrix.distribution != 'corretto' + if: matrix.distribution != 'corretto' || matrix.java-version != '17' run: mvn -B --update-snapshots -Dmaven.test.failure.ignore=true package - name: Upload Code Coverage to Codecov # Upload test coverage results only from the Corretto 11 build - if: matrix.distribution == 'corretto' && matrix.java-version == '11' + if: matrix.distribution == 'corretto' && matrix.java-version == '17' uses: codecov/codecov-action@v4 diff --git a/pom.xml b/pom.xml index cddaa22d..ff73222f 100644 --- a/pom.xml +++ b/pom.xml @@ -129,7 +129,7 @@ maven-compiler-plugin 3.12.1 - 11 + 17 From 5385484c2f7ef7d109e0ec38795f2db1091f5018 Mon Sep 17 00:00:00 2001 From: Marja van Aken Date: Fri, 12 Apr 2024 11:45:14 +0200 Subject: [PATCH 2/6] #424: Getting error running appveyor that JAVA_HOME variable is not set correctly. Maybe that was caused by incorrect indentation? --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 7d98a5f1..4d40de5c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,8 +9,8 @@ environment: APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -mx0 -mmt=0 -snl -snh MAVEN_OPTS: "-Dmaven.repo.local=C:/Users/appveyor/.m2" matrix: - - JAVA_HOME: "C:/Program Files/Java/jdk17" - - JAVA_HOME: "C:/Program Files/Java/jdk21" + - JAVA_HOME: "C:/Program Files/Java/jdk17" + - JAVA_HOME: "C:/Program Files/Java/jdk21" cache: - C:\Users\appveyor\.m2 -> pom.xml From 8b172c61da0744a87948fb3557f94a38d58ab9eb Mon Sep 17 00:00:00 2001 From: Marja van Aken Date: Fri, 12 Apr 2024 11:50:51 +0200 Subject: [PATCH 3/6] #424: Still the same error. Maybe it's the slash direction? --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 4d40de5c..051f530b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,8 +9,8 @@ environment: APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -mx0 -mmt=0 -snl -snh MAVEN_OPTS: "-Dmaven.repo.local=C:/Users/appveyor/.m2" matrix: - - JAVA_HOME: "C:/Program Files/Java/jdk17" - - JAVA_HOME: "C:/Program Files/Java/jdk21" + - JAVA_HOME: "C:\Program Files\Java\jdk17" + - JAVA_HOME: "C:\Program Files\Java\jdk21" cache: - C:\Users\appveyor\.m2 -> pom.xml From bf3274c1ca0beb091961307426cd71078a350fac Mon Sep 17 00:00:00 2001 From: Marja van Aken Date: Fri, 12 Apr 2024 11:56:50 +0200 Subject: [PATCH 4/6] #424: The backslash should be escaped. --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 051f530b..1554e76f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,8 +9,8 @@ environment: APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -mx0 -mmt=0 -snl -snh MAVEN_OPTS: "-Dmaven.repo.local=C:/Users/appveyor/.m2" matrix: - - JAVA_HOME: "C:\Program Files\Java\jdk17" - - JAVA_HOME: "C:\Program Files\Java\jdk21" + - JAVA_HOME: "C:\\Program Files\\Java\\jdk17" + - JAVA_HOME: "C:\\Program Files\\Java\\jdk21" cache: - C:\Users\appveyor\.m2 -> pom.xml From 27a172ef385f1c11fa9d75aaeb871e9ee5e607de Mon Sep 17 00:00:00 2001 From: Marja van Aken Date: Fri, 12 Apr 2024 12:03:46 +0200 Subject: [PATCH 5/6] #424: Specify image which can run jdk17 and 21. Based on the info here: https://www.appveyor.com/docs/windows-images-software/ --- .appveyor.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 1554e76f..c020ac52 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,6 +5,10 @@ shallow_clone: true init: - git config --global core.autocrlf input +# We need at least this image to run jdk17 and jdk21 (https://www.appveyor.com/docs/windows-images-software/). +image: + - Visual Studio 2019 + environment: APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -mx0 -mmt=0 -snl -snh MAVEN_OPTS: "-Dmaven.repo.local=C:/Users/appveyor/.m2" From 61b1bebf2bb4d596a34213d21218fd5082958877 Mon Sep 17 00:00:00 2001 From: Marja van Aken Date: Fri, 12 Apr 2024 12:09:40 +0200 Subject: [PATCH 6/6] #424: That worked, but maybe it is better to use the latest image. Also reverted the slash changes. --- .appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index c020ac52..e68227af 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,14 +7,14 @@ init: # We need at least this image to run jdk17 and jdk21 (https://www.appveyor.com/docs/windows-images-software/). image: - - Visual Studio 2019 + - Visual Studio 2022 environment: APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -mx0 -mmt=0 -snl -snh MAVEN_OPTS: "-Dmaven.repo.local=C:/Users/appveyor/.m2" matrix: - - JAVA_HOME: "C:\\Program Files\\Java\\jdk17" - - JAVA_HOME: "C:\\Program Files\\Java\\jdk21" + - JAVA_HOME: "C:/Program Files/Java/jdk17" + - JAVA_HOME: "C:/Program Files/Java/jdk21" cache: - C:\Users\appveyor\.m2 -> pom.xml