jakartaee / rest

Jakarta RESTful Web Services
Other
353 stars 114 forks source link

add dependencies to run tck independently #1102

Closed alwin-joseph closed 2 years ago

alwin-joseph commented 2 years ago

Adding dependency jars in jersey-tck/pom.xml to run the module independently. Requesting fast-track. @spericas @jansupol

alwin-joseph commented 2 years ago

I abstain from voting as I cannot judge the exact impact of the modifications. I likely would cast a +1 if there would be some brief explanation why these changes are needed.

Hi @mkarg , These 2 jars (jakarta.ws.rs-api and hamcrest) are certainly required for the tests to pass . We would need to use jersey-tck/ as an independent module to run the test. When api jars are available in staging/maven we will fetch from the remote location rather than by mvn install from this repo.

To clarify further, we will perform below steps to run the tck against jersey once all jars are released and available in maven repository:

-wget https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee10/staged/eftl/jakarta-restful-ws-tck-3.1.0.zip
-unzip jakarta-restful-ws-tck-3.1.0.zip
-mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=jakarta-restful-ws-tck-3.1.0.jar -DgroupId=jakarta.ws.rs -DartifactId=jakarta-restful-ws-tck -Dversion=3.1.0
-git clone https://github.com/jakartaee/rest
-mvn -f rest/jersey-tck/pom.xml verify (-Pstaging)
mkarg commented 2 years ago

I understand this, but I doubt that running jersey-tck as a standalone module is a target of JAX-RS. I invented jersey-tck just as an example how to use jaxrs-tck and used Jersey just by incident; also the target is to be able to do mvn -am -pl jersey-tck verify to test-drive the JAX-RS tck by the developers of the JAX-RS tck. This is not a replacement for Jersey's own driver. My actual target was (and this is written in the readme) that all vendors write (and publish) their own standalone module in their own repository. Hence I do not see why the JAX-RS repository should support your use case? It would be better if Jersey provides its own POM in its own repo that builds upon the jersey-tck module, instead of directly using it standalone.

chkal commented 2 years ago

Just for reference: eclipse-ee4j/jersey#5000

jansupol commented 2 years ago

The TCK always used to contain a setting that was preset to run the TCK against RI. We no longer have an RI, but keeping a pom to be able to run the standalone TCK against any CI (it does not be Jersey) would make sense to me. Any vendor could come and see how it is supposed to work.

Jakarta REST standalone TCK is a new concept (the tests are separated from the jakartaeetck repo), that is already used for JSON-P and JSON-B, too. To me it would make sense to contain similar information to JSON-P,B to run the TCKs to keep some uniformity level that helps vendors to run the TCK,

mkarg commented 2 years ago

Guys, remember that it actually was me who originally created the jersey-tck folder, so there is no need to speculate about the reason why I did that. ;-) The reason solely was still is like I described, and since there is not RI anymore, we should replace jersey-tck by demo-tck which is more like a common template (maybe a Maven BOM?) instead of a full standalone Jersey-specific application.