-
Notifications
You must be signed in to change notification settings - Fork 692
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TOMEE-4166 - Setup tck for JAX-RS (#1063)
* Add tck-mode flag to tomee embedded * Rename tck-mode flag * Add jax-rs tck * Cleanup poms and move jar files * Switch to a dependency of the tck instead of including all the files themselves. For now this is just the staging dependency. * Revert import changes to Container.java and only include the tomee.embedded.tck.enable_tracing * Implement changes proposed by @rzo1 * Fix <snapshots> tag * Some minor changes regarding groupid and tomee version (to allow easy upgrades by mvn release plugin) * Align servlet_adaptor with openejb class from tomee-tck * No need to build a jar or attach sources * Disable fail-on-constrainedto * Fix JAXRSClientIT and JAXRSBasicClientIT Tests * add comments to arquillian.xml * Add a module that generates the signature-file for JAX-RS. * Add licence header * Remove jakarta.staging.repo as a custom repository, as the dependencies we need from there are now in maven central. * Fix Version of tcks * Upgrade Jax-RS Versions to 4.1.0-SNAPSHOT * Fix tcks after merge * Raise baseline to 17 (necessary for JAX-RS) * TOMEE-4318 | TOMEE-4317 - ActiveMQ 6 + Java 17 (#1120) * TOMEE-4317 - ActiveMQ 6.1.0 Drop related shades. * Switch Java Level to 17 * Migrate V11 to V17 class constant in jwt tests * Adds --add-opens for legacy code fragements with libraries not supporting J17+ * Bump maven-plugin-plugin version * Add ScriptEngine implementation for js on Java 15+ * Add ScriptEngine implementation for js in tomee-embedded-maven-plugin as well * Add ScriptEngine implementation for js on Java 15+ * Upgrade Mockito to make it work under J17+ env * Exclude bean validaiton tck tests from "org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion.*" as they seem to be broken in BVAL itself with Java 17 * Update GH actions to run with Java 17 * Fix review comments --------- Co-authored-by: Markus Jung <[email protected]> * TOMEE-4319 - CXF 4.1.0-SNAPSHOT * Add tck-mode flag to tomee embedded * Rename tck-mode flag * Add jax-rs tck * Cleanup poms and move jar files * Switch to a dependency of the tck instead of including all the files themselves. For now this is just the staging dependency. * Revert import changes to Container.java and only include the tomee.embedded.tck.enable_tracing * Implement changes proposed by @rzo1 * Fix <snapshots> tag * Some minor changes regarding groupid and tomee version (to allow easy upgrades by mvn release plugin) * Align servlet_adaptor with openejb class from tomee-tck * No need to build a jar or attach sources * Disable fail-on-constrainedto * Fix JAXRSClientIT and JAXRSBasicClientIT Tests * add comments to arquillian.xml * Add a module that generates the signature-file for JAX-RS. * Add licence header * Remove jakarta.staging.repo as a custom repository, as the dependencies we need from there are now in maven central. * Fix Version of tcks * Fix tcks after merge * Add some exclusions for SE-Related tests and disable the TomEE :: TCK :: JAX-RS Signature Test for now * Use latest TCK (3.1.4), Remove duplicate properties Fixes signature tests, which will fail with an odd error (nothing todo with the setup) * Move JAX-RS TCK into child modules in order to download latest 3.1.5 JAX-RS TCK via ant * Run JAX-RS TCK in remote arquillian mode * Exclude currently failing tests: TOMEE-4321 / CXF-9005 --------- Co-authored-by: Sollder1 <[email protected]> Co-authored-by: Swell <[email protected]> Co-authored-by: Richard Zowalla <[email protected]> Co-authored-by: Richard Zowalla <[email protected]> Co-authored-by: Markus Jung <[email protected]>
- Loading branch information
1 parent
efac1f7
commit cf0011b
Showing
12 changed files
with
840 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
VERSION="$1" | ||
|
||
# jar | ||
mvn org.apache.maven.plugins:maven-install-plugin:3.1.0:install-file \ | ||
-Dfile=target/jakarta-restful-ws-tck-"$VERSION".jar -DgroupId=jakarta.ws.rs \ | ||
-DartifactId=jakarta-restful-ws-tck -Dversion="$VERSION" -Dpackaging=jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.tomee</groupId> | ||
<artifactId>jax-rs</artifactId> | ||
<version>10.0.0-M2-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>jax-rs-signature-test</artifactId> | ||
<name>TomEE :: TCK :: JAX-RS TCK :: Signature Test</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>jakarta.ws.rs</groupId> | ||
<artifactId>jakarta-restful-ws-tck</artifactId> | ||
<version>${jaxrs.tck.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.netbeans.tools</groupId> | ||
<artifactId>sigtest-maven-plugin</artifactId> | ||
<version>1.6</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<testResources> | ||
<testResource> | ||
<directory>src/test/resources</directory> | ||
<filtering>true</filtering> | ||
</testResource> | ||
</testResources> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy</id> | ||
<phase>generate-test-resources</phase> | ||
<goals> | ||
<goal>copy</goal> | ||
</goals> | ||
|
||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>org.apache.tomee</groupId> | ||
<artifactId>jakartaee-api</artifactId> | ||
<version>${version.jakartaee-api}</version> | ||
<type>jar</type> | ||
<overWrite>true</overWrite> | ||
<outputDirectory>${project.build.directory}/signaturedirectory | ||
</outputDirectory> | ||
<destFileName>jakartaee-api.jar</destFileName> | ||
</artifactItem> | ||
</artifactItems> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<argLine> | ||
--add-opens java.base/java.lang=ALL-UNNAMED | ||
--add-opens java.base/java.io=ALL-UNNAMED | ||
--add-opens java.base/java.net=ALL-UNNAMED | ||
--add-opens java.base/javax.net.ssl=ALL-UNNAMED | ||
--add-opens java.xml/javax.xml.namespace=ALL-UNNAMED | ||
--add-opens java.base/java.util=ALL-UNNAMED | ||
--add-opens java.base/java.security=ALL-UNNAMED | ||
--add-opens java.base/java.util.concurrent=ALL-UNNAMED | ||
</argLine> | ||
<reuseForks>false</reuseForks> | ||
<forkCount>1</forkCount> | ||
<systemProperties> | ||
<jimage.dir>${project.build.directory}/jimage</jimage.dir> | ||
<signature.sigTestClasspath> | ||
${project.build.directory}/signaturedirectory/jakartaee-api.jar:${project.build.directory}/jimage/java.base:${project.build.directory}/jimage/java.rmi:${project.build.directory}/jimage/java.sql:${project.build.directory}/jimage/java.naming | ||
</signature.sigTestClasspath> | ||
</systemProperties> | ||
<dependenciesToScan> | ||
<dependency>jakarta.ws.rs:jakarta-restful-ws-tck</dependency> | ||
</dependenciesToScan> | ||
<includes> | ||
<include>**/JAXRSSigTestIT</include> | ||
</includes> | ||
<!-- | ||
For some odd reason, the signature test will fail in reflection mode run under J17 with the following error report. | ||
However, the fields are present. | ||
Note: It also fails with the original 3.1.0 artifact, so most likely a deeper issue to follow up. | ||
Missing Fields | ||
jakarta.ws.rs.core.Cookie: field public final static int jakarta.ws.rs.core.Cookie.DEFAULT_VERSION = 1 | ||
affected jakarta.ws.rs.core.NewCookie | ||
jakarta.ws.rs.core.NewCookie: field public final static int jakarta.ws.rs.core.NewCookie.DEFAULT_MAX_AGE = -1 | ||
Added Fields | ||
jakarta.ws.rs.core.Cookie: field public final static int jakarta.ws.rs.core.Cookie.DEFAULT_VERSION | ||
affected jakarta.ws.rs.core.NewCookie | ||
jakarta.ws.rs.core.NewCookie: field public final static int jakarta.ws.rs.core.NewCookie.DEFAULT_MAX_AGE | ||
duplicate messages suppressed: 2 | ||
--> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.tomee</groupId> | ||
<artifactId>jax-rs</artifactId> | ||
<version>10.0.0-M2-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>jax-rs-tests-embedded</artifactId> | ||
<packaging>jar</packaging> | ||
<name>TomEE :: TCK :: JAX-RS TCK :: Tests Embedded</name> | ||
|
||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>jakarta.ws.rs</groupId> | ||
<artifactId>jakarta-restful-ws-tck</artifactId> | ||
<version>${jaxrs.tck.version}</version> | ||
</dependency> | ||
|
||
<!-- Added for test--> | ||
<dependency> | ||
<groupId>org.junit</groupId> | ||
<artifactId>junit-bom</artifactId> | ||
<version>${junit.jupiter.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
|
||
<!-- Needed by some TCK tests: | ||
JsonbContextProviderIT.shouldUseApplicationProvidedJsonbInstance | ||
UriBuilderIT.shouldBuildValidInstanceFromScratch | ||
--> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-library</artifactId> | ||
<version>2.2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<!--Tomee-Deps:--> | ||
<!-- https://mvnrepository.com/artifact/org.apache.tomee/arquillian-tomee-remote --> | ||
<dependency> | ||
<groupId>org.apache.tomee</groupId> | ||
<artifactId>arquillian-tomee-embedded</artifactId> | ||
<version>${project.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.tomee</groupId> | ||
<artifactId>tomee-webservices</artifactId> | ||
<version>${project.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.tomee</groupId> | ||
<artifactId>tomee-jaxrs</artifactId> | ||
<version>${project.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<testResources> | ||
<testResource> | ||
<directory>src/test/resources</directory> | ||
<filtering>true</filtering> | ||
</testResource> | ||
</testResources> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<reuseForks>false</reuseForks> | ||
<forkCount>1</forkCount> | ||
<useFile>false</useFile> | ||
<disableXmlReport>false</disableXmlReport> | ||
|
||
<!--Hint: Default naming of surefire is not followed.--> | ||
<includes> | ||
<include>**/*.java</include> | ||
</includes> | ||
|
||
<excludes> | ||
<!-- | ||
SeBootstrap is stated as an optional component for containers. | ||
It is also only listed as a Java-SE Publication Mechanism in the Specification (2.3.1.2). | ||
Therefore, we exclude its IT. | ||
--> | ||
<exclude>**/SeBootstrapIT.java</exclude> | ||
<!-- We have an own module for signature-Tests--> | ||
<exclude>**/JAXRSSigTestIT.java</exclude> | ||
|
||
<!-- TODO: TOMEE-4321 / CXF-9005 | ||
ee.jakarta.tck.ws.rs.jaxrs31.spec.extensions.JAXRSClientIT#featureIsRegisteredTest | ||
ee.jakarta.tck.ws.rs.jaxrs31.spec.extensions.JAXRSClientIT#dynamicFeatureIsRegisteredTest | ||
ee.jakarta.tck.ws.rs.spec.contextprovider.JsonbContextProviderIT#shouldUseApplicationProvidedJsonbInstance | ||
--> | ||
<exclude>**/JAXRSClientIT.java</exclude> | ||
<exclude>**/JsonbContextProviderIT.java</exclude> | ||
</excludes> | ||
|
||
<dependenciesToScan> | ||
<dependency>jakarta.ws.rs:jakarta-restful-ws-tck</dependency> | ||
</dependenciesToScan> | ||
|
||
<systemPropertyVariables> | ||
<servlet_adaptor>org.apache.openejb.server.rest.OpenEJBRestServlet</servlet_adaptor> | ||
<webServerHost>localhost</webServerHost> | ||
<webServerPort>8080</webServerPort> | ||
<porting.ts.url.class.1>ee.jakarta.tck.ws.rs.lib.implementation.sun.common.SunRIURL | ||
</porting.ts.url.class.1> | ||
<org.apache.cxf.transport.http.forceURLConnection>true | ||
</org.apache.cxf.transport.http.forceURLConnection> | ||
<openejb.jaxrs.fail-on-constrainedto>false</openejb.jaxrs.fail-on-constrainedto> | ||
<tomee.embedded.tck.enable_tracing>true</tomee.embedded.tck.enable_tracing> | ||
<user>j2ee</user> | ||
<password>j2ee</password> | ||
<authuser>javajoe</authuser> | ||
<authpassword>javajoe</authpassword> | ||
</systemPropertyVariables> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
38 changes: 38 additions & 0 deletions
38
tck/jax-rs/jax-rs-tests-embedded/src/test/resources/arquillian.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<arquillian xmlns="http://jboss.org/schema/arquillian" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation=" | ||
http://jboss.org/schema/arquillian | ||
http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> | ||
<container qualifier="tomee-embedded" default="true"> | ||
<configuration> | ||
<!--Defines the users with their passwords. Syntax: <username>=<password>--> | ||
<property name="users"> | ||
javajoe=javajoe | ||
j2ee=j2ee | ||
</property> | ||
<!--Assigns roles to users, multiple definitions per user are allowed and compounded. Syntax: <username>=<role>--> | ||
<property name="roles"> | ||
javajoe=OTHERROLE | ||
j2ee=DIRECTOR | ||
</property> | ||
</configuration> | ||
</container> | ||
</arquillian> |
Oops, something went wrong.