Change Maven dependency scope

Apache 2.0

Add or alter the scope of the specified dependency.

org.openrewrite.maven.ChangeDependencyScope

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

Scope to apply to specified Maven dependency. May be omitted, which indicates that no scope should be added and any existing scope be removed from the dependency.

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