feat: Move to Java 23

Closes: gh-1990
This commit is contained in:
Nanne Baars 2024-12-21 14:16:33 +01:00 committed by GitHub
parent a95213757d
commit 0244655409
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 23 additions and 20 deletions

View File

@ -24,10 +24,10 @@ jobs:
- uses: actions/setup-java@v4 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '21' java-version: '23'
- name: Pre-commit checks - name: Pre-commit checks
uses: pre-commit/action@v3.0.1 uses: pre-commit/action@v3.0.1
- name: pre-commit-ci-lite - name: pre-commit-c-lite
uses: pre-commit-ci/lite-action@v1.1.0 uses: pre-commit-ci/lite-action@v1.1.0
if: always() if: always()
build: build:
@ -40,11 +40,11 @@ jobs:
max-parallel: 1 max-parallel: 1
steps: steps:
- uses: actions/checkout@v4.1.6 - uses: actions/checkout@v4.1.6
- name: Set up JDK 21 - name: Set up JDK 23
uses: actions/setup-java@v4.2.1 uses: actions/setup-java@v4.2.1
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 21 java-version: 23
architecture: x64 architecture: x64
cache: 'maven' cache: 'maven'
- name: Build with Maven - name: Build with Maven

View File

@ -15,11 +15,11 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up JDK 21 - name: Set up JDK 23
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 21 java-version: 23
architecture: x64 architecture: x64
cache: 'maven' cache: 'maven'
@ -116,11 +116,11 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up JDK 21 - name: Set up JDK 23
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 21 java-version: 23
architecture: x64 architecture: x64
- name: Set version to next snapshot - name: Set version to next snapshot

View File

@ -28,12 +28,12 @@ jobs:
with: with:
python-version: '3.7' python-version: '3.7'
architecture: x64 architecture: x64
# Uses an action to add JDK 21 to the VM (and mvn?) # Uses an action to add JDK 23 to the VM (and mvn?)
- name: set up JDK 21 - name: set up JDK 23
uses: actions/setup-java@v4.2.1 uses: actions/setup-java@v4.2.1
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 21 java-version: 23
architecture: x64 architecture: x64
cache: 'maven' cache: 'maven'
- uses: BSFishy/pip-action@v1 - uses: BSFishy/pip-action@v1

View File

@ -1,5 +1,5 @@
# We need JDK as some of the lessons needs to be able to compile Java code # We need JDK as some of the lessons needs to be able to compile Java code
FROM docker.io/eclipse-temurin:21-jdk-jammy FROM docker.io/eclipse-temurin:23-jdk-noble
LABEL name="WebGoat: A deliberately insecure Web Application" LABEL name="WebGoat: A deliberately insecure Web Application"
LABEL maintainer="WebGoat team" LABEL maintainer="WebGoat team"

View File

@ -33,14 +33,14 @@ RUN \
*) ARCH=unknown;; \ *) ARCH=unknown;; \
esac && \ esac && \
echo "oeps == ${ARCH}==" && \ echo "oeps == ${ARCH}==" && \
curl -L https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jre_"${ARCH}"_linux_hotspot_21.0.3_9.tar.gz -o java.tar.gz && \ curl -L https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23.0.1%2B11/OpenJDK23U-jre_"${ARCH}"_linux_hotspot_23.0.1_11.tar.gz -o java.tar.gz && \
tar zfxv java.tar.gz && \ tar zfxv java.tar.gz && \
rm -rf java.tar.gz && \ rm -rf java.tar.gz && \
chmod +x /config/start_webgoat.sh && \ chmod +x /config/start_webgoat.sh && \
chmod +x /config/start_zap.sh && \ chmod +x /config/start_zap.sh && \
echo "JAVA_HOME=/config/jdk-21.0.3+9-jre/" >> .bash_aliases && \ echo "JAVA_HOME=/config/jdk-23.0.1+11/" >> .bash_aliases && \
echo "PATH=$PATH:$JAVA_HOME/bin" >> .bash_aliases echo "PATH=$PATH:$JAVA_HOME/bin" >> .bash_aliases
ENV JAVA_HOME=/config/jdk-21.0.3+9-jre ENV JAVA_HOME=/config/jdk-23.0.1+11
WORKDIR /config/Desktop WORKDIR /config/Desktop

