-
Notifications
You must be signed in to change notification settings - Fork 101
JavaxWsToJakartaWs recipe does not add jakarta.ws.rs-api when upgrading from JavaEE 8 to JavaEE 9 #723
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
JavaxWsToJakartaWs recipe does not add jakarta.ws.rs-api when upgrading from JavaEE 8 to JavaEE 9 #723
Conversation
groupId: jakarta.ws.rs | ||
artifactId: jakarta.ws.rs-api | ||
version: 3.0.x | ||
onlyIfUsing: javax.ws.rs.core.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using javax.ws.rs.*
does not seem to pass the relevant test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine doing it like this then!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- src/main/resources/META-INF/rewrite/examples.yml
- lines 3282-3281
- lines 3328-3346
src/test/java/org/openrewrite/java/migrate/jakarta/JavaxWsToJakartaWsTest.java
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/migrate/jakarta/JavaxWsToJakartaWsTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
src/test/java/org/openrewrite/java/migrate/jakarta/JavaxWsToJakartaWsTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- src/main/resources/META-INF/rewrite/examples.yml
- lines 3282-3281
- lines 3328-3346
What's changed?
The declarative recipe
JavaxWsToJakartaWs
.What's your motivation?
The dependency
javax.javaee-api:8.0
contains the classes fromjavax.ws.rs.*
. When migrating from JavaEE 8 to JavaEE 9, those class has been removed. The replacement package isjakarta.ws.rs.*
which is not part of the JavaEE 9 dependency. It needs to be provided by another dependencyjakarta.ws.rs:jakarta.ws.rs-api
.The recipe in charge for this switch, org.openrewrite.java.migrate.jakarta.JavaxWsToJakartaWs, does not take into account that the dependency does not exist yet. It will force the end user to declare the dependency manually. The recipe should take care of adding the dependency as well if it doesn't exist.
Anything in particular you'd like reviewers to focus on?
No
Anyone you would like to review specifically?
No
Have you considered any alternatives or workarounds?
No