Skip to content

custom-tools not working #915

@hohwille

Description

@hohwille

Expected behavior

As a IDEasy user, I want to be able to define custom tools that are installed automatically so that I can roll our custom software to my team.

Actual behavior

This feature was claimed to be implemented but never tested and it is fundamentally broken.

  1. ide create «projectname» «settings-url» is not setting up any custom tool at all
  2. ide update later tries to do it but fails:
Start: Install java1.8
Installation of java1.8 failed!
com.devonfw.tools.ide.cli.CliException: Version 8u292b10 for tool java1.8 does not exist in edition java1.8.
        at com.devonfw.tools.ide.url.model.UrlMetadata.getVersionFolder(UrlMetadata.java:137)
        at com.devonfw.tools.ide.repo.DefaultToolRepository.resolveVersion(DefaultToolRepository.java:43)
        at com.devonfw.tools.ide.tool.LocalToolCommandlet.installTool(LocalToolCommandlet.java:198)
        at com.devonfw.tools.ide.tool.LocalToolCommandlet.installTool(LocalToolCommandlet.java:181)
        at com.devonfw.tools.ide.tool.LocalToolCommandlet.installTool(LocalToolCommandlet.java:166)
        at com.devonfw.tools.ide.tool.LocalToolCommandlet.install(LocalToolCommandlet.java:79)
        at com.devonfw.tools.ide.tool.ToolCommandlet.install(ToolCommandlet.java:223)
        at com.devonfw.tools.ide.commandlet.AbstractUpdateCommandlet.updateSoftware(AbstractUpdateCommandlet.java:175)
        at com.devonfw.tools.ide.commandlet.AbstractUpdateCommandlet.run(AbstractUpdateCommandlet.java:55)
        at com.devonfw.tools.ide.commandlet.UpdateCommandlet.run(UpdateCommandlet.java:29)

Please note that here java1.8 was defined as a custom tool. We could solve this in other ways with IDEasy to have an additional java version installed but this is not what this issue is about. The problem is that custom tool installation is generally broken and seems to never have worked.

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. fork ide-settings
  2. add ide-custom-tools.json file and push changes to your fork
  3. create a project from that fork (ide create test-project «myforked-settings-url»)
  4. observe that nothing happened regarding custom tools at all (see 1. in actual behaviour)
  5. run ide update inside test-project
  6. observe the error above (see 2.)

Related/Dependent Issues

Comments/Hints:

This is the implementation that looks reasonable:

for (CustomTool customTool : this.context.getCustomToolRepository().getTools()) {
CustomToolCommandlet customToolCommandlet = new CustomToolCommandlet(this.context, customTool);
toolCommandlets.add(customToolCommandlet);
}
// update/install the toolCommandlets
for (ToolCommandlet toolCommandlet : toolCommandlets) {
try {
toolCommandlet.install(false);
} catch (Exception e) {
step.error(e, "Installation of {} failed!", toolCommandlet.getName());
}

Why does it not work?

Affected version:

  • 2024.12.002-beta

Metadata

Metadata

Assignees

Labels

blockerbug issue that blocks end-users from using IDEasycustomide-custom-tools.json and related featuresinstallinstallation process of IDE + tools and install commandlet

Type

Projects

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions