You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bval.apache.org by jl...@apache.org on 2022/06/02 08:36:39 UTC

[bval] 01/01: Add Jakarta TCK

This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch tck-jakarta
in repository https://gitbox.apache.org/repos/asf/bval.git

commit c7e057b860d0419cb78134f5aac34fee8d0f851b
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Thu Jun 2 10:36:29 2022 +0200

    Add Jakarta TCK
---
 bval-tck-jakarta/pom.xml                           | 316 +++++++++++++++++++++
 .../bval/arquillian/BValArquillianExtension.java   |  55 ++++
 .../org/apache/bval/arquillian/EJBEnricher.java    |  60 ++++
 .../apache/bval/arquillian/LogTckFormatter.java    |  41 +++
 .../bval/arquillian/jndi/BValJndiFactory.java      |  55 ++++
 ...org.jboss.arquillian.core.spi.LoadableExtension |   1 +
 .../src/main/resources/jndi.properties             |  17 ++
 .../src/test/beanvalidation-tck-tests-suite.xml    |  36 +++
 bval-tck-jakarta/src/test/resources/arquillian.xml |  28 ++
 .../src/test/resources/logging.properties          |  21 ++
 bval-tck-jakarta/work-tests-suite.xml              |  31 ++
 pom.xml                                            |   1 +
 12 files changed, 662 insertions(+)

