Manage dependencies
Apache 2.0Make existing dependencies managed by moving their version to be specified in the dependencyManagement section of the POM.
org. openrewrite. maven. ManageDependenciesRequired
Group glob expression pattern used to match dependencies that should be managed.Group is the first part of a dependency coordinate com.google.guava:guava:VERSION.
Optional
Artifact glob expression pattern used to match dependencies that should be managed.Artifact is the second part of a dependency coordinate com.google.guava:guava:VERSION.
Add to the root POM where root is the eldest parent of the pom within the source set.
Optionally skip updating the dependency model after managing dependencies. Updating the model does not affect the source code of the POM,but will cause the resolved dependency model to reflect the changes made to the POM. If this recipe is ran standalone, it is not necessary to update the model.
mod run . --recipe= org. openrewrite. maven. ManageDependencies \
-P groupPattern= 'com. google. *'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.