The jakarta.validation-api dependency shouldn't be present while upgrading Spring Petclinic to Boot 3.x. This dependency is transitive coming in via spring-boot-validation-starter.
The problem is that first javax validation-api dependency added explicitly. Then the validation-api is transformed into jakarta.validation-api.
I'd try to work with the problem of adding javax validation-api. It is added via
org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_0 -> org.openrewrite.java.spring.boot2.MigrateHibernateConstraintsToJavax
At this moment the petclinic is on Boot 2.7.x which is on jakarta.validation-api version 2.0.x already. Consequently, the old validation-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
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 ?