jakartaee / rest

Jakarta RESTful Web Services
Other
362 stars 117 forks source link

TCK Migration : Allow vendor specific deployment descriptors #1039

Closed alwin-joseph closed 2 years ago

alwin-joseph commented 2 years ago

This is in continuation to the discussion from https://github.com/eclipse-ee4j/jaxrs-api/pull/1031#discussion_r729248922

The implementations should be able to add their own vendor deployment descriptors that would be their equivalent of the sun-.xml deployment descriptors while running the TCK.

The 3 deployment descriptors present in jaxrs tck which need to be remapped are below :

jaxrs-tck/src/main/resources/jakarta/ws/rs/tck/ee/rs/container/requestcontext/security/jaxrs_ee_rs_container_requestcontext_security_web.war.sun-web.xml jaxrs-tck/src/main/resources/jakarta/ws/rs/tck/ee/rs/core/securitycontext/basic/jaxrs_ee_core_securitycontext_basic_web.ear.sun-application.xml jaxrs-tck/src/main/resources/jakarta/ws/rs/tck/ee/rs/core/securitycontext/basic/jaxrs_ee_core_securitycontext_basic_web.war.sun-web.xml

This affects 7 tests present in the REST TCK.

More details at https://github.com/eclipse-ee4j/jaxrs-api/pull/1031#discussion_r730926474

@scottmarlow @gurunrao

scottmarlow commented 2 years ago

@starksm64 FYI, this is the issue tracker for allowing vendor deployment descriptors to be specified with the new jaxrs TCK (e.g. likely via Arquillian Extension).

starksm64 commented 2 years ago

Thanks, I created a TCK Blocking Issues column in the EE10 project with this issue in it. https://github.com/eclipse-ee4j/jakartaee-platform/projects/5

scottmarlow commented 2 years ago

What are the best ways to integrate the Vendor specific deployment descriptors in?

Perhaps we could allow the user running the TCK to specify their integration jar and their (user) handling class name.

The (user) handling class could:

  1. User implements org.jboss.arquillian.core.spi.LoadableExtension in which case the TCK would have its own LoadableExtension implementation that when its register(ExtensionBuilder builder) is invoked, it in turn calls the user LoadableExtension allowing the user full access to register its own ExtensionBuilder so the user can solve whatever they need to (like adding additional vendor deployment descriptors before a test archive is deployed).
  2. User implements a TBD interface that contains methods for returning a set of (vendor specific) deployment descriptors java.io.File to be added to the specified test archive.
alwin-joseph commented 2 years ago

@jansupol suggested alternative solution here https://github.com/eclipse-ee4j/jaxrs-api/pull/1061#discussion_r752285950 . @scottmarlow what do you think ?

arjantijms commented 2 years ago

@alwin-joseph @scottmarlow

Arquillian has a standard SPI for this. It's org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor

The Arquillian based JWT TCK describes this as well. See: https://github.com/eclipse/microprofile-jwt-auth/blob/master/tck/README.adoc#creating-your-implementation-tck-harness-artifact

arjantijms commented 2 years ago

p.s. in the same org.jboss.arquillian.container.test.spi.client.deployment there's a few other SPIs that might be interesting as well.

alwin-joseph commented 2 years ago

Fixed by https://github.com/eclipse-ee4j/jaxrs-api/pull/1065 . Closing the issue

gurunrao commented 2 years ago

@starksm64 - issue can be moved to 'Done' at https://github.com/eclipse-ee4j/jakartaee-platform/projects/5