Remove a Gradle or Maven dependency exclusion

Apache 2.0

Remove exclusions of the specified dependency, the inverse of ExcludeDependency. For a Gradle project, removes exclude declarations from dependency and configuration closures in build.gradle or build.gradle.kts. For a Maven project, removes the <exclusion> from dependencies and managed dependencies in the pom.xml.

org.openrewrite.java.dependencies.RemoveExclusion

Optional

The group of the excluded dependency. If omitted (or *), exclusions of the artifact from any group are removed. Partial wildcards are not supported.

The artifact of the excluded dependency. If omitted (or *), exclusions of any artifact in the group are removed, including those of the whole group. Partial wildcards are not supported.

mod run . --recipe=org.openrewrite.java.dependencies.RemoveExclusion

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