From 9ccfc6c19cf817b30c554068c4dcd507fa09c4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patxi=20Gort=C3=A1zar?= Date: Thu, 29 Oct 2026 13:08:30 +0100 Subject: [PATCH] Move the second devcontainer to Java 25 aplicacion-java-enunciado still asked for Java 17 while every pom in the repository declares 25 and CI sets up a JDK 25. The container built fine, which is why nothing caught it: it just handed you a JDK that cannot compile the project it was made for. The image family here was already the current one, so this is only the tag: 3-25-bookworm, the same as the sibling in ejemplo-1. There is no 0-25 to move to; the 0- series stops at 17. Two option values were strings where the feature declares booleans: "installMaven": "true" -> true "installGradle": "false" -> removed installGradle was the riskier of the two. The option is a boolean with a default of false, and a non-empty string is the kind of value that reads as true depending on who parses it, so asking for no Gradle in quotes is a worse way of saying nothing at all. Dropping it says the same thing and cannot be misread. installMaven stays: the project has no mvnw and no .mvn directory, so without Maven in the container there is no way to build it. The other two problems the sibling had are absent here: no top-level settings or extensions keys, and no java.home pointing at the /docker-java-home path that the current images do not have. These are the only two devcontainers in the repository, and both are now on the same image and the same feature configuration. Not verified: nothing in CI builds a devcontainer, and I did not open this one. The tag was checked against the MCR tag list and the option names and types against the feature definition. Co-Authored-By: Claude Opus 5 --- .../.devcontainer/devcontainer.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/parte_4/tema_4.2/aplicacion-java-enunciado/.devcontainer/devcontainer.json b/parte_4/tema_4.2/aplicacion-java-enunciado/.devcontainer/devcontainer.json index 6cdc7d7..25693c6 100644 --- a/parte_4/tema_4.2/aplicacion-java-enunciado/.devcontainer/devcontainer.json +++ b/parte_4/tema_4.2/aplicacion-java-enunciado/.devcontainer/devcontainer.json @@ -3,13 +3,14 @@ { "name": "Java", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/java:0-17", + "image": "mcr.microsoft.com/devcontainers/java:3-25-bookworm", + // La imagen ya trae el JDK, asi que el feature solo aporta Maven. "features": { "ghcr.io/devcontainers/features/java:1": { "version": "none", - "installMaven": "true", - "installGradle": "false" + "installMaven": true, + "mavenVersion": "latest" } }