Skip to content
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

[refactoring] converting petclinic to Spring Boot 3 results in broken project #864

Closed
martinlippert opened this issue Nov 4, 2022 · 6 comments
Assignees
Labels
for: eclipse something that is specific for Eclipse theme: refactoring type: bug

Comments

@martinlippert
Copy link
Member

Converting the standard petclinic sample application to Spring Boot 3 results in a broken project:

  • the jakarta persistence api dependency gets added, but this doesn't seem to be necessary

  • this dependency doesn't get added:

    <dependency>
      <groupId>jakarta.xml.bind</groupId>
      <artifactId>jakarta.xml.bind-api</artifactId>
    </dependency>

so that compile errors are the result.

@martinlippert martinlippert added type: bug for: eclipse something that is specific for Eclipse theme: refactoring labels Nov 4, 2022
@martinlippert martinlippert added this to the 4.17.0.RELEASE milestone Nov 4, 2022
@BoykoAlex
Copy link
Contributor

I thought Rewrite wanted to get this fixed... probably still isn't

@martinlippert
Copy link
Member Author

Here are the things that the Spring Boot Migrator project includes at the moment with regards to converting projects to use Spring Boot 3: https:/spring-projects-experimental/spring-boot-migrator/blob/main/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-dependency-version-update.yaml

So it looks to me like we should have our own, custom-made Spring Tools 4 recipe that contains the things from rewrite-spring (that we use at the moment) and pick additional open-rewrite-based things from the SBM yaml mentioned above, and use that (for the moment) to offer users the ability to convert Spring Boot projects to Spring Boot 3.

Over time, those things should converge - and moved back to rewrite-spring - but in the short-term, having a custom recipe to aggregate the pieces makes some sense to me.

@BoykoAlex
Copy link
Contributor

Should be fixed once this is merged: openrewrite/rewrite-migrate-java#144

@BoykoAlex
Copy link
Contributor

@martinlippert shall we perhaps switch to rewrite snapshots for now? Less stability I suppose but always on the latest Rewrite code with the latest fixes and additions?

@martinlippert
Copy link
Member Author

@BoykoAlex Yes, we should switch to snapshot versions. In addition to that I am thinking the situation where a new Spring Boot (patch) version is being published. It seems to me like the recipe needs to always update to the latest Spring Boot 3.0.x version (instead of having a fixed one in the recipe). But we should probably have that in a separate issue.

@BoykoAlex
Copy link
Contributor

Should be fixed. Rewrite is fixed and rewrite snapshots consumed by sts4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: eclipse something that is specific for Eclipse theme: refactoring type: bug
Projects
None yet
Development

No branches or pull requests

2 participants