rewrite-spring icon indicating copy to clipboard operation
rewrite-spring copied to clipboard

Boot 3 Upgrade recipe doesn't add jakarta.xml.bind-api dependency

Open BoykoAlex opened this issue 2 years ago • 2 comments

Spring petclinic is the famous demo app for Spring. Upgrading this app from 2.x to 3.0.x results in compilation errors due to the missing jakarta.xml.bind-api dependency.

It used to work. However, my attempt to fix seems didn't fix it at all. Likely, because my idea of scopes implied from transitive dependencies and BOMs is blurry.

It'd be great to fix this issue for the petclinic app upgrade due to its popularity... The problem is in rewrite-maven though.

(spring petclinic branch 2.7.x https://github.com/BoykoAlex/spring-petclinic)

BoykoAlex avatar Jun 01 '23 20:06 BoykoAlex

Is it possible to replicate the exact issue in a Unit Test? What is the exact issue you are mentioning in rewrite-maven?

joanvr avatar Jun 02 '23 10:06 joanvr

This is a great question :-) I admit i've been thinking about it. I did try to replicate this use case as a test in rewrite-maven and then fix it in rewrite-maven with this https://github.com/openrewrite/rewrite/pull/3097. However, this test still passes. The spring-petclinic upgrade to Boot 3 started working when the PR above was merged. However, now in the snapshots, the test from the PR still passes, but the spring-petclinic Boot 3 upgrade is missing the xml bind dependency. I'll of course try to come up with a unit test for rewrite-maven to replicate the issue, however it might be a challenging task due to the order of recipe application perhaps... Will see..

BoykoAlex avatar Jun 02 '23 15:06 BoykoAlex