Skip to content

Refactor and improve tool-dependencies and tomcat #439

@hohwille

Description

@hohwille

From PR #250 we have to following review improvements left to do:

  • remove TomcatCommand and make Tomcat commandlet to simply delegate to catalina.sh passing any given arguments from ide tomcat «args»
  • extract UrlDependencyFile for URL-Model to support lazy loading and simpler access to dependency.json
  • create PR for ide-urls to add dependencies.json to tomcat/tomcat.
  • extract withEnvVar method from ProcessContext to own interface EnvironmentContext.
  • introduce new method to LocalToolCommandlet for setting environment variables public void setEnvironment(EnvironmentContext context, Path toolPath).
  • refactor installInRepo installTool method so we can pass VersionRage (instead of VersionIdentifier) for a dependency (from the DependencyInfo).
  • when trying to resolve the dependency version and install the tool, first check if the resolved version of the configured tool version of the tool matches the dependency version range. If that is the case then use the tool installation preferred by the project (software/«tool» via getToolPath()). Only if that version does not match then install an additional version in repo if not already available.
  • If you install the tool version in the repo, try to reuse the existing code from installInRepo methods.
  • In runTool we can then first create the process context, pass it as EnvironmentContext to the installation method (needs some refactoring) so that there is only one single place in the code getting the dependencies and looping over them that does all together. That is the dependent tools are all installed and also their environment variables are set. For regular existing methods like install() and install(boolean) you could pass null as EnvironmentContext and in case that is null also omit to call the setEnvironment(EnvironmentContext, Path) method.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions