Skip to content
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

#439: refactor tool dependencies and tomcat #515

Conversation

aBega2000
Copy link
Contributor

Fixes: #439

With this PR I intend to solve the issue of tool-dependencies by refactoring and improving it as much as possible.

As can be seen, many classes are changed and this has happened because of the change in the install method where I now pass EnvironmentContext as argument. Namely this came from the point: "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."

The problem at the moment is that some tests are not running successfully anymore. If this approach that I am following is correct, then the last step for this issue would be to fix the mentioned tests so that everything runs smoothly.

…omcat

# Conflicts:
#	cli/src/main/java/com/devonfw/tools/ide/tool/CustomToolCommandlet.java
#	cli/src/main/java/com/devonfw/tools/ide/tool/Dependency.java
#	cli/src/main/java/com/devonfw/tools/ide/tool/LocalToolCommandlet.java
#	cli/src/main/java/com/devonfw/tools/ide/tool/PluginBasedCommandlet.java
#	cli/src/main/java/com/devonfw/tools/ide/tool/androidstudio/AndroidStudio.java
#	cli/src/main/java/com/devonfw/tools/ide/tool/intellij/Intellij.java
#	cli/src/main/java/com/devonfw/tools/ide/tool/tomcat/Tomcat.java
#	cli/src/test/java/com/devonfw/tools/ide/tool/dotnet/DotNetTest.java
#	cli/src/test/java/com/devonfw/tools/ide/tool/intellij/IntellijTest.java
#	cli/src/test/java/com/devonfw/tools/ide/tool/tomcat/TomcatTest.java
@jan-vcapgemini jan-vcapgemini self-requested a review August 7, 2024 11:44
@aBega2000 aBega2000 self-assigned this Aug 8, 2024
Copy link
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

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

@aBega2000 as requested I had a look at your PR. It looks already good to me and you are perfectly on the right track 👍
Your changes to use the model with UrlDependencyFile are fully correct, and the way you integrate the environment variable settings is also looking good. I left some review comments for further directions and places to adopt. Please have a look.

…omcat

# Conflicts:
#	cli/src/main/java/com/devonfw/tools/ide/tool/CustomToolCommandlet.java
#	cli/src/main/java/com/devonfw/tools/ide/tool/LocalToolCommandlet.java
#	cli/src/test/java/com/devonfw/tools/ide/tool/cobigen/CobigenTest.java
@coveralls
Copy link
Collaborator

coveralls commented Aug 12, 2024

Pull Request Test Coverage Report for Build 10577088575

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 86 unchanged lines in 7 files lost coverage.
  • Overall coverage increased (+0.03%) to 65.165%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/tool/CustomToolCommandlet.java 5 0.0%
com/devonfw/tools/ide/tool/Dependency.java 5 70.45%
com/devonfw/tools/ide/tool/tomcat/Tomcat.java 6 76.92%
com/devonfw/tools/ide/url/model/folder/UrlEdition.java 7 42.86%
com/devonfw/tools/ide/tool/ToolCommandlet.java 18 76.4%
com/devonfw/tools/ide/tool/GlobalToolCommandlet.java 20 2.2%
com/devonfw/tools/ide/tool/LocalToolCommandlet.java 25 79.22%
Totals Coverage Status
Change from base Build 10567295670: 0.03%
Covered Lines: 5736
Relevant Lines: 8495

💛 - Coveralls

@hohwille hohwille added this to the release:2024.08.001 milestone Aug 13, 2024
@hohwille hohwille self-assigned this Aug 13, 2024
@hohwille hohwille added enhancement New feature or request install installation process of IDE + tools and install commandlet labels Aug 13, 2024
@hohwille hohwille changed the title Feature/439 refactor tool dependencies and tomcat #439: refactor tool dependencies and tomcat Aug 13, 2024
Copy link
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

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

@aBega2000 thanks for your patient work on this complex topic.
You have already gathered very great improvements in this PR and addressed most of the aspects of the story #439. 👍
I left some review comments for rework.
Please, have a look and consider some improvements.
You can also then take this PR out of draft mode.
IMHO we can approve if all review comments are addressed.
Feel free to get in touch if some review comments are unclear for you.

Copy link
Contributor

@jan-vcapgemini jan-vcapgemini left a comment

Choose a reason for hiding this comment

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

The refactoring looks really nice, especially the runTool refactor. I've added quite some CR's for missing Javadocs only. Please check your IDE for yellow/orange hints on the right side of the code window to prevent this.

@jan-vcapgemini jan-vcapgemini marked this pull request as ready for review August 13, 2024 19:30
Copy link
Contributor

@jan-vcapgemini jan-vcapgemini left a comment

Choose a reason for hiding this comment

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

Some small CR's missing and then it's ready to merge.

Copy link
Contributor

@jan-vcapgemini jan-vcapgemini left a comment

Choose a reason for hiding this comment

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

Thanks for adding the missing Javadocs. Ready for review.

@hohwille hohwille linked an issue Aug 20, 2024 that may be closed by this pull request
@hohwille hohwille removed a link to an issue Aug 20, 2024
Copy link
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

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

@aBega2000 thank you very much for your work and improvements. You are reaching the finishing line. I resolved all previous review comments that you solved with your rework. There are only very few review remarks to address (currently 5). Great work 👍

Could you have a look and get the last review comments implemented then we can merge this PR and finally close the story.

Copy link
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

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

@aBega2000 thanks for your excellent and patient rework. You resolved all review comments and brought this to the finishing line. Excellent job 👍
Ready for merge.

@hohwille hohwille merged commit 86df4af into devonfw:main Aug 27, 2024
4 checks passed
hohwille added a commit that referenced this pull request Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request install installation process of IDE + tools and install commandlet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Refactor and improve tool-dependencies and tomcat
4 participants