Sort dependencies

Apache 2.0

Sort dependencies alphabetically by groupId then artifactId. Test-scoped dependencies are sorted after non-test dependencies. Imported BOMs retain their original positions. Applies to both <dependencies> and <dependencyManagement> sections.

org.openrewrite.maven.SortDependencies
mod run . --recipe=org.openrewrite.maven.SortDependencies

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.