diff --git a/tck/jsonb-signature-test/pom.xml b/tck/jsonb-signature-test/pom.xml new file mode 100644 index 00000000000..e35d9d82627 --- /dev/null +++ b/tck/jsonb-signature-test/pom.xml @@ -0,0 +1,135 @@ + + + + + tck + org.apache.tomee + 10.0.0-M1-SNAPSHOT + + + 4.0.0 + jsonb-signature-test + TomEE :: TCK :: JSON-B Signature Tests + + + + org.apache.johnzon + johnzon-core + + + org.apache.johnzon + johnzon-mapper + + + org.apache.johnzon + johnzon-jsonb + + + + org.apache.tomee + jakartaee-api + + + + jakarta.json.bind + jakarta.json.bind-tck + ${jsonb-tck.version} + test + + + + org.apache.openwebbeans + openwebbeans-se + ${version.openwebbeans} + + + org.apache.openwebbeans + openwebbeans-impl + + + org.apache.openwebbeans + openwebbeans-spi + + + + org.netbeans.tools + sigtest-maven-plugin + 1.6 + test + + + + + + + src/test/resources + true + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy + generate-test-resources + + copy + + + + + + org.apache.tomee + jakartaee-api + ${version.jakartaee-api} + jar + true + ${project.build.directory}/signaturedirectory + jakartaee-api.jar + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${surefire.version} + + false + 1 + + jakarta.json.bind:jakarta.json.bind-tck + + + **/JSONBSigTest + + + ${project.build.directory}/jimage + ${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 + + + + + + + + \ No newline at end of file diff --git a/tck/jsonb-standalone/pom.xml b/tck/jsonb-standalone/pom.xml new file mode 100644 index 00000000000..02380f1a1cb --- /dev/null +++ b/tck/jsonb-standalone/pom.xml @@ -0,0 +1,121 @@ + + + + + tck + org.apache.tomee + 10.0.0-M1-SNAPSHOT + + + 4.0.0 + jsonb-standalone + TomEE :: TCK :: JSON-B Standalone + + + + org.apache.johnzon + johnzon-core + + + org.apache.johnzon + johnzon-mapper + + + org.apache.johnzon + johnzon-jsonb + + + + org.apache.tomee + jakartaee-api + + + + jakarta.json.bind + jakarta.json.bind-tck + ${jsonb-tck.version} + test + + + org.apache.openwebbeans + openwebbeans-se + ${version.openwebbeans} + + + org.apache.openwebbeans + openwebbeans-impl + + + org.apache.openwebbeans + openwebbeans-spi + + + org.apache.xbean + xbean-finder-shaded + + + + + + + src/test/resources + true + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + org.apache.maven.plugins + maven-surefire-plugin + ${surefire.version} + + false + 1 + + jakarta.json.bind:jakarta.json.bind-tck + + + + + **/SerializersCustomizationCDITest + + + **/AnnotationTypeInfoTest + + **/JSONBSigTest + + + + + false + false + + + COMPAT + + -Duser.language=en -Duser.region=US + + + + + + \ No newline at end of file diff --git a/tck/jsonb-standalone/src/test/java/org/apache/tomee/jsonb/tck/TomEEOwbCDIProvider.java b/tck/jsonb-standalone/src/test/java/org/apache/tomee/jsonb/tck/TomEEOwbCDIProvider.java new file mode 100644 index 00000000000..17c491c7cf0 --- /dev/null +++ b/tck/jsonb-standalone/src/test/java/org/apache/tomee/jsonb/tck/TomEEOwbCDIProvider.java @@ -0,0 +1,34 @@ +/* + * 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. + */ +package org.apache.tomee.jsonb.tck; + +import jakarta.enterprise.inject.spi.CDI; +import org.apache.webbeans.container.OwbCDIProvider; + +// CDI Integration TCKs rely on undefined CDI behaviour: they expect that calling CDI.current() throws an Exception when CDI is not started +// OWB doesn't do that, so we try to achieve this here as a workaround by calling CDI#getBeanManager before returning CDI +public class TomEEOwbCDIProvider extends OwbCDIProvider { + @Override + public CDI getCDI() { + CDI cdi = super.getCDI(); + cdi.getBeanManager(); + + return cdi; + } +} \ No newline at end of file diff --git a/tck/jsonb-standalone/src/test/resources/META-INF/services/jakarta.enterprise.inject.spi.CDIProvider b/tck/jsonb-standalone/src/test/resources/META-INF/services/jakarta.enterprise.inject.spi.CDIProvider new file mode 100644 index 00000000000..2e9b93bd152 --- /dev/null +++ b/tck/jsonb-standalone/src/test/resources/META-INF/services/jakarta.enterprise.inject.spi.CDIProvider @@ -0,0 +1 @@ +org.apache.tomee.jsonb.tck.TomEEOwbCDIProvider \ No newline at end of file diff --git a/tck/pom.xml b/tck/pom.xml index 7bc3dc6c0b3..c744733bd63 100644 --- a/tck/pom.xml +++ b/tck/pom.xml @@ -29,6 +29,8 @@ 4.0.11 3.0.1 + 3.0.0 + 2.1.1 org.apache.bval.jsr.ApacheValidationProvider @@ -43,6 +45,8 @@ bval-signature-test jsonp-standalone jsonp-signature-test + jsonb-standalone + jsonb-signature-test microprofile-tck