diff --git a/bval-tck-jakarta/pom.xml b/bval-tck-jakarta/pom.xml
new file mode 100644
index 0000000..0ad1293
--- /dev/null
+++ b/bval-tck-jakarta/pom.xml
@@ -0,0 +1,316 @@
+<?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.bval</groupId>
+        <artifactId>bval-parent</artifactId>
+        <version>2.0.6-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>bval-tck-jakarta-runner</artifactId>
+    <name>Apache BVal :: bval-tck-jakarta (Jakarta TCK Runner)</name>
+    <description>Aggregates dependencies and runs the JSR-380 TCK with Jakarta Bean Validation 3.0</description>
+
+    <properties>
+        <tck.version>3.0.0</tck.version>
+        <owb.version>2.0.27-SNAPSHOT</owb.version>
+        <arquillian.version>1.7.0.Alpha10</arquillian.version>
+        <validation.provider>org.apache.bval.jsr.ApacheValidationProvider</validation.provider>
+        <tomcat-jakarta.version>10.0.21</tomcat-jakarta.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>jakarta.validation</groupId>
+            <artifactId>jakarta.validation-api</artifactId>
+            <version>3.0.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.inject</groupId>
+            <artifactId>jakarta.inject-api</artifactId>
+            <version>2.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.enterprise</groupId>
+            <artifactId>jakarta.enterprise.cdi-api</artifactId>
+            <version>3.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.annotation</groupId>
+            <artifactId>jakarta.annotation-api</artifactId>
+            <version>2.1.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.interceptor</groupId>
+            <artifactId>jakarta.interceptor-api</artifactId>
+            <version>2.1.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.ejb</groupId>
+            <artifactId>jakarta.ejb-api</artifactId>
+            <version>4.0.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-el-api</artifactId>
+            <version>${tomcat-jakarta.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.bval</groupId>
+            <artifactId>bval-jsr</artifactId>
+            <version>${project.version}</version>
+            <classifier>jakarta</classifier>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.commons</groupId>
+                    <artifactId>commons-lang3</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.arquillian.container</groupId>
+            <artifactId>arquillian-container-test-spi</artifactId>
+            <version>${arquillian.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openwebbeans.arquillian</groupId>
+            <artifactId>owb-arquillian-standalone</artifactId>
+            <version>${owb.version}</version>
+            <classifier>jakarta</classifier>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.openwebbeans</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-spi</artifactId>
+            <version>${owb.version}</version>
+            <classifier>jakarta</classifier>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.openwebbeans</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-impl</artifactId>
+            <version>${owb.version}</version>
+            <classifier>jakarta</classifier>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.openwebbeans</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-jasper-el</artifactId>
+            <version>${tomcat-jakarta.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.validation</groupId>
+            <artifactId>beanvalidation-tck-tests</artifactId>
+            <version>${tck.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>jakarta.validation</groupId>
+                    <artifactId>validation-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.arquillian.testng</groupId>
+            <artifactId>arquillian-testng-container</artifactId>
+            <version>${arquillian.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.arquillian.protocol</groupId>
+            <artifactId>arquillian-protocol-servlet-jakarta</artifactId>
+            <version>${arquillian.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <version>6.8.21</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.xml.bind</groupId>
+            <artifactId>jakarta.xml.bind-api</artifactId>
+            <version>4.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jaxb</groupId>
+            <artifactId>jaxb-runtime</artifactId>
+            <version>4.0.0-M4</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.openjfx</groupId>
+            <artifactId>javafx-base</artifactId>
+            <version>11</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <profiles>
+        <profile>
+            <id>tck</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+                <property>
+                    <name>tck</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-deploy-plugin</artifactId>
+                        <configuration>
+                            <skip>true</skip>
+                        </configuration>
+                    </plugin>
+
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <argLine>-Duser.language=en</argLine>
+                            <suiteXmlFiles>
+                                <suiteXmlFile>${basedir}/src/test/beanvalidation-tck-tests-suite.xml</suiteXmlFile>
+                            </suiteXmlFiles>
+                            <systemProperties>
+                                <property>
+                                    <name>validation.provider</name>
+                                    <value>${validation.provider}</value>
+                                </property>
+                                <property>
+                                    <name>includeJavaFXTests</name>
+                                    <value>true</value>
+                                </property>
+                                <property>
+                                    <name>java.util.logging.config.file</name>
+                                    <value>${project.basedir}/src/test/resources/logging.properties</value>
+                                </property>
+                            </systemProperties>
+                            <parallel>methods</parallel>
+                            <threadCount>4</threadCount>
+                        </configuration>
+                    </plugin>
+
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-report-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>generate-test-report</id>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>report-only</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
+                            <outputName>test-report</outputName>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>sigtest</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>extract-sigsfile</id>
+                                <phase>generate-test-sources</phase>
+                                <goals>
+                                    <goal>unpack</goal>
+                                </goals>
+                                <configuration>
+                                    <artifactItems>
+                                        <artifactItem>
+                                            <groupId>jakarta.validation</groupId>
+                                            <artifactId>beanvalidation-tck-tests</artifactId>
+                                            <version>${tck.version}</version>
+                                        </artifactItem>
+                                    </artifactItems>
+                                    <includes>**/*.sig</includes>
+                                    <outputDirectory>${project.build.directory}/api-signature</outputDirectory>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.netbeans.tools</groupId>
+                        <artifactId>sigtest-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>sigtest</id>
+                                <phase>test</phase>
+                                <goals>
+                                   <goal>check</goal>
+                                </goals>
+                                <configuration>
+                                    <packages>jakarta.validation,jakarta.validation.bootstrap,jakarta.validation.constraints,
+                                        jakarta.validation.constraintvalidation,jakarta.validation.executable,jakarta.validation.groups,
+                                        jakarta.validation.metadata,jakarta.validation.spi,jakarta.validation.valueextraction
+                                    </packages>
+                                    <sigfile>${project.build.directory}/api-signature/validation-api-java8.sig</sigfile>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/bval-tck-jakarta/src/main/java/org/apache/bval/arquillian/BValArquillianExtension.java b/bval-tck-jakarta/src/main/java/org/apache/bval/arquillian/BValArquillianExtension.java
new file mode 100644
index 0000000..9ac445f
--- /dev/null
+++ b/bval-tck-jakarta/src/main/java/org/apache/bval/arquillian/BValArquillianExtension.java
@@ -0,0 +1,55 @@
+/*
+ * 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.bval.arquillian;
+
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.logging.Logger;
+
+import org.jboss.arquillian.core.api.annotation.Observes;
+import org.jboss.arquillian.core.spi.LoadableExtension;
+import org.jboss.arquillian.test.spi.TestClass;
+import org.jboss.arquillian.test.spi.TestEnricher;
+import org.jboss.arquillian.test.spi.event.suite.AfterClass;
+import org.jboss.arquillian.test.spi.event.suite.BeforeClass;
+
+public class BValArquillianExtension implements LoadableExtension {
+    public void register(final ExtensionBuilder builder) {
+        builder.service(TestEnricher.class, EJBEnricher.class).observer(TestLogger.class);
+    }
+
+    public static class TestLogger {
+
+        private static final Logger LOGGER = Logger.getLogger(TestLogger.class.getName());
+        private static final AtomicInteger COUNTER = new AtomicInteger(1);
+
+        public void before(@Observes final BeforeClass beforeClass) {
+            LOGGER.info(() -> COUNTER.getAndIncrement() + "/Launching " + toName(beforeClass.getTestClass()));
+        }
+
+        public void after(@Observes final AfterClass beforeClass) {
+            LOGGER.info(() -> "Executed " + toName(beforeClass.getTestClass()));
+        }
+
+        private String toName(final TestClass testClass) {
+            return testClass.getJavaClass()
+                            .getName()
+                            .replace("org.hibernate.beanvalidation.tck.tests.", "o.h.b.t.t.");
+        }
+    }
+}
diff --git a/bval-tck-jakarta/src/main/java/org/apache/bval/arquillian/EJBEnricher.java b/bval-tck-jakarta/src/main/java/org/apache/bval/arquillian/EJBEnricher.java
new file mode 100644
index 0000000..85a4d32
--- /dev/null
+++ b/bval-tck-jakarta/src/main/java/org/apache/bval/arquillian/EJBEnricher.java
@@ -0,0 +1,60 @@
+/*
+ * 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.bval.arquillian;
+
+import org.jboss.arquillian.test.spi.TestEnricher;
+
+import jakarta.annotation.Resource;
+import jakarta.ejb.EJB;
+import jakarta.validation.Validation;
+import jakarta.validation.Validator;
+import jakarta.validation.ValidatorFactory;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+// mock a very very simple EJB container (in fact only local bean @Resource Validator* injections)
+public class EJBEnricher implements TestEnricher {
+    public void enrich(final Object testCase) {
+        for (final Field field : testCase.getClass().getDeclaredFields()) {
+            if (field.getAnnotation(EJB.class) != null) {
+                try {
+                    final Object instance = field.getType().getConstructor().newInstance();
+                    for (final Field f : field.getType().getDeclaredFields()) {
+                        if (f.getAnnotation(Resource.class) != null) {
+                            if (f.getType().equals(Validator.class)) {
+                                f.set(instance,
+                                    Validation.byDefaultProvider().configure().buildValidatorFactory().getValidator());
+                            } else if (f.getType().equals(ValidatorFactory.class)) {
+                                f.set(instance, Validation.byDefaultProvider().configure().buildValidatorFactory());
+                            }
+                        }
+                    }
+                    field.setAccessible(true);
+                    field.set(testCase, instance);
+                } catch (final Exception e) {
+                    // no-op
+                }
+            }
+        }
+    }
+
+    public Object[] resolve(Method method) {
+        return new Object[0];
+    }
+}
diff --git a/bval-tck-jakarta/src/main/java/org/apache/bval/arquillian/LogTckFormatter.java b/bval-tck-jakarta/src/main/java/org/apache/bval/arquillian/LogTckFormatter.java
new file mode 100644
index 0000000..f722773
--- /dev/null
+++ b/bval-tck-jakarta/src/main/java/org/apache/bval/arquillian/LogTckFormatter.java
@@ -0,0 +1,41 @@
+/*
+ * 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.bval.arquillian;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.logging.LogRecord;
+import java.util.logging.SimpleFormatter;
+
+public class LogTckFormatter extends SimpleFormatter {
+    @Override
+    public String format(final LogRecord record) {
+        final String message = formatMessage(record);
+        String throwable = "";
+        if (record.getThrown() != null) {
+            final StringWriter sw = new StringWriter();
+            final PrintWriter pw = new PrintWriter(sw);
+            pw.println();
+            record.getThrown().printStackTrace(pw);
+            pw.close();
+            throwable = sw.toString();
+        }
+        return String.format("[%s] %s%n%s", record.getLevel(), message, throwable);
+    }
+}
diff --git a/bval-tck-jakarta/src/main/java/org/apache/bval/arquillian/jndi/BValJndiFactory.java b/bval-tck-jakarta/src/main/java/org/apache/bval/arquillian/jndi/BValJndiFactory.java
new file mode 100644
index 0000000..7428bcd
--- /dev/null
+++ b/bval-tck-jakarta/src/main/java/org/apache/bval/arquillian/jndi/BValJndiFactory.java
@@ -0,0 +1,55 @@
+/*
+ * 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.bval.arquillian.jndi;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.spi.InitialContextFactory;
+import jakarta.validation.Validation;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.Hashtable;
+import java.util.Locale;
+
+// mock a context to satisfy lookups
+public class BValJndiFactory implements InitialContextFactory {
+    public BValJndiFactory() {
+        // this is an ugly hack, but the TCK expects us to get english validation messages :(
+        Locale.setDefault(Locale.ENGLISH);
+    }
+
+    public Context getInitialContext(final Hashtable<?, ?> environment) throws NamingException {
+        return Context.class.cast(Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
+            new Class<?>[] { Context.class }, new InvocationHandler() {
+                public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
+                    if (method.getName().equals("lookup") && args != null && args.length == 1
+                        && String.class.isInstance(args[0])) {
+                        if ("java:comp/ValidatorFactory".equals(args[0])) {
+                            return Validation.byDefaultProvider().configure().buildValidatorFactory();
+                        }
+                        if ("java:comp/Validator".equals(args[0])) {
+                            return Validation.byDefaultProvider().configure().buildValidatorFactory().getValidator();
+                        }
+                    }
+                    return null;
+                }
+            }));
+    }
+}
diff --git a/bval-tck-jakarta/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/bval-tck-jakarta/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
new file mode 100644
index 0000000..7e1dc48
--- /dev/null
+++ b/bval-tck-jakarta/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
@@ -0,0 +1 @@
+org.apache.bval.arquillian.BValArquillianExtension
diff --git a/bval-tck-jakarta/src/main/resources/jndi.properties b/bval-tck-jakarta/src/main/resources/jndi.properties
new file mode 100644
index 0000000..8a42146
--- /dev/null
+++ b/bval-tck-jakarta/src/main/resources/jndi.properties
@@ -0,0 +1,17 @@
+# 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.
+java.naming.factory.initial = org.apache.bval.arquillian.jndi.BValJndiFactory
diff --git a/bval-tck-jakarta/src/test/beanvalidation-tck-tests-suite.xml b/bval-tck-jakarta/src/test/beanvalidation-tck-tests-suite.xml
new file mode 100644
index 0000000..ce508a0
--- /dev/null
+++ b/bval-tck-jakarta/src/test/beanvalidation-tck-tests-suite.xml
@@ -0,0 +1,36 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+<!--
+
+    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.
+-->
+
+<suite name="JSR-380-TCK" verbose="2" configfailurepolicy="continue">
+    <test name="JSR-380-TCK">
+
+        <method-selectors>
+            <method-selector>
+                <selector-class name="org.hibernate.beanvalidation.tck.util.IntegrationTestsMethodSelector"/>
+            </method-selector>
+            <method-selector>
+                <selector-class name="org.hibernate.beanvalidation.tck.util.JavaFXTestsMethodSelector"/>
+            </method-selector>
+        </method-selectors>
+
+        <packages>
+            <package name="org.hibernate.beanvalidation.tck.tests"/>
+        </packages>
+    </test>
+</suite>
diff --git a/bval-tck-jakarta/src/test/resources/arquillian.xml b/bval-tck-jakarta/src/test/resources/arquillian.xml
new file mode 100644
index 0000000..1944b7f
--- /dev/null
+++ b/bval-tck-jakarta/src/test/resources/arquillian.xml
@@ -0,0 +1,28 @@
+<?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: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="owb" default="true">
+    <configuration>
+      <property name="useOnlyArchiveResources">true</property>
+      <property name="useOnlyArchiveResourcesExcludes">META-INF/services/jakarta.validation.spi.ValidationProvider</property>
+    </configuration>
+  </container>
+</arquillian>
diff --git a/bval-tck-jakarta/src/test/resources/logging.properties b/bval-tck-jakarta/src/test/resources/logging.properties
new file mode 100644
index 0000000..339a08c
--- /dev/null
+++ b/bval-tck-jakarta/src/test/resources/logging.properties
@@ -0,0 +1,21 @@
+# 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.
+.level= INFO
+handlers = java.util.logging.ConsoleHandler
+java.util.logging.ConsoleHandler.level = INFO
+java.util.logging.ConsoleHandler.formatter =org.apache.bval.arquillian.LogTckFormatter
+org.apache.webbeans.arquillian.standalone.OwbArquillianScannerService.level = WARNING
diff --git a/bval-tck-jakarta/work-tests-suite.xml b/bval-tck-jakarta/work-tests-suite.xml
new file mode 100644
index 0000000..9997a27
--- /dev/null
+++ b/bval-tck-jakarta/work-tests-suite.xml
@@ -0,0 +1,31 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+<!--
+  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.
+-->
+<!--
+JUST HERE TO BE ABLE TO RUN TCK ONE BY ONE WHEN DEVELOPING
+think to add -Dvalidation.provider=org.apache.bval.jsr.ApacheValidationProvider to your runner config
+-->
+<suite name="tmp" verbose="1">
+  <test name="tmp">
+    <classes>
+       <class name="org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel.ContainerElementTypeConstraintsForParameterXmlMappingTest"/>
+<!--      <class name="org.hibernate.beanvalidation.tck.tests.bootstrap.BootstrapConfigurationTest"/>-->
+<!--
+      <class name="org.hibernate.beanvalidation.tck.tests.util.ConstraintViolationAssertTest"/>
+-->
+    </classes>
+  </test>
+</suite>
diff --git a/pom.xml b/pom.xml
index c44fddb..ff1b27e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -755,6 +755,7 @@
         <module>bval-jsr</module>
         <module>bval-extras</module>
         <module>bval-tck</module>
+        <module>bval-tck-jakarta</module>
         <module>bundle</module>
         <module>bval-perf</module>
     </modules>