-
Notifications
You must be signed in to change notification settings - Fork 33
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
#1024: Move urls into url-updater module #1025
base: main
Are you sure you want to change the base?
#1024: Move urls into url-updater module #1025
Conversation
adjusted github action workflow updated wiremock from com.github.tomakehurst 2.35.2 to org.wiremock 3.11.0 added jackson-core dependency to ide-cli added url to url tool test classes package name
Pull Request Test Coverage Report for Build 13699101357Details
💛 - Coveralls |
added testExtractTgzArchive and testFindExistingFileInFolder
added test and resources added getter of baseUrl to AwsUrlUpdater to be able to mock it
# Conflicts: # cli/src/test/resources/ide-projects/basic/project/home/environment.properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jan-vcapgemini thanks for your PR. You not only did a refactoring, you also added a lot of new tests and coverage doing homework of other developers that forgot these tests. Really great job 👍
Sorry, but I left quite a lot of review comments for further improvements.
It would be awesome if you could have a look and improve. Thanks in advance!
url-updater/pom.xml
Outdated
<maven.compiler.source>21</maven.compiler.source> | ||
<maven.compiler.target>21</maven.compiler.target> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See
Line 22 in ddb6d00
<java.version>17</java.version> |
It is fine to upgrade our project from java 17 to java 21 but if we want to do that, we should do that centrally and not have some modules compile for Java17 and others for Java21 what IMHO does not make sense here.
<maven.compiler.source>21</maven.compiler.source> | |
<maven.compiler.target>21</maven.compiler.target> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to root pom.xml now and adjusted to 21.
Also changed the java version of github actions workflows to java 21.
url-updater/pom.xml
Outdated
<properties> | ||
<maven.compiler.source>21</maven.compiler.source> | ||
<maven.compiler.target>21</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already defined in our root parent POM:
https://github.com/devonfw/maven-parent/blob/9d31509d5f25c96fa1ec8b4f8cd2c341349b4df2/pom.xml#L17-L18
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed now.
cli/pom.xml
Outdated
<groupId>org.wiremock</groupId> | ||
<artifactId>wiremock</artifactId> | ||
<version>3.11.0</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice that you update here.
With our new module it is more than time that we also go for maven dependencyMamangement
.
Could you also do that in this PR so we do not introduce dependency versions redundantly in cli
and url-updater
?
Simply add a dependencyMamangement
to our IDEasy
parent POM and add all dependencies there with their versions. Then remove all these versions from other POMs. If we have multiple artifacts from the same groupId that share the same version, use a variable (like jackson.version
) in our parent POM.
<groupId>org.wiremock</groupId> | |
<artifactId>wiremock</artifactId> | |
<version>3.11.0</version> | |
<groupId>org.wiremock</groupId> | |
<artifactId>wiremock</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added dependencyManagement to root pom.xml now.
url-updater/pom.xml
Outdated
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>1.5.16</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
<version>1.5.16</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to root pom.xml now.
url-updater/pom.xml
Outdated
<dependency> | ||
<groupId>org.wiremock</groupId> | ||
<artifactId>wiremock</artifactId> | ||
<version>3.11.0</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
<version>3.11.0</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to root pom.xml now.
url-updater/src/test/java/com/devonfw/tools/ide/url/tool/UrlUpdaterTest.java
Outdated
Show resolved
Hide resolved
import com.devonfw.tools.ide.tool.androidstudio.AndroidJsonDownload; | ||
import com.devonfw.tools.ide.tool.androidstudio.AndroidJsonItem; | ||
import com.devonfw.tools.ide.tool.androidstudio.AndroidJsonObject; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we also move these files here?
They are IMHO only used by the url-updaters and not by IDEasy and URL-Metadata.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to url-updater.
cli/pom.xml
Outdated
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
<version>${jackson.version}</version> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you have to add this dependency additionally?
It is already a transitive dependency of all other jackson-* dependencies.
<dependency> | |
<groupId>com.fasterxml.jackson.core</groupId> | |
<artifactId>jackson-core</artifactId> | |
<version>${jackson.version}</version> | |
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed it now, did this also for the root pom.xml.
.github/workflows/update-urls.yml
Outdated
cd url-updater | ||
mvn -B -ntp -Dstyle.color=always install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not going to work since url-updater
depends on cli
so if you only build url-updater
without building cli
it will fail.
This currently does not fail because the artifacts will be downloaded by maven from nexus.
But when someone (our release process) sets a new version in the POM and then this action is going to be executed, it will fail because cli
artifact is missing.
cd url-updater | |
mvn -B -ntp -Dstyle.color=always install | |
mvn -B -ntp -Dstyle.color=always -pl url-updater -am install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjusted.
public void setUserEnvironmentVariable(String userEnvironmentVariable) { | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seem to make sense to me. IMHO this is not used anywhere...
public void setUserEnvironmentVariable(String userEnvironmentVariable) { | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed now.
I am slightly confused. This PR was green. After updating with |
introduced maven dependencyManagement removed unnecessary properties from url-updater module moved dependency version variables to root pom.xml
moved getBaseUrl method to GithubUrlUpdater added Override to sub classes using getBaseUrl used getBasedUrl in each GithubUrlUpdater to construct download urls
moved url specific classes from cli module to url-updater module
replaced import with fully qualified reference
moved url specific classes from cli module to url-updater module
adjusted github workflow
removed unnecessary method
replaced import with fully qualified reference
changed java version from 17 to 21
removed jackson-core dependency from cli
removed jackson-core dependency from root pom
…ithub.com/jan-vcapgemini/IDEasy into enhancement/1024-move-urls-to-url-updater
removed / from aws base url replaced graalvm base url with GITHUB_BASE_URL
Fixes: #1024
Implements:
com.github.tomakehurst
2.35.2 toorg.wiremock
3.11.0jackson-core
dependency toide-cli