From ec7451f2003e6dd33cd24a68c7fe7b73cb94386b Mon Sep 17 00:00:00 2001 From: laim2003 Date: Fri, 22 May 2026 11:02:57 +0200 Subject: [PATCH 1/2] #1964: fixed maven using wrong process context --- .../com/devonfw/tools/ide/tool/gui/Gui.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java b/cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java index 4c1bd0a7d..1c65beab5 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java +++ b/cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java @@ -46,16 +46,20 @@ protected void doRun() { ProcessContext processContext = new ProcessContextImpl(this.context); - ToolInstallRequest toolInstallRequest = new ToolInstallRequest(false); - toolInstallRequest.setProcessContext(processContext); - toolInstallRequest.setRequested( + Java java = this.context.getCommandletManager().getCommandlet(Java.class); + Mvn mvn = this.context.getCommandletManager().getCommandlet(Mvn.class); + + ToolInstallRequest javaToolInstallRequest = new ToolInstallRequest(false); + javaToolInstallRequest.setProcessContext(processContext); + javaToolInstallRequest.setRequested( new ToolEditionAndVersion(VersionIdentifier.of("25.*")) ); - Java java = this.context.getCommandletManager().getCommandlet(Java.class); - Mvn mvn = this.context.getCommandletManager().getCommandlet(Mvn.class); - java.install(toolInstallRequest); - mvn.install(false); + ToolInstallRequest mavenToolInstallRequest = new ToolInstallRequest(false); + mavenToolInstallRequest.setProcessContext(processContext); + + java.install(javaToolInstallRequest); + mvn.install(mavenToolInstallRequest); LOG.debug("Starting GUI via commandlet"); From 587b612897bc1febf2dd28be77991521ebec830a Mon Sep 17 00:00:00 2001 From: laim2003 Date: Fri, 22 May 2026 11:44:28 +0200 Subject: [PATCH 2/2] #1964: we install maven first and then update the java version. --- cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java b/cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java index 1c65beab5..6ec06a425 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java +++ b/cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java @@ -58,8 +58,8 @@ protected void doRun() { ToolInstallRequest mavenToolInstallRequest = new ToolInstallRequest(false); mavenToolInstallRequest.setProcessContext(processContext); - java.install(javaToolInstallRequest); mvn.install(mavenToolInstallRequest); + java.install(javaToolInstallRequest); LOG.debug("Starting GUI via commandlet");