diff --git a/.classpath b/.classpath index 9ba41a249..5907fbd01 100644 --- a/.classpath +++ b/.classpath @@ -13,7 +13,7 @@ - + diff --git a/.devcontainer/devcontainer-lock.json b/.devcontainer/devcontainer-lock.json new file mode 100644 index 000000000..f37d280bb --- /dev/null +++ b/.devcontainer/devcontainer-lock.json @@ -0,0 +1,9 @@ +{ + "features": { + "ghcr.io/devcontainers/features/java:1": { + "version": "1.8.3", + "resolved": "ghcr.io/devcontainers/features/java@sha256:61a839211feda1e2a1f10646648a948e733e4d98d770f3a4b6698a3c5fc92abe", + "integrity": "sha256:61a839211feda1e2a1f10646648a948e733e4d98d770f3a4b6698a3c5fc92abe" + } + } +} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3bb98c72f..6b4698008 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,13 +3,13 @@ { "name": "Java", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/java:1-21", + "image": "mcr.microsoft.com/devcontainers/java:3-25-trixie", "features": { "ghcr.io/devcontainers/features/java:1": { "version": "none", "installMaven": "true", - "mavenVersion": "3.8.6", + "mavenVersion": "3.10.0", "installGradle": "false" } }, diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index bd8c9c71f..a64c98345 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -18,7 +18,7 @@ jobs: uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 with: distribution: 'temurin' - java-version: '17' + java-version: '25' check-latest: false cache: 'maven' - name: Build with Maven diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 46235dc07..a866c1242 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,9 +1,9 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=25 +org.eclipse.jdt.core.compiler.compliance=25 org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.processAnnotations=disabled -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=25 diff --git a/README.md b/README.md index cde586e9b..21ddc5166 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,12 @@ Follow these steps to open this sample in a container using the VS Code Dev Cont ## Things to try +### Toolchain + +This sample uses Java 25 on Debian 13 (Trixie), Maven 3.10.0, and JUnit Jupiter 6.1.3. +Run `mvn verify` to compile and test the project, then `java -cp target/classes com.mycompany.app.App` to run it. +The Maven compiler, editor settings, and CI all target Java 25. + Once you have this sample opened, you'll be able to work with it like you would locally. Some things to try: diff --git a/pom.xml b/pom.xml index 2f4f99120..0e00ae9e2 100644 --- a/pom.xml +++ b/pom.xml @@ -9,25 +9,28 @@ https://github.com/microsoft/vscode-remote-try-java - junit - junit - 4.13.2 + org.junit.jupiter + junit-jupiter + 6.1.3 test - 11 - 11 - 11 + 25 UTF-8 + + org.apache.maven.plugins + maven-compiler-plugin + 3.16.0 + org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M6 + 3.6.0 diff --git a/src/test/java/com/mycompany/app/AppTest.java b/src/test/java/com/mycompany/app/AppTest.java index 710415f09..f78734e9c 100644 --- a/src/test/java/com/mycompany/app/AppTest.java +++ b/src/test/java/com/mycompany/app/AppTest.java @@ -1,8 +1,8 @@ package com.mycompany.app; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; public class AppTest {