Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);

mvn.install(mavenToolInstallRequest);
java.install(javaToolInstallRequest);
Comment on lines +61 to +62
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I wrote in the chat install is wrong since it does the complete installation into the project.
What we really want here is just installTool(...Request).
Maybe the javaToolInstallRequest should have the mavenToolInstallRequest as parent since this is a dependency or maybe thinking even further, we do not need that at all if the dependencies.json will bring that automatically (but I am not sure if we bypass install and just call installTool).


LOG.debug("Starting GUI via commandlet");

Expand Down
Loading