fix(locker): omit scope in locked deps#52
Merged
ia3andy merged 1 commit intomvnpm:mainfrom Feb 5, 2026
Merged
Conversation
Drop dependencyManagement <scope> entries for locked dependencies since they do not influence resolution and add noise. Update ITs to assert that no scope is emitted in locker BOM and in-profile modes. This will cause changes in the generated POM for all consumers who have specified <scope> for `org.mvnpm` and `org.webjars` dependencies. Fixes mvnpm#23
ia3andy
reviewed
Feb 5, 2026
| <groupId>org.mvnpm</groupId> | ||
| <artifactId>lit</artifactId> | ||
| <version>3.1.2</version> | ||
| <scope>runtime</scope> |
Contributor
There was a problem hiding this comment.
Why are they added and not removed?
Contributor
Author
There was a problem hiding this comment.
These are the original dependencies, not the "locked versions". Here, we must not change the defined scope as this is an explicit intent of the developer depending on how they will use the dependencies, i.e. served at runtime or transformed/bundled during build time.
I adjusted the original input pom.xml to therefore explicitly state <scope>s in order to showcase that with the applied template change we ensure that these scopes are not transferred to the definitions of the "locked versions" in the locker profile/POM <dependencyManagement> section.
Does that answer your question?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Drop dependencyManagement entries for locked dependencies since they do not influence resolution and add noise.
Update ITs to assert that no scope is emitted in locker BOM and in-profile modes.
This will cause changes in the generated POM for all consumers who have specified for
org.mvnpmandorg.webjarsdependencies.Fixes #23
@ia3andy Did I understand your issue and reasoning correctly? That
<scope>is transiently inherited anyway and thus specifying it in<dependencyManagement>is henceforth just noise?I opted to simply adjust the existing ITs to ensure this behavior. One could of course explicitly check for the absence of
<scope>, if you want.for example via: