Skip to content

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

Closed

Description

@martinlippert

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.

Activity

  1. added
    for: eclipse
    on Nov 4, 2022
  2. added this to the 4.17.0.RELEASE milestone on Nov 4, 2022
  3. BoykoAlex commented on Nov 4, 2022

    @BoykoAlex
    Contributor

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

  4. martinlippert commented on Nov 4, 2022

    @martinlippert
    MemberAuthor

    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://github.com/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.

  5. BoykoAlex commented on Nov 4, 2022

    @BoykoAlex
    Contributor

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

  6. BoykoAlex commented on Nov 4, 2022

    @BoykoAlex
    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?

  7. martinlippert commented on Nov 7, 2022

    @martinlippert
    MemberAuthor

    @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.

  8. BoykoAlex commented on Nov 7, 2022

    @BoykoAlex
    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

Metadata

Metadata

Assignees

Labels

for: eclipsetheme: refactoringtype: bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions