jakarta.validation-api
dependency added while upgrading Spring Petclinic example
#542
Labels
bug
Something isn't working
The
jakarta.validation-api
dependency shouldn't be present while upgrading Spring Petclinic to Boot 3.x. This dependency is transitive coming in viaspring-boot-validation-starter
.The problem is that first javax
validation-api
dependency added explicitly. Then thevalidation-api
is transformed intojakarta.validation-api
.I'd try to work with the problem of adding javax
validation-api
. It is added viaorg.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_0
->org.openrewrite.java.spring.boot2.MigrateHibernateConstraintsToJavax
Namely this bit of YAML:
At this moment the petclinic is on Boot 2.7.x which is on
jakarta.validation-api
version 2.0.x already. Consequently, the oldvalidation-api
dependency has no issues to be added.Wonder if there is a condition in the YAML recipe that could prevent execution of recipes under 2.7.x for the 2.7.x project that we could add in spring upgrade yaml recipes...
Anything you can recommend @timtebeek and @sambsnyd ?
The text was updated successfully, but these errors were encountered: