Added support for javax.inject #513
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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