Does not include Gradle or Maven dependency

Apache 2.0

A precondition which returns false if visiting a Gradle build file or Maven pom.xml which includes the specified dependency in the classpath of some Gradle configuration or Maven scope. For compatibility with multi-module projects, this should most often be applied as a precondition.

org.openrewrite.java.dependencies.search.DoesNotIncludeDependency

Required

The first part of a dependency coordinate com.google.guava:guava:VERSION. Supports glob expressions.

The second part of a dependency coordinate com.google.guava:guava:VERSION. Supports glob expressions.

Optional

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

onlyDirectBoolean

For Maven only, if enabled, transitive dependencies will not be considered. Defaults to false.

For Maven only, if specified, only the requested scope's classpaths will be checked. All scopes are checked by default.

For Gradle only, match dependencies with the specified configuration. If not specified, all configurations will be searched.

mod run . --recipe=org.openrewrite.java.dependencies.search.DoesNotIncludeDependency \ -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.