Skip to content

#1976: extend tool commandlet installation logic - #2144

Merged
hohwille merged 15 commits into
devonfw:mainfrom
Caylipp:feature/1976-extend-toolcomandlet-installation-logic
Aug 3, 2026
Merged

#1976: extend tool commandlet installation logic#2144
hohwille merged 15 commits into
devonfw:mainfrom
Caylipp:feature/1976-extend-toolcomandlet-installation-logic

Conversation

@Caylipp

@Caylipp Caylipp commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #1976

Implemented changes:

  • Added ignoreProject support to ToolInstallRequest
  • Added CLI option --ignore-project to InstallCommandlet
  • Updated dependency installation to skip project symlinks when ignoring project or outside project context
  • Updated GUI launcher dependencies to install in the software repository
  • Added tests for ignore project flag and inheritance

Testing instructions

  1. Run ide install java --ignore-project inside an IDEasy project and verify Java is installed in the
    software repository without creating a symlink under software/java.
  2. Run ide install java --ignore-project outside any project and verify the tool is installed in the
    software repository.
  3. Run added tests.

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"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Jul 9, 2026
@Caylipp Caylipp self-assigned this Jul 9, 2026
@Caylipp Caylipp moved this from 🆕 New to Team Review in IDEasy board Jul 9, 2026
@Caylipp Caylipp added enhancement New feature or request java related to java commandlet (JVM, OpenJDK, Azul) commandlet ide sub-command install installation process of IDE + tools and install commandlet labels Jul 9, 2026
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/InstallCommandlet.java Outdated
Comment thread cli/src/main/resources/nls/Help_de.properties Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/InstallCommandlet.java Outdated
@quando632

quando632 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Nice work on this 👍 The ignoreProject flag is threaded cleanly through ToolInstallRequest the standalone-vs-project branching in installAsDependency reads clearly, and I like that the skip path is covered by explicit tests for both the in-project and outside-project cases. Left a few inline comments the main one is about how the CLI flag is declared. 🙂

@coveralls

coveralls commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 30836475917

Coverage increased (+0.01%) to 72.628%

Details

  • Coverage increased (+0.01%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 92 coverage regressions across 5 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

92 previously-covered lines in 5 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/LocalToolCommandlet.java 38 80.24%
com/devonfw/tools/ide/tool/ToolCommandlet.java 27 73.99%
com/devonfw/tools/ide/tool/ToolInstallRequest.java 18 71.88%
com/devonfw/tools/ide/tool/gui/Gui.java 8 19.23%
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 1 78.69%

Coverage Stats

Coverage Status
Relevant Lines: 17252
Covered Lines: 13068
Line Coverage: 75.75%
Relevant Branches: 7649
Covered Branches: 5017
Branch Coverage: 65.59%
Branches in Coverage %: Yes
Coverage Strength: 3.22 hits per line

💛 - Coveralls

@quando632 quando632 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(superseded - see the inline comments.)

Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/InstallCommandlet.java Outdated

@quando632 quando632 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(superseded - see the inline comments.)

Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/InstallCommandlet.java Outdated
Comment thread cli/src/test/java/com/devonfw/tools/ide/commandlet/InstallCommandletTest.java Outdated

@quando632 quando632 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

After my earlier comments I went through every project-dependent input in the install path instead of reporting findings one at a time. The pattern is structural, so I think it is worth looking at as a whole rather than as separate bugs

@Caylipp
Caylipp force-pushed the feature/1976-extend-toolcomandlet-installation-logic branch from ef6bdfb to c156c92 Compare July 15, 2026 14:52
@Caylipp
Caylipp requested a review from quando632 July 15, 2026 14:55
@quando632

quando632 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Thanks for the fast turnaround 🙌 All five points are addressed the isIdeHomeRequired split, the completeRequestRequested version fix, the guarded setVersion, the rewritten test, and the CliException for isIgnoreSoftwareRepo tools. I checked out the current head and the affected suite is green (18 tests, BUILD SUCCESS).

One small open question, no blocker: should --ignore-project also ignore the configured edition (getConfiguredEdition() is still used unconditionally), or is version-only intended? Happy either way just let me know and I'll approve.

@Caylipp

Caylipp commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for checking. Version-only is intended for this issue, so the configured edition should remain unchanged.

@Caylipp Caylipp moved this from Team Review to 👀 In review in IDEasy board Jul 24, 2026
@Caylipp Caylipp moved this from 👀 In review to Team Review in IDEasy board Jul 29, 2026
@Caylipp Caylipp moved this from Team Review to 👀 In review in IDEasy board Jul 30, 2026

@hohwille hohwille left a comment

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.

@Caylipp thanks for your PR. Nice solution and good job 👍
I was actually looking for the place where tool dependencies get processed and wanted to check that you did not forget to set the flag from the parent request but you nicely solved that already in the ToolInstallRequest constructor what is more elegant so it is automatically inherited but could still be changed after construction in an edge-case. Very nice!

I did not expect that we expose this feature via the CLI to end-users. Have a look at my comments and lets see if we should revet this making this PR quite smaller or if we see value in it and should keep it.

BTW: While reviewing the Gui commandlet again via this PR, I was wondering, why we have to trigger installation of both java and mvn explicitly there even though mvn has a dependency to java. If I am not mistaken, we could now remove that (the redundant java installation) and before that was only a workaround because this story was not implemented.
Feel free to consult @laim2003 - in case we still need this redundant dependent java installation explicitly, it would be worth adding a comment why we need it.

Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/InstallCommandlet.java Outdated
Comment thread CHANGELOG.adoc Outdated
@Caylipp
Caylipp force-pushed the feature/1976-extend-toolcomandlet-installation-logic branch from d7e3443 to 57128bd Compare July 31, 2026 14:19
Caylipp and others added 14 commits August 3, 2026 10:31
-add ToolInstallRequest ignoreProject support
-skip project symlinks when ignoring project
-update dependency installation to ignore project version
-add CLI --ignore-project flag - update GUI launcher dependencies
-add tests for ignore project flag
- Handle unset ignoreproject flag safely
- Skip configured project version when project is ignored
- Register ignore-project as CLI flag
- Align English and German help entries
- Ignore configured version for standalone installs
- Add CLI parser and installation tests
…andlet.java

Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
…andletTest.java

Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
…andlet.java

Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
@Caylipp
Caylipp force-pushed the feature/1976-extend-toolcomandlet-installation-logic branch from fdbb346 to 75b162c Compare August 3, 2026 11:03
@hohwille hohwille added this to the release:2026.08.001 milestone Aug 3, 2026
@hohwille
hohwille merged commit cd9770b into devonfw:main Aug 3, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in IDEasy board Aug 3, 2026
@hohwille hohwille changed the title #1976: extend tool commandlet installation logic #1976: extend tool commandlet installation logic Aug 3, 2026
QuangAnhLe pushed a commit to QuangAnhLe/IDEasy that referenced this pull request Aug 4, 2026
Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
@hohwille hohwille added the QA approved Label a PR that has been re-testet via nightly SNAPSHOT after merge and commented. label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commandlet ide sub-command enhancement New feature or request install installation process of IDE + tools and install commandlet java related to java commandlet (JVM, OpenJDK, Azul) QA approved Label a PR that has been re-testet via nightly SNAPSHOT after merge and commented.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Extend ToolCommandlet installation logic to allow software-repository-only installation requests.

5 participants