Skip to content
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

Arquillian: Add support for Jakarta EE 9 #71

Closed
brideck opened this issue Aug 3, 2020 · 12 comments
Closed

Arquillian: Add support for Jakarta EE 9 #71

brideck opened this issue Aug 3, 2020 · 12 comments

Comments

@brideck
Copy link
Member

brideck commented Aug 3, 2020

In doing early testing with the new Jakarta EE9-compatible versions of the CDI and Bean Validation TCKs, I've discovered that we need an updated version of liberty-arquillian to support running with EE9 technologies.

At a minimum, I've found the following so far:

  • Update relevant javax package references to jakarta.
  • Support Arquillian 1.7 and arquillian-protocol-servlet-jakarta by deploying applications to the new ArquillianServletRunnerEE9 URI.
  • Note: There will not be a version of the j2eeManagement feature compatible with EE9, so those code paths will not be used in an EE9 environment.
@cherylking cherylking added enhancement New feature or request Epic labels Aug 4, 2020
@yeekangc yeekangc changed the title Add support for Jakarta EE 9 Arquillian: Add support for Jakarta EE 9 Aug 4, 2020
@mbcapobia mbcapobia moved this from New to API in Open Liberty Roadmap Aug 10, 2020
@Azquelt
Copy link
Member

Azquelt commented Sep 30, 2020

If we can no longer rely on the j2eeManagement feature, we will need to find another way of getting information about the servlets which are deployed (doesn't have to be something from jakarta, just has to work on liberty in conjunction with EE9 features).

There are test cases which demonstrate what doesn't work when j2eeManagement is not present here: https://github.com/OpenLiberty/liberty-arquillian/tree/master/liberty-managed/src/test/java/io/openliberty/arquillian/managed/needsmanagementmbeans

It's mostly injection of URLs of servlets when multiple apps are deployed. I'm pretty sure we had to add it because there was a TCK test which depended on being able to do this.

Update: #1 indicates that it was needed to pass this CDI TCK test, which is still present in CDI 3.0 https://github.com/eclipse-ee4j/cdi-tck/blob/2.0.4.Final/impl/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/InterceptorEnvironmentJNDITest.java

@yeekangc
Copy link
Member

yeekangc commented Oct 1, 2020

@ericglau

@kathrynkodama
Copy link
Contributor

@kathrynkodama
Copy link
Contributor

kathrynkodama commented Nov 10, 2020

The design document has been updated to clarify the new major version release associated with this epic. See slide 15: https://ibm.box.com/s/fnnj1ot0gwvd7jilxk6mgjgs96ao9uw8

The changes are as follows:

  • The new 2.0.0 major release of Liberty Arquillian will use new artifact ids with a "jakarta" suffix: arquillian-liberty-managed-jakarta, arquillian-liberty-remote-jakarta, arquillian-liberty-support-jakarta
  • Any maintenance to the 1.x release will continue to be published under the existing artifact id, ex. arquillian-liberty-managed
  • The corresponding Liberty Arquillian Dependencies bundles will be updated to match the new artifact ids: arquillian-liberty-managed-jakarta-junit, arquillian-liberty-managed-jakarta-testng, arquililan-liberty-remote-jakarta-junit, arquillian-liberty-remote-jakarta-testng

@hantsy
Copy link

hantsy commented Nov 16, 2020

As I know, Arquillian 1.7.0.Alpha5 added JUnit 5 support.

Hope this update is aligned with JUnit 5 and Jakarata Servlet 5.0 protocol.

I have updated my sample codes, and test Arquillian 1.7, JUnit 5, Arquillian Glassfish Container for GF v6, hantsy/jakartaee9-starter-boilerplate#40

@kathrynkodama
Copy link
Contributor

Thank you @hantsy, we will be updating to Arquillian 1.7.0.Alpha5 which will align us with JUnit 5 and the Jakarta Servlet 5.0 protocol.

@hantsy
Copy link

hantsy commented Nov 30, 2020

@kathrynkodama

I noticed a milestone version of Arquillian open liberty for Jakarta EE 9 is published. I am trying to update my Jakarta EE 9 starter sample and adding liberty aruqillian back. But I encountered an issue with Rest API testing, I can not find a public CXF version for the Jakarta EE 9, I am not sure if OpenLiberty(Jakarta ee 9) is still using CXF as the JaxRS implementation.

In the former Jakarta EE 8 version, I added CXF JaxRS deps in the test classpath to make it work.

@kathrynkodama
Copy link
Contributor

@hantsy

I noticed in your it-with-arq-liberty-managed a feature definition could not be found for localConnector-1.0. Currently, the localConnector-1.0 feature is not included in the Open Liberty Jakarta EE 9 beta package.
If you use the all beta features package: https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/beta/2020-11-11_0736/openliberty-21.0.0.1-beta.zip the localConnector-1.0 feature should be resolved.

As for the JAX-RS failures, I believe it may be because JAX-RS is not yet included in the Open Liberty Jakarta EE 9 beta features:
https://openliberty.io/blog/2020/11/24/microprofile-rest-client-kubernetes-secrets-21001beta.html#jakarta

@hantsy
Copy link

hantsy commented Dec 1, 2020

@kathrynkodama Thanks.

  1. Switch to use artifactId openliberty-runtime in the arq-liberty-managed profile.
  2. OpenLiberty 21.0.0.0.beta should have included Jaxrs(my application is deployed successfully in this same OpenLiberty version), but I looked in the restulWS-xxx.mf, and the jars in the lib folder, and found the following jars.
io.openliberty.org.jboss.resteasy.common.jakarta_1.0.47.jar
io.openliberty.org.jboss.resteasy.jaxb.provider.jakarta_1.0.47.jar
io.openliberty.org.jboss.resteasy.server.jakarta_1.0.47.jar

It seems in this Jakarta EE 9 version, it switched to Resteasy(the JBoss/Wildfly implementation).

Unfortunately, I can not find a release version of Resteasy for Jakarta EE 9 now. WildFly 22 Jakarta EE preview itself used Eclipse transformer tooling to convert these jars.

@hantsy
Copy link

hantsy commented Dec 1, 2020

@kathrynkodama Use jersey Jaxrs client to get the tests passed. hantsy/jakartaee9-starter-boilerplate#54

@brideck
Copy link
Member Author

brideck commented Apr 19, 2021

@kathrynkodama With the release of 2.0.0, is this issue ready to be closed? Or is there more that needs to happen?

@kathrynkodama
Copy link
Contributor

@brideck With the release of 2.0.0, we can now close this issue. Thank you.

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

No branches or pull requests

10 participants