Skip to content

#1964: fixed maven using wrong process context#1967

Draft
laim2003 wants to merge 2 commits into
devonfw:mainfrom
laim2003:fix/#1964-Gui-does-not-start-when-project-has-old-Java-version
Draft

#1964: fixed maven using wrong process context#1967
laim2003 wants to merge 2 commits into
devonfw:mainfrom
laim2003:fix/#1964-Gui-does-not-start-when-project-has-old-Java-version

Conversation

@laim2003
Copy link
Copy Markdown
Contributor

This PR fixes #1964

Implemented changes:

  • Changed Maven installation logic to use a project context shared with the java tool. This ensures, that our specified java version for the GUI is used, not the general project java version.

Testing instructions

  1. icd -P test (or ide create test)
  2. ide install java 8*
  3. ide gui

This should now launch the gui without any issues, and maven should use java 25 when initializing.


Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented May 22, 2026

Coverage Report for CI Build 26280591750

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage decreased (-0.05%) to 71.016%

Details

  • Coverage decreased (-0.05%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 12 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

12 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/gui/Gui.java 10 19.23%
com/devonfw/tools/ide/version/VersionSegment.java 2 88.19%

Coverage Stats

Coverage Status
Relevant Lines: 15532
Covered Lines: 11505
Line Coverage: 74.07%
Relevant Branches: 6946
Covered Branches: 4458
Branch Coverage: 64.18%
Branches in Coverage %: Yes
Coverage Strength: 3.13 hits per line

💛 - Coveralls

Comment on lines +61 to +62
mvn.install(mavenToolInstallRequest);
java.install(javaToolInstallRequest);
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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

Gui does not start when project has old Java version

3 participants