You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Suggestion: Add a parameter to control the sort of dependencies in dependencymanagement #210
If someone wants dependencies to be sorted first by scope in dependencies, but groupId in dependencyManagement, they will need a parameter independent of sortDependencies.
I would like to create a pull request for this.
Interesting! What it the use case?
Would it be some kind of sortDependencyManagements (or sortManagementDependencies) param that would take precedence if present and would fallback sortDependencies if not present?
You are always welcome to create a PR. Be aware that I try to stay at 100% test coverage and I have an integration test for each parameter.
The common case is someone controls the version of dependency by BOMs but doesn't declare scope in the dependencyMangement section. In this case, dependencies in the dependencyMangement section should be sorted first by some element not socpe such as groupId since there is no scope at all.
Couldn't that be fixed by setting sort to scope, groupId, artifactId? If there is not scope, then the plugin wouldn't care about and just sort by the next listed sort criteria.
I fixed the integration test and added a few test cases. Just discovered that we need this precise functionality; to sort all dependencies but not dependencyManagement all (due to bom conflicts).
Our configuration will look like this:
The code should be in master now, please pull down the latest source code, compile it and try it out. You can set the version to 3.1.4-SNAPSHOT in your project temporarily.
Tell me if it works for you
Activity
Ekryd commentedon May 28, 2022
Interesting! What it the use case?
Would it be some kind of
sortDependencyManagements(orsortManagementDependencies) param that would take precedence if present and would fallbacksortDependenciesif not present?You are always welcome to create a PR. Be aware that I try to stay at 100% test coverage and I have an integration test for each parameter.
create-issue-branch commentedon Jun 2, 2022
Branch issue-210-Suggestion_Add_a_parameter_to_control_the_sort_of_dependencies_in_dependencymanagement created!
ssquan commentedon Jun 13, 2022
The common case is someone controls the version of dependency by BOMs but doesn't declare scope in the
dependencyMangementsection. In this case, dependencies in thedependencyMangementsection should be sorted first by some element notsocpesuch asgroupIdsince there is noscopeat all.Declare
scopeindependencyMangementis not a good practice. Here is a discussion in stackoverflow :https://stackoverflow.com/questions/15221299/dependencymanagement-and-scopeEkryd commentedon Jun 15, 2022
Couldn't that be fixed by setting sort to
scope, groupId, artifactId? If there is not scope, then the plugin wouldn't care about and just sort by the next listed sort criteria.Ekryd commentedon Jul 13, 2022
I fixed the integration test and added a few test cases. Just discovered that we need this precise functionality; to sort all dependencies but not dependencyManagement all (due to bom conflicts).
Our configuration will look like this:
I'll try to merge it promptly
Ekryd commentedon Jul 14, 2022
The code should be in master now, please pull down the latest source code, compile it and try it out. You can set the version to
3.1.4-SNAPSHOTin your project temporarily.Tell me if it works for you
Ekryd commentedon Jul 17, 2022
New version 3.2.0 is released. Enjoy!