Find Gradle or Maven dependencies

Apache 2.0

Finds direct dependencies declared in Gradle and Maven build files. This does not search transitive dependencies. To detect both direct and transitive dependencies use org.openrewrite.java.dependencies.DependencyInsight.

org.openrewrite.java.dependencies.FindDependency

Required

The first part of a dependency coordinate identifying its publisher.

The second part of a dependency coordinate uniquely identifying it among artifacts from the same publisher.

Optional

An exact version number or node-style semver selector used to select the version number.

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 Guava 29.0-jre.

For Gradle only, the dependency configuration to search for dependencies in. If omitted then all configurations will be searched.

mod run . --recipe=org.openrewrite.java.dependencies.FindDependency \ -P groupId=com.google.guava \ -P artifactId=guava

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