-
Notifications
You must be signed in to change notification settings - Fork 823
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
New Jersey 3 module #6582
base: master
Are you sure you want to change the base?
New Jersey 3 module #6582
Conversation
This will brake Java EE/Jakarta EE 8 and prior projects, maybe add another Library called Jersey 3.x.y? |
I haven't checked for what this is used for internally, but if its just a lib wrapper for ant projects (I have the suspicion it is more than that), i would update it to the latest javax release and leave it there. |
Can we ship two Jersey versions without having conflicts? |
At some point we will have to upgrade to Jersey 3. Not sure if it's the right moment to do so. |
You can have different versions of the same library, check the Ant Library, there are different versions for JSF and Spring: I agree with @mbien, we should update it to the latest 2.x version. |
Ok, my take on this is: a) jersey is broken because it relies on autodetection of features and does not protect against classes it can't load For "REST Client" I think the solution is trivial ( private void buildClient(boolean verifySslCertificates) {
ClientConfig config = new ClientConfig()
.connectorProvider(new ApacheConnectorProvider())
.property(ClientProperties.CONNECT_TIMEOUT, 20000)
.property(ClientProperties.FOLLOW_REDIRECTS, true)
.property(CommonProperties.FEATURE_AUTO_DISCOVERY_DISABLE, true)
.property(JsonGenerator.PRETTY_PRINTING, true)
.register(new LoggingFeature(logger, Level.INFO, LoggingFeature.Verbosity.HEADERS_ONLY, 8192));
client = verifySslCertificates
? ClientBuilder.newBuilder().withConfig(config).build()
: ClientBuilder.newBuilder().sslContext(getSslContext()).withConfig(config).build();
} I checked the "Oracle Cloud Integration" module and it depends on the exported classes to be Jersey 2, this looks like a harder problem. |
[...]
Understood. Thanks for making it clear. |
[...] I have tested it and it works. Thanks a lot!
At least the solution you have posted works for user contributed plugins. |
2e78ab3
to
1389312
Compare
I have created a module for Jersey 3 to avoid conflicts with Jersey 2. It is based on websvc.restlib. |
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 unlocked CI to check if its happy with the new module. Please update PR title and text to reflect the changed goal of this PR.
I have updated the PR title and text from the first comment |
thanks! all tests were green, removing the label again for subsequent updates. |
I have upgraded Jersey from 2.35 to 3.1.3. Related dependencies were upgraded and references to javax were switched to jakarta as well.I have created a new module for Jersey 3 so that both Jersey 2 and 3 can co-exist.