-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recipe UpgradeSpringBoot_3_3 misses upgrading wro4j-maven-plugin and the latest version of jakarta.xml.bind-api when the origin is Java8 and Spring Boot 1.5.X #4283
Comments
hi! Thanks for the detailed report, and bringing OpenRewrite to your Spanish audience 🙏🏻 We just had some PRs related to bind-api merged last week; would you mind trying our latest snapshot versions?
|
The wro4j dependency should be updated, as part of our Java 11 migration, as seen in rewrite-migrate-java: Also: welcome to let me know if there's anything you'd like be to proofread. Happy to help! |
Hello @timtebeek I just update the plugin with the following SNAPSHOT versions: rewrite-maven-plugin: 5.35.5-SNAPSHOT The result is the following:
I think that this recipe Regarding wro4j I see the recipe that you linked, but this recipe is not enough due to this version is for Java11,
we would need to upgrade to 2.X. But anyway, it does not work (dont change the property version to 1.10.1) but I dont know why. I just update the project with the SNAPSHOT versions if you want to try. Thanks in advance, |
We've since done two full release trains with related fixes. Are you seeing any improvement with the latest? |
Hello, sorry for the delay. I just update the following versions:
The result is different from the previous report. To remember it, the main problems were two:
Now the changes are:
So the problem regarding jakarta is solved (i think that add the dependency management is not needed (spring does it) but it is not important). But the plugin is not solved, now the error when build the project is:
It looks like a problem between some transitive dependencies for the plugin but I think that the problem is related with this version is not compatible with JDK17 , https://stackoverflow.com/questions/74347674/mvn-issue-with-an-old-java-codebase-clashing-dependencies |
Thanks again! Wasn't aware there was a 2.x version of the plugin available, or that it's required for Java 17. Fixed just now. |
What version of OpenRewrite are you using?
I am using:
How are you running OpenRewrite?
I'm using maven plugin on my own project.
You can check the project here:
https://github.com/mgvinuesa/spring-petclinic-openrewrite
It is a fork of spring-petclinic and you might use the branch with the name migrate_with_open_rewrite, I started with the TAG 1.5.x to migrate boot Spring Boot and Java using OpenRewrite.
What is the smallest, simplest way to reproduce the problem?
Execute the mvn command with the current configuration with Java 8.
mvn rewrite:run
What did you expect to see?
The wro4j-maven-plugin might upgrade from 1.8.0 to 2.X due to Java17 compatibility.
The recipe that adds jakarta.xml.bind-api must include the latest version instead of 2.3.3.
What did you see instead?
Even there is a recipe to work with wro4j:
Nothing happens, but the version is for Java11, not for Java17.
On the other side, about jakarta, the recipe AddDependency
Add the 2.3.3 dependency but it is not enough due to packaging error with Java17, this dependency still use javax.xml.bind package.
Apart from that, I have tried to add more recipes to solve these issues:
But the last recipe, UpgradeDependencyVersion, does not execute although I have tried to put causesAnotherCycle = true. So if you put this recipe
com.example.MigrateToSpringBoot3_3
instead oforg.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3
you can see that jakarta.xml.bind-api` is not upgraded.What is the full stack trace of any errors you encountered?
No errors, only the result is not the proper one.
Are you interested in [contributing a fix to OpenRewrite]
Currently im writing a post in spanish about it, it is pretty interesting, if I had time i would like to fix this problem.
The text was updated successfully, but these errors were encountered: