-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for tool dependencies #131
Comments
3 Options how a Json file could look like to match the versions between tomcat and Java: Option 1: Option 2 (nested Objects) : "Tomcat 8": { Option 3 (Array of objects): |
Since the tomcat versions work with the matching java version or LATER, I suppose we just need to check the minJavaVersion that the actual tomcat version matches. Because if tomcat version 10 works with java 8 or later, it means that if we have java 17 in our system, then everything is fine. So just a suggestion would be: { This still needs working, but I just want to know if this is a good foundation for writing the JSON file. Another question would be, how to construct a range or an array of versions for tomcat, in the case of tomcat version 9 and 10 for example, so that I don't repeat code, since both of these versions need javaMinVersion 8. And also what other options can I add in each tomcat version except javaMinVersion? |
My suggestion would be something like this:
So we define a selector We then go through this and find the matching selector for the version to be installed.
The entire object is actually the dependency and the property name The remaining question for me would be how to handle selector versions to be inclusive or exclusive (
This would mean that we check our tomcat version to be installed from top to bottom:
For other use-cases, we would also need to implement and support a version range as well and one could even specify something like
so if the version to be installed is exactly The alternative and more explicit form for the JSON would IMHO be too verbose:
|
As a devonfw-IDEasy user, I want to have tools being setup with their correct dependencies so that it just works and I do not have to worry.
E.g. several tools have java as dependency:
However, they may all require different versions of java ending up in an inconsistent situation that devonfw-ide currently cannot resolve. As a solution I see the following ideas:
In ide-urls in each tool/edition version folder we will introduce a new (optional)
dependencies.json
file.This file will contain a list of 1-n tools with their required version or version range (similar to a dependency in maven, gradle, or npm).
We can still discuss if that should be in JSON format (and then being named dependencies.json) or just a plain file with one dependency per line (TBD)
If no such file is present, there are no dependencies required. Otherwise these dependencies have to be setup as well to launch the tool.
In order to avoid conflicts between different versions of the same tool, we make the shared software repository the new default.
The default java version for the build (e.g. for maven or gradle) will still be found in software/java but as a symlink to the configured JAVA_VERSION.
However tools like eclipse/intellij/jenkins/sonar/... can require their own Java version via the dependencies file. If the default Java (JAVA_VERSION) does not match, then an additional java version is found or installed in the shared software repository and used instead by setting JAVA_HOME to it and adding it to the beginning of the PATH but only locally in the commandlet before launching the java based tool.
We will analyze if we can find ways to automatically determine dependencies for specific tool versions. Where not possible, we will simply put the latest default into the according UrlUpdater class for that tool/edition and have to change it whenever a new version comes out that has different dependencies. If we notice too late (what might be the regular case), we have to change existing dependency version file(s) manually and also change the UrlUpdater then for future versions.
All existing dependencies will need to be added via manual crafting what can be quite some effort.
The text was updated successfully, but these errors were encountered: