Missing Dependendcy jakarta.xml.bind:jakarta.xml.bind-api after Spring 2.7 to 3.0 migration
What version of OpenRewrite are you using?
rewrite-maven-plugin:5.4.2
How are you running OpenRewrite?
From terminal via maven on a single module maven project. I run open Rewrite against Spring Petclinic https://github.com/spring-projects/spring-petclinic
What is the smallest, simplest way to reproduce the problem?
- Clone https://github.com/spring-projects/spring-petclinic
- Reset to Commit 276880edef4c3d1029865d19d6d28e982b9d4d01 it is the commit with the update to Spring Boot 2.7.3
- run
./mvnw -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-spring:RELEASE -Drewrite.activeRecipes=org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0 - run
./mvnw clean compile
What did you expect to see?
Build succeeds and Application is runable.
What did you see instead?
Missing dependency jakarta.xml.bind:jakarta.xml.bind-api
Are you interested in contributing a fix to OpenRewrite?
not yet
Thanks for the detailed report @MBoegers ! We did a fresh batch of releases yesterday, and I just reran through the steps above with that; the problem is still there unfortunately. After the recipe run, an analysis of the dependencies shows me this:
Seems like there's a transitive runtime dependency; not sure if that's picked up as a reason not to add an explicit dependency. 🤔
I feel this might have been another case as we saw here, where incorrect scope information lead to dependencies (not) added.
- https://github.com/openrewrite/rewrite/pull/4273
- https://github.com/openrewrite/rewrite-migrate-java/pull/499
- https://github.com/openrewrite/rewrite-hibernate/pull/29
- https://github.com/openrewrite/rewrite-spring/issues/486
I'd lean towards closing this one and reopening a new one if necessary, given that time since.