Skip to content

Commit

Permalink
🤖 CI: Use Java 11 for maven formatter
Browse files Browse the repository at this point in the history
The maven format plugin evidently requires Java 11:

> Caused by: java.lang.UnsupportedClassVersionError: net/revelc/code/formatter/ValidateMojo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
  • Loading branch information
michaelborn committed Feb 1, 2024
1 parent f226974 commit 576cbfc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'

- name: Validate Java format
run: mvn --batch-mode -f pom.xml formatter:validate
- run: mvn --batch-mode -f pom.xml formatter:format

- name: Commit Java Formatting Changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand All @@ -29,7 +28,7 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- uses: Ortus-Solutions/[email protected]
with:
cmd: run-script format
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'

- name: Validate Java format
Expand Down

0 comments on commit 576cbfc

Please sign in to comment.