View File

@ -1,7 +1,7 @@
# WebGoat: A deliberately insecure Web Application # WebGoat: A deliberately insecure Web Application
[![Build](https://github.com/WebGoat/WebGoat/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/WebGoat/WebGoat/actions/workflows/build.yml) [![Build](https://github.com/WebGoat/WebGoat/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/WebGoat/WebGoat/actions/workflows/build.yml)
[![java-jdk](https://img.shields.io/badge/java%20jdk-21-green.svg)](https://jdk.java.net/) [![java-jdk](https://img.shields.io/badge/java%20jdk-23-green.svg)](https://jdk.java.net/)
[![OWASP Labs](https://img.shields.io/badge/OWASP-Lab%20project-f7b73c.svg)](https://owasp.org/projects/) [![OWASP Labs](https://img.shields.io/badge/OWASP-Lab%20project-f7b73c.svg)](https://owasp.org/projects/)
[![GitHub release](https://img.shields.io/github/release/WebGoat/WebGoat.svg)](https://github.com/WebGoat/WebGoat/releases/latest) [![GitHub release](https://img.shields.io/github/release/WebGoat/WebGoat.svg)](https://github.com/WebGoat/WebGoat/releases/latest)
[![Gitter](https://badges.gitter.im/OWASPWebGoat/community.svg)](https://gitter.im/OWASPWebGoat/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Gitter](https://badges.gitter.im/OWASPWebGoat/community.svg)](https://gitter.im/OWASPWebGoat/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

11
pom.xml
View File

@ -74,20 +74,22 @@
<commons-text.version>1.13.0</commons-text.version> <commons-text.version>1.13.0</commons-text.version>
<guava.version>33.3.1-jre</guava.version> <guava.version>33.3.1-jre</guava.version>
<jacoco.version>0.8.11</jacoco.version> <jacoco.version>0.8.11</jacoco.version>
<java.version>21</java.version> <java.version>23</java.version>
<jaxb.version>2.3.1</jaxb.version> <jaxb.version>2.3.1</jaxb.version>
<jjwt.version>0.9.1</jjwt.version> <jjwt.version>0.9.1</jjwt.version>
<jose4j.version>0.9.3</jose4j.version> <jose4j.version>0.9.3</jose4j.version>
<jquery.version>3.7.1</jquery.version> <jquery.version>3.7.1</jquery.version>
<jsoup.version>1.18.3</jsoup.version> <jsoup.version>1.18.3</jsoup.version>
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-failsafe-plugin.version>2.22.0</maven-failsafe-plugin.version> <maven-failsafe-plugin.version>2.22.0</maven-failsafe-plugin.version>
<maven-jar-plugin.version>3.1.2</maven-jar-plugin.version> <maven-jar-plugin.version>3.1.2</maven-jar-plugin.version>
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version> <maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.1.0</maven-source-plugin.version> <maven-source-plugin.version>3.1.0</maven-source-plugin.version>
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version> <maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
<maven.compiler.source>21</maven.compiler.source> <maven.compiler.proc>full</maven.compiler.proc>
<maven.compiler.target>21</maven.compiler.target> <maven.compiler.source>23</maven.compiler.source>
<maven.compiler.target>23</maven.compiler.target>
<pmd.version>3.15.0</pmd.version> <pmd.version>3.15.0</pmd.version>
<!-- Use UTF-8 Encoding --> <!-- Use UTF-8 Encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -229,6 +231,7 @@
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>1.18.36</version>
<scope>provided</scope> <scope>provided</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>