Skip to content

Commit

Permalink
Use JDK 22
Browse files Browse the repository at this point in the history
  • Loading branch information
miguno committed May 7, 2024
1 parent 8d7904a commit d0a6da0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ jobs:
- uses: actions/checkout@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 21
uses: actions/setup-java@v4 # https://github.com/actions/setup-java
- name: Set up JDK 22
# TODO: Switch back to actions/setup-java@v4 once they support JDK 22 for temurin
#uses: actions/setup-java@v4 # https://github.com/actions/setup-java
#with:
# java-version: '22'
# distribution: 'temurin'
# cache: maven
uses: oracle-actions/setup-java@v1 # https://github.com/oracle-actions/setup-java
with:
java-version: '21'
distribution: 'temurin'
cache: maven
website: jdk.java.net
release: 22
- name: Verify and Package with Maven
run: ./mvnw --batch-mode --file pom.xml verify package

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
###############################################################################
# Stage 1 (to create a "build" image) #
###############################################################################
FROM eclipse-temurin:21-jdk-alpine AS builder
FROM eclipse-temurin:22-jdk-alpine AS builder

# Smoke test to verify if java is available.
RUN java -version
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Features:
including a downsized JRE (built inside Docker via `jlink`)
to minimize the size of the generated Docker image, which is **131MB**.
- Supports [Docker BuildKit](https://docs.docker.com/build/)
- Java 21 (Eclipse Temurin)
- Java 22 (Eclipse Temurin)
- [JUnit 5](https://github.com/junit-team/junit5) for testing,
[Jacoco](https://github.com/jacoco/jacoco) for code coverage,
[SpotBugs](https://github.com/spotbugs/spotbugs) for static code analysis
Expand Down Expand Up @@ -130,7 +130,7 @@ $ just docker-image-create
# Notes

You can also build, test, package, and run the Java application locally
(without Docker) if you have JDK 21+ installed. You do not need to have Maven
(without Docker) if you have JDK 22+ installed. You do not need to have Maven
installed, because this repository contains the
[Maven Wrapper](https://github.com/apache/maven-wrapper) `mvnw` (use `mvnw.cmd`
on Windows).
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Java -->
<java.version>21</java.version>
<java.version>22</java.version>
<release.version>${java.version}</release.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.release>${java.version}</maven.compiler.release>
Expand Down

0 comments on commit d0a6da0

Please sign in to comment.