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 dependency.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 method so we can pass VersionRage (instead of VersionIdentifier) for an optional 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.
From PR #250 we have to following review improvements left to do:
TomcatCommand
and makeTomcat
commandlet to simply delegate tocatalina.sh
passing any given arguments fromide tomcat «args»
UrlDependencyFile
for URL-Model to support lazy loading and simpler access todependency.json
ide-urls
to adddependency.json
totomcat/tomcat
.withEnvVar
method fromProcessContext
to own interfaceEnvironmentContext
.LocalToolCommandlet
for setting environment variablespublic void setEnvironment(EnvironmentContext context, Path toolPath)
.installInRepo
method so we can passVersionRage
(instead ofVersionIdentifier
) for an optional dependency (from theDependencyInfo
).software/«tool»
viagetToolPath()
). Only if that version does not match then install an additional version in repo if not already available.installInRepo
methods.runTool
we can then first create the process context, pass it asEnvironmentContext
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 likeinstall()
andinstall(boolean)
you could passnull
asEnvironmentContext
and in case that isnull
also omit to call thesetEnvironment(EnvironmentContext, Path)
method.