Skip to content

Commit

Permalink
#424: Update release version from java 11 to java 17.
Browse files Browse the repository at this point in the history
Change the build matrix options from 11 and 17 to 17 and 21.
  • Loading branch information
mvanaken committed Apr 12, 2024
1 parent f19ff79 commit d0ec3a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
distribution: [ temurin, corretto ]
java-version: [ 11, 17 ]
java-version: [ 17, 21 ]

steps:
- name: Checkout
Expand All @@ -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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<release>11</release>
<release>17</release>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit d0ec3a3

Please sign in to comment.