Skip to content

Conversation

sgartner03
Copy link
Contributor

What's changed?

Recipe "org.openrewrite.java.migrate.jakarta.JavaxInjectMigrationToJakartaInject"

Before the PR, this Recipe only migrated javax.inject:javax.inject-api to jakarta.inject:jakarta.inject-api.
I've added the migration javax.inject:javax.inject to jakarta.inject:jakarta.inject-api.

What's your motivation?

Our customers commonly use javax.inject:javax.inject, not javax.inject-api. According to https://mvnrepository.com/artifact/javax.inject/javax.inject, this artifact got moved to javax.inject-api anyways. I've added the migration, in order to have this dependency changed as well when running org.openrewrite.java.migrate.jakarta.JakartaEE10.

Have you considered any alternatives or workarounds?

Adding the ChangeDependency reference to my own composite recipe instead of adding it to org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta. I prefer contributing it, because it seems like a possible case for others to have.

Any additional context

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@timtebeek timtebeek added enhancement New feature or request recipe Recipe requested labels Jul 15, 2024
Copy link
Member

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the report through a PR here @sgartner03 ! I've slightly polished the test and with that we're ready to merge.

@timtebeek timtebeek merged commit 6309fee into openrewrite:main Jul 15, 2024
@timtebeek
Copy link
Member

We just did a release today; the next one is then typically two weeks away; Until then you can use our snapshot versions.

@sgartner03
Copy link
Contributor Author

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request recipe Recipe requested

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants