Fixed situation where a changing a managed dependency that does not have an explicit version tag would fail to add a version tag when providing the newVersion option.
#6105
+545
−24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's changed?
versiontag (because the version was applied to the managed dependency in an external parent artifact), callingChangeManagedDependencyGroupIdAndArtifactIdwould fail to make the full needed change. Now it will add theversiontag to the managed dependency.ChangeDependencyGroupIdAndArtifactIdto prevent also adding the version tag to the direct dependency that is managed in the scenario that we end up changing the managed dependency as well.What's your motivation?
This was preventing managed dependencies from being updated correctly.
Anything else to consider?
If we have a local parent POM that has a requested managed dependency on
A, and the child POM has a requested managed import dependency that would expand to include a managed dependency onAonce resolved, should we not be able to affect change on the managed dependency because the closest one could be the one managed by the BOM imported managed dependency in the child POM?Checklist