Add explicit transitive dependencies

Proprietary

Detects when Java source code or configuration files reference types from transitive Maven dependencies and promotes those transitive dependencies to explicit direct dependencies in the pom.xml. This ensures the build is resilient against changes in transitive dependency trees of upstream libraries.

org.openrewrite.java.dependencies.AddExplicitTransitiveDependencies

Optional

A list of groupId:artifactId glob patterns for dependencies that should not be promoted, even if they appear to be used transitively. For example, com.google.*:* would ignore all Google dependencies, and *:lombok would ignore Lombok regardless of group ID. Separate values with commas.

mod run . --recipe=org.openrewrite.java.dependencies.AddExplicitTransitiveDependencies

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