Upgrade transitive Gradle or Maven dependencies
Apache 2.0Upgrades the version of a transitive dependency in a Maven pom.xml or Gradle build.gradle or build.gradle.kts. Leaves direct dependencies unmodified. Can be paired with UpgradeDependencyVersion to upgrade a dependency everywhere, regardless of whether it is direct or transitive.
org. openrewrite. java. dependencies. UpgradeTransitiveDependencyVersionRequired
The first part of a dependency coordinate org.apache.logging.log4j:ARTIFACT_ID:VERSION.
The second part of a dependency coordinate org.apache.logging.log4j:log4j-bom:VERSION.
An exact version number or node-style semver selector used to select the version number.
Optional
For Maven only, an optional scope to use for the dependency management tag.
For Maven only, an optional type to use for the dependency management tag.
For Maven only, an optional classifier to use for the dependency management tag.
Allows version selection to be extended beyond the original Node Semver semantics. So for example, setting version to "25-29" can be paired with a metadata pattern of "-jre" to select 29.0-jre.
The reason for upgrading the transitive dependency. For example, we could be responding to a vulnerability.
For Maven only, whether to exclude snapshots from consideration when using a semver selector.
For Maven only, only add managed dependencies to projects having a dependency matching the expression.
For Maven only, add to the root pom where root is the eldest parent of the pom within the source set.
mod run . --recipe= org. openrewrite. java. dependencies. UpgradeTransitiveDependencyVersion \
-P groupId= org. apache. logging. log4j \
-P artifactId= log4j-bom \
-P version= latest. releaseInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.