-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
safely remove property version when removing dependency #9921
safely remove property version when removing dependency #9921
Conversation
fc5bab1
to
ad82b67
Compare
@murdos : I generated a |
.../jhipster/lite/module/infrastructure/secondary/javadependency/maven/MavenCommandHandler.java
Outdated
Show resolved
Hide resolved
.../jhipster/lite/module/infrastructure/secondary/javadependency/maven/MavenCommandHandler.java
Outdated
Show resolved
Hide resolved
Collection<JavaBuildCommand> versionCommands( | ||
JavaDependenciesVersions currentVersions, | ||
ProjectJavaDependencies projectDependencies, | ||
Collection<JavaBuildCommand> dependencyCommands |
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.
If find that signature a bit strange... to generate version commands, you need other commands.
Out of curiosity, have you thought about an alternative?
… the dependency removing
… version used by the current dependencyId
…know the version used by the current dependencyId"
…ween removing a dependency and removing its version property.
…nt scopes, applied by different modules, should not remove the version property used by both
…DirectJavaDependency that use the version. This covers the new feature of removing unused version properties. Scenario: update the only dependency that references an existing version property. As a result, the dependency and version property will be removed. When adding the updated dependency, the version will need to be added again.
…y and AddDirectJavaDependency to ensure the version is set, avoiding unintentional exclusion.
…use it is used by another dependency management
…he version property
… from DependencyManagement
…y management with different scopes, applied by different modules, should not remove the version property used by both
…in dependency management referencing version property
…arameter Replace Collection<JavaBuildCommand> dependencyCommands with Optional<BuildProfileId> buildProfile and the instance of JavaDependencyCommandsCreator, which is sufficient to retrieve the dependencyCommands
a971a09
to
0fb6e2b
Compare
f5ca681
to
81d67df
Compare
…ependency commands Removed logic from JavaDependency.versionCommands. The logic to generate dependencyCommands is now handled in DirectJavaDependency.versionCommands and JavaDependencyManagement.versionCommands, avoiding code duplication
Thanks @renanfranca :) |
You are welcome 😊 , thank you for the review! I am going to create an issue to handle this on Gradle 👍 |
Fix #6977