Skip to content

Add acceptTransitive to javax-to-jakarta AddDependency entries#1034

Merged
steve-aom-elliott merged 1 commit intomainfrom
add-accept-transitive
Mar 30, 2026
Merged

Add acceptTransitive to javax-to-jakarta AddDependency entries#1034
steve-aom-elliott merged 1 commit intomainfrom
add-accept-transitive

Conversation

@steve-aom-elliott
Copy link
Copy Markdown
Contributor

Summary

  • Adds acceptTransitive: true to all 25 AddDependency entries in jakarta-ee-9.yml that were missing it
  • Without this flag, AddDependency adds the jakarta dependency as an explicit dependency even when it's already available transitively (e.g. via Spring Boot starters like spring-boot-starter-data-jpa or spring-boot-starter-validation)
  • Fixes the Boot3UpgradeTest.xmlBindMissing() failure in rewrite-spring caused by jakarta.persistence-api and jakarta.validation-api being unnecessarily added as explicit dependencies

Test plan

  • rewrite-migrate-java tests pass
  • rewrite-spring Boot3UpgradeTest.xmlBindMissing() now passes with local snapshot
  • rewrite-micronaut tests pass with local snapshot

Without acceptTransitive, AddDependency adds the jakarta dependency
even when it is already available transitively (e.g. via Spring Boot
starters). This caused rewrite-spring Boot3UpgradeTest.xmlBindMissing
to fail because jakarta.persistence-api and jakarta.validation-api
were being added explicitly despite being transitive through
spring-boot-starter-data-jpa and spring-boot-starter-validation.
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Mar 30, 2026
@steve-aom-elliott steve-aom-elliott moved this from In Progress to Ready to Review in OpenRewrite Mar 30, 2026
@steve-aom-elliott steve-aom-elliott merged commit d4107b9 into main Mar 30, 2026
1 check passed
@steve-aom-elliott steve-aom-elliott deleted the add-accept-transitive branch March 30, 2026 19:30
@github-project-automation github-project-automation Bot moved this from Ready to Review to Done in OpenRewrite Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant