From 20e105bd0695c39dfff46c4ede5ddc165cf60834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Sj=C3=B6berg?= Date: Tue, 30 Jul 2024 14:02:17 +0200 Subject: [PATCH] build: Update to Java 21 --- .github/workflows/commit.yml | 4 ++-- .java-version | 2 +- Dockerfile | 8 +++++--- README.md | 2 +- pom.xml | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index ac2ce4c..c9346aa 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: 17 + java-version-file: .java-version - name: Run tests uses: extenda/actions/maven@v0 @@ -43,7 +43,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: 17 + java-version-file: .java-version - name: Build uses: extenda/actions/maven@v0 diff --git a/.java-version b/.java-version index 98d9bcb..aabe6ec 100644 --- a/.java-version +++ b/.java-version @@ -1 +1 @@ -17 +21 diff --git a/Dockerfile b/Dockerfile index b3f9c2d..3fff740 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ -FROM eclipse-temurin:17-centos7 +FROM eclipse-temurin:21 -RUN yum -y install graphviz +RUN apt update \ + && apt -y install graphviz \ + && apt clean COPY target/lib /app/lib COPY target/*.jar /app @@ -9,4 +11,4 @@ EXPOSE 3000 WORKDIR /docs -ENTRYPOINT ["/opt/java/openjdk/bin/java", "-jar", "/app/structurizr-to-png.jar"] +CMD ["java", "-jar", "/app/structurizr-to-png.jar"] diff --git a/README.md b/README.md index 09fb8a1..6266df6 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ The following view properties are supported with the `structurizr` renderer. # Development - * The project is built with Java 17 and Maven. + * The project is built with Java 21 and Maven. * `mvn verify` to build and run all tests * `java -jar target/structurizr-to-png.jar` runs the client on your local machine * Running locally requires Graphviz diff --git a/pom.xml b/pom.xml index 60d1a98..9aba864 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ UTF-8 - 17 + 21 ${java.version} ${java.version} ${java.version}