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

Maven BOMs do not respect provider specification order #105

Open
henryptung opened this issue Apr 23, 2019 · 0 comments
Open

Maven BOMs do not respect provider specification order #105

henryptung opened this issue Apr 23, 2019 · 0 comments

Comments

@henryptung
Copy link

henryptung commented Apr 23, 2019

The docs indicate that:

If more than one recommender defines a recommended version for a module, the last recommender specified will win.

However, the mavenBomProvider is always added first in the provider order, and it is never moved:

https://github.com/nebula-plugins/nebula-dependency-recommender-plugin/blob/master/src/main/groovy/netflix/nebula/dependency/recommender/provider/RecommendationProviderContainer.java#L59
https://github.com/nebula-plugins/nebula-dependency-recommender-plugin/blob/master/src/main/groovy/netflix/nebula/dependency/recommender/provider/RecommendationProviderContainer.java#L129

This causes surprising behavior if you try to rely on provider order semantics as documented.

A workaround is to use addFirst to force low-priority providers before the mavenBomProvider in the stack.

Either documentation should be updated to note the different semantics of mavenBom, or the code should be changed to move mavenBom to the end of the list on invocation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant