Skip to content

Add RemoveUnnecessaryExclusions recipe#6802

Draft
Jenson3210 wants to merge 1 commit intomainfrom
remove-unnecessary-exclusions
Draft

Add RemoveUnnecessaryExclusions recipe#6802
Jenson3210 wants to merge 1 commit intomainfrom
remove-unnecessary-exclusions

Conversation

@Jenson3210
Copy link
Copy Markdown
Contributor

Summary

  • Adds a declarative YAML recipe org.openrewrite.maven.cleanup.RemoveUnnecessaryExclusions that removes Maven dependency exclusions which are not necessary because the excluded dependency is not actually a transitive dependency of the project
  • Wraps the existing RemoveExclusion recipe with onlyIneffective: true and wildcard matchers
  • Adds the new recipe to org.openrewrite.maven.BestPractices

Test plan

  • New RemoveUnnecessaryExclusionsTest with 3 test cases: removes ineffective exclusion, retains effective exclusion, mixed scenario
  • Existing RemoveExclusionTest passes (no regressions)

Declarative YAML recipe that removes Maven dependency exclusions which
are not necessary because the excluded dependency is not a transitive
dependency of the project. Added to BestPractices recipe list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant