Skip to content

Avoid adding org.jspecify:jspecify when running MigrateFromSpringFrameworkAnnotations #757

@scordio

Description

@scordio

What problem are you trying to solve?

When running the Migrate from Spring Framework annotations to JSpecify recipe on a Spring-based project, OpenRewrite adds the org.jspecify:jspecify dependency.

As this is already included transitively by the Spring Core module, the explicit declaration is not required in the project running the recipe.

Describe the solution you'd like

Ideally, after the recipe runs, there should be no new JSpecify dependency added to the build configuration, regardless of whether it's Maven or Gradle.

Have you considered any alternatives or workarounds?

Yes: inspect all build configurations manually after recipe execution and delete the newly introduced dependency.

Additional context

This was spotted during the work at spring-projects/spring-batch@d519849.

Are you interested in contributing this feature to OpenRewrite?

If the project agrees to this change, I'd be happy to contribute! 🙂


Relates to:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions