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
Migrate to Jakarta EE APIs #1510
Comments
Jakarta 9.0 is available now for a year and wonder when rest assured will meet jakataee 9 and java 17? |
As the issue has been opened some days ago now - it would be great to hear something about the teams plans upon this topic. We are using restassured everywhere on our platform currently in conjunction with Spring Boot 2. We are really looking forward on using Spring Boot 3, especially because of JDK-17 and the native stuff coming. We are very pleased with @wilkinsona What consequences will we face if we upgrade to Spring Boot 3 without having |
That's really a question for the REST Assured team if you want a definitive answer. As far as I could tell, JAX-B is a required dependency and REST Assured fails fairly fundamentally if the |
This is to workaround RestAssured's dependency on Jakarta EE 8 [1]. See rest-assured/rest-assured#1510.
This is to workaround RestAssured's dependency on Jakarta EE 8 [1]. See rest-assured/rest-assured#1510.
This is to workaround RestAssured's dependency on Jakarta EE 8 [1]. See rest-assured/rest-assured#1510.
This is to workaround RestAssured's dependency on Jakarta EE 8 [1]. See rest-assured/rest-assured#1510.
This is to workaround RestAssured's dependency on Jakarta EE 8. See rest-assured/rest-assured#1510.
This is to workaround RestAssured's dependency on Jakarta EE 8. See rest-assured/rest-assured#1510.
This is to workaround RestAssured's dependency on Jakarta EE 8. See rest-assured/rest-assured#1510.
This is to workaround RestAssured's dependency on Jakarta EE 8. See rest-assured/rest-assured#1510.
This is to workaround RestAssured's dependency on Jakarta EE 8. See rest-assured/rest-assured#1510.
I'll look into this and see if I can make any progress. |
Can you still use Java 8 with the jakarta API? |
Yes. Jakarta EE 9 supports Java 8. 9.1 adds support for Java 11 while retaining support for Java 8. |
@wilkinsona And do you think it'll be fine to use Jakarta EE 9 for rest assured for the time being? Maybe I should drop support for Java 8 in the future, but I'd like to wait a bit longer if possible. |
Requiring Jakarta EE 9 at this point is a pretty big jump. We're heading in that direction for Spring but our releases that make the jump aren't due until the end of this year. Even once they're out, we'll continue to support EE 8 for quite some time as we're anticipating lots of users sticking with EE 8. In short – and I know this isn't going to be easy – I think supporting both EE 8 and EE 9 is going to be necessary across the ecosystem for the next 24-36 months. To minimise that burden, I'd try to isolate yourself as much as possible from Jakarta EE and minimise your dependencies upon its APIs. Where you have to depend on it, try to make those dependencies optional. For example, if a REST API isn't doing anything with XML, perhaps REST Assured could avoid loading any JAX-B classes. |
Easier to keep 4.x.x in a separate maintenance branch for JAVA EE 8 and use a different branch(preferably master) for Jakarta 9.x.x. |
I'm not sure that doubling a project's maintenance burden is going to be easier, particularly when resources may be stretched pretty thin already. |
@wilkinsona Thank you for your explaination. I think that I'll try to make the dependency to jaxb optional. |
@wilkinsona Maybe you could clarify some more points and give me some additional tips if you don't mind? :) I'm in the process of making the JAXB dependency optional and I think that'll work. However, I have two questions:
|
I can't say for certain without being able to try it, but I would expect that for a large percentage of users this will be absolutely fine as they'll be working with JSON-based APIs and won't care about XML
Different projects have been approaching this in different ways:
I think 1 works well for a project, like Hibernate, that implements an EE API (JPA in this case). 2 seems to work well for a project that only consumes an EE API and may be a better fit for REST Assured, particularly if you can switch between javax JAX-B and Jakarta JAX-B at runtime depending on what's available on the classpath. |
@wilkinsona Thanks a lot for the clarification, this is really invaluable to me! When it comes to question number 1, I was mainly asking from a spring-boot perspective. Because I think Spring Boot has removed rest-assured in version 3 if I'm not mistaken. My goal is to get it back :) But I wonder what I need to do in order to get it back as a managed dependency by spring boot 3? Is it enough to remove the explicit JAXB dependency, or is jakarta ee required, or/and is it something else? If you don't know, do you know who I should talk to? |
We removed REST Assured support due to the hard dependency on JAX-B from EE 8. Once REST Assured can be used in an EE 9 environment (even if that means there's no XML support), we'll be more than happy to reinstate support for it. The same goes for Spring REST Docs from which REST Assured support has also been temporarily removed for the same reasons. |
@wilkinsona That's great! I would like to try to add support for EE 9 as well. How much time do I have? :) If it's a hurry, maybe I can do a release today and just remove the dependencies to EE 8. Otherwise, I probably have more time on Friday to also introduce (optional) support for EE 9. |
There's plenty of time. While Spring Boot 3.0.0-M1 is scheduled for this Thursday, we're quite comfortable with releasing it without REST Assured support. We know that Jakarta EE 9 support across the ecosystem is going to take a while which is, in part, why we're having a longer development cycle for 3.0.0 (almost 12 months) and it won't GA until November 2022. The dates for 3.0's milestones are on GitHub. They're every two months until M5 in September and then there's an RC in October before GA in November. That's the current plan anyway. |
@wilkinsona Thanks again for all your feedback and for responding so fast. Unfortunatley I ran into an issue with Intellij (https://youtrack.jetbrains.com/issue/IDEA-286871) and currently I can't even compile REST Assured so I have to use Sublime which is suboptimal. But regardless of EE 9 or not, I still want to make a new release as soon as I can, it's long overdue. |
Spring Cloud contract has a hard dependency. We release a week after boot, if that could be possible, we would appreciate it |
@spencergibb Thanks for letting me know! I'll try my very best to release a new version this friday! |
@spencergibb Or do you mean I should try to create a release sooner (before Thursday?) |
@johanhaleby I did not encounter this problem with Maven 3.8.4, Java 8 (1.8.0_312 Amazon Corretto) when activating the following option to use Maven instead IntelliJ to build the project: |
Friday is fine |
@thetric That works for me too! It's not optimal, but at least now I can work in Intellij. Thanks a lot! |
Thanks very much for this, @johanhaleby. I've reinstated support for REST Assured in Spring REST Docs and Spring Boot. It's available in their 3.0.0-SNAPSHOTs and will be in their 3.0.0-M2 releases in March. |
Just wanted to drop a note to thank you all for your efforts. Spring and REST Assured are both invaluable tools for us, and your efforts are greatly appreciated! |
This is to workaround RestAssured's dependency on Jakarta EE 8. See rest-assured/rest-assured#1510.
This is to workaround RestAssured's dependency on Jakarta EE 8. See rest-assured/rest-assured#1510.
This is to workaround RestAssured's dependency on Jakarta EE 8. See rest-assured/rest-assured#1510.
This is to workaround RestAssured's dependency on Jakarta EE 8. See rest-assured/rest-assured#1510.
Hi there,
is there a roadmap to migrate rest-assured to Jakarta EE APIs? For example the Spring Framework is planning to migrate in the next year:
More information from the Eclipse Foundation: https://www.eclipse.org/community/eclipse_newsletter/2020/november/1.php
The text was updated successfully, but these errors were encountered: