Upgrade Maven dependency version
Apache 2.0Upgrade the version of a dependency by specifying a group and (optionally) an artifact using Node Semver advanced range selectors, allowing more precise control over version updates to patch or minor releases.
org. openrewrite. maven. UpgradeDependencyVersionRequired
The first part of a dependency coordinate com.google.guava:guava:VERSION. This can be a glob expression.
The second part of a dependency coordinate com.google.guava:guava:VERSION. This can be a glob expression.
An exact version number or node-style semver selector used to select the version number. You can also use latest.release for the latest available version and latest.patch if the current version is a valid semantic version. For more details, you can look at the documentation page of version selectors
Optional
Allows version selection to be extended beyond the original Node Semver semantics. So for example,Setting 'newVersion' to "25-29" can be paired with a metadata pattern of "-jre" to select Guava 29.0-jre
This flag can be set to explicitly override a managed dependency's version. If the dependency has its version managed by a Bill of Materials (BOM), enabling this flag will attempt to upgrade the BOM. The default for this flag is false.
Accepts a list of GAVs. For each GAV, if it is a project direct dependency, and it is removed from dependency management after the changes from this recipe, then it will be retained with an explicit version. The version can be omitted from the GAV to use the old value from dependency management Separate values with commas.
mod run . --recipe= org. openrewrite. maven. UpgradeDependencyVersion \
-P groupId= 'com. fasterxml. jackson*' \
-P artifactId= 'jackson-module*' \
-P newVersion=29. XInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.