Repository has dependency

Apache 2.0

Searches for both Gradle and Maven modules that have a dependency matching the specified groupId and artifactId. Places a SearchResult marker on all sources within a repository with a matching dependency. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a Spring Boot migration to only projects that use a Spring Framework dependency, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) or pom.xml file declaring the dependency, use the FindDependency recipe instead.

org.openrewrite.java.dependencies.search.RepositoryHasDependency

Required

Group glob pattern used to match dependencies.

Artifact glob pattern used to match dependencies.

Optional

For Maven only, match dependencies with the specified scope. All scopes are searched by default.

Match only dependencies with the specified version. Node-style version selectors may be used. All versions are searched by default.

mod run . --recipe=org.openrewrite.java.dependencies.search.RepositoryHasDependency \ -P groupIdPattern=com.fasterxml.jackson.module \ -P artifactIdPattern='jackson-module-*'

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