Remove Maven dependency

Apache 2.0

Removes a single dependency from the <dependencies> section of the pom.xml. Does not remove usage of the dependency classes, nor guard against the resulting compilation errors.

org.openrewrite.maven.RemoveDependency

Required

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

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

Optional

Only remove dependencies if they are in this scope. If 'runtime', this willalso remove dependencies in the 'compile' scope because 'compile' dependencies are part of the runtime dependency set

mod run . --recipe=org.openrewrite.maven.RemoveDependency \ -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.