• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

devonfw / IDEasy / 26280591750

22 May 2026 09:44AM UTC coverage: 71.016% (-0.05%) from 71.062%
26280591750

Pull #1967

github

web-flow
Merge 587b61289 into 58ae6752b
Pull Request #1967: #1964: fixed maven using wrong process context

4458 of 6946 branches covered (64.18%)

Branch coverage included in aggregate %.

11505 of 15532 relevant lines covered (74.07%)

3.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

19.23
cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java
1
package com.devonfw.tools.ide.tool.gui;
2

3
import java.nio.file.Files;
4
import java.nio.file.Path;
5
import java.util.List;
6

7
import org.slf4j.Logger;
8
import org.slf4j.LoggerFactory;
9

10
import com.devonfw.tools.ide.cli.CliException;
11
import com.devonfw.tools.ide.commandlet.Commandlet;
12
import com.devonfw.tools.ide.context.IdeContext;
13
import com.devonfw.tools.ide.process.ProcessContext;
14
import com.devonfw.tools.ide.process.ProcessContextImpl;
15
import com.devonfw.tools.ide.process.ProcessMode;
16
import com.devonfw.tools.ide.tool.ToolEditionAndVersion;
17
import com.devonfw.tools.ide.tool.ToolInstallRequest;
18
import com.devonfw.tools.ide.tool.java.Java;
19
import com.devonfw.tools.ide.tool.mvn.Mvn;
20
import com.devonfw.tools.ide.version.VersionIdentifier;
21

22
/**
23
 * {@link Commandlet} to launch the IDEasy GUI.
24
 */
25
public class Gui extends Commandlet {
26

27
  private static final Logger LOG = LoggerFactory.getLogger(Gui.class);
4✔
28

29
  /**
30
   * @param context the {@link IdeContext}.
31
   */
32
  public Gui(IdeContext context) {
33

34
    super(context);
3✔
35
    addKeyword(getName());
4✔
36
  }
1✔
37

38
  @Override
39
  public String getName() {
40

41
    return "gui";
2✔
42
  }
43

44
  @Override
45
  protected void doRun() {
46

47
    ProcessContext processContext = new ProcessContextImpl(this.context);
×
48

49
    Java java = this.context.getCommandletManager().getCommandlet(Java.class);
×
50
    Mvn mvn = this.context.getCommandletManager().getCommandlet(Mvn.class);
×
51

52
    ToolInstallRequest javaToolInstallRequest = new ToolInstallRequest(false);
×
53
    javaToolInstallRequest.setProcessContext(processContext);
×
54
    javaToolInstallRequest.setRequested(
×
55
        new ToolEditionAndVersion(VersionIdentifier.of("25.*"))
×
56
    );
57

58
    ToolInstallRequest mavenToolInstallRequest = new ToolInstallRequest(false);
×
59
    mavenToolInstallRequest.setProcessContext(processContext);
×
60

61
    mvn.install(mavenToolInstallRequest);
×
62
    java.install(javaToolInstallRequest);
×
63

64
    LOG.debug("Starting GUI via commandlet");
×
65

66
    Path pomPath = context.getIdeInstallationPath().resolve("gui/pom.xml");
×
67
    if (!Files.exists(pomPath)) {
×
68
      throw new CliException("Fatal error: The pom.xml file required for launching the IDEasy GUI could not be found in expected location: " + pomPath);
×
69
    }
70

71
    List<String> args = List.of(
×
72
        "-f",
73
        pomPath.toString(),
×
74
        "exec:exec",
75
        "-Dexec.executable=java",
76
        "-Dexec.classpathScope=compile",
77
        "-Dexec.args=-classpath %classpath com.devonfw.ide.gui.AppLauncher"
78
    );
79

80
    mvn.runTool(processContext, ProcessMode.DEFAULT, args);
×
81
  }
×
82
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc