You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by rm...@apache.org on 2020/06/08 09:28:33 UTC
[openwebbeans] branch master updated: OWB-1327 jakarta tck setup
This is an automated email from the ASF dual-hosted git repository.
rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 65c9f59 OWB-1327 jakarta tck setup
65c9f59 is described below
commit 65c9f5960d0cfe622c06fbe1fedadf42f27457fe
Author: Romain Manni-Bucau <rm...@gmail.com>
AuthorDate: Mon Jun 8 11:28:27 2020 +0200
OWB-1327 jakarta tck setup
---
pom.xml | 11 +-
.../org/apache/webbeans/config/BeansDeployer.java | 7 +-
.../event/ContainerEventObserverMethodImpl.java | 5 +
.../webbeans/portable/events/AfterObserver.java | 27 ++
.../portable/events/ProcessAnnotatedTypeImpl.java | 29 +-
.../portable/events/ProcessBeanAttributesImpl.java | 27 +-
.../portable/events/ProcessInjectionPointImpl.java | 27 +-
.../portable/events/ProcessObserverMethodImpl.java | 29 +-
.../org/apache/webbeans/util/WebBeansUtil.java | 5 +-
webbeans-tck-jakarta/dev-suite.xml | 39 +++
webbeans-tck-jakarta/pom.xml | 364 +++++++++++++++++++++
.../META-INF/openwebbeans/openwebbeans.properties | 47 +++
.../src/test/resources/META-INF/cdi-tck.properties | 25 ++
webbeans-tck-jakarta/standalone-suite.xml | 166 ++++++++++
14 files changed, 786 insertions(+), 22 deletions(-)
diff --git a/pom.xml b/pom.xml
index edced5f..381bc1b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -62,13 +62,13 @@
<geronimo_servlet.version>1.0</geronimo_servlet.version>
<geronimo_ejb.version>1.0.2</geronimo_ejb.version>
<geronimo_el.version>1.1</geronimo_el.version>
- <geronimo_annotation.version>1.2</geronimo_annotation.version>
+ <geronimo_annotation.version>1.3</geronimo_annotation.version>
<geronimo_jpa.version>1.1</geronimo_jpa.version>
<geronimo_jta.version>1.1.1</geronimo_jta.version>
<geronimo_jsp.version>1.0.1</geronimo_jsp.version>
- <geronimo_cdi.version>1.1</geronimo_cdi.version>
- <geronimo_atinject.version>1.1</geronimo_atinject.version>
- <geronimo_interceptor.version>1.1</geronimo_interceptor.version>
+ <geronimo_cdi.version>1.2</geronimo_cdi.version>
+ <geronimo_atinject.version>1.2</geronimo_atinject.version>
+ <geronimo_interceptor.version>1.2</geronimo_interceptor.version>
<geronimo_validation.version>1.1</geronimo_validation.version>
<tomcat7.version>7.0.99</tomcat7.version>
<!-- jetty 9.4.13+ broke session persistence: https://github.com/eclipse/jetty.project/issues/3597 -->
@@ -469,7 +469,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>3.0.0-M3</version>
+ <version>3.0.0-M4</version>
<configuration>
<includes>
<include>**/*Test.java</include>
@@ -643,6 +643,7 @@
<module>samples</module>
<module>atinject-tck</module>
<module>webbeans-tck</module>
+ <module>webbeans-tck-jakarta</module>
<module>distribution</module>
<module>webbeans-maven</module>
<module>webbeans-gradle</module>
diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java b/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
index 5832fc1..5575472 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
@@ -1321,11 +1321,12 @@ public class BeansDeployer
}
// trigger a NoClassDefFoundError here, otherwise it would be thrown in observer methods
- annotatedType.getJavaClass().getDeclaredMethods();
- annotatedType.getJavaClass().getDeclaredFields();
+ Class<?> javaClass = annotatedType.getJavaClass();
+ javaClass.getDeclaredMethods();
+ javaClass.getDeclaredFields();
// Fires ProcessAnnotatedType
- if (!annotatedType.getJavaClass().isAnnotation())
+ if (!javaClass.isAnnotation())
{
GProcessAnnotatedType processAnnotatedEvent = webBeansContext.getWebBeansUtil().fireProcessAnnotatedTypeEvent(annotatedType);
if (!processAnnotatedEvent.isVeto())
diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/event/ContainerEventObserverMethodImpl.java b/webbeans-impl/src/main/java/org/apache/webbeans/event/ContainerEventObserverMethodImpl.java
index 94b98a7..20426e9 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/event/ContainerEventObserverMethodImpl.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/event/ContainerEventObserverMethodImpl.java
@@ -20,6 +20,7 @@ package org.apache.webbeans.event;
import org.apache.webbeans.component.AbstractOwbBean;
import org.apache.webbeans.exception.WebBeansConfigurationException;
+import org.apache.webbeans.portable.events.AfterObserver;
import org.apache.webbeans.portable.events.discovery.ExtensionAware;
import javax.enterprise.inject.spi.AnnotatedMethod;
@@ -87,6 +88,10 @@ public class ContainerEventObserverMethodImpl<T> extends ObserverMethodImpl<T>
{
ExtensionAware.class.cast(extensionAware).setExtension(null);
}
+ if (args.length > 0 && AfterObserver.class.isInstance(args[0]))
+ {
+ AfterObserver.class.cast(args[0]).afterObserver();
+ }
}
public Class[] getWithAnnotations()
diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/AfterObserver.java b/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/AfterObserver.java
new file mode 100644
index 0000000..630d0d9
--- /dev/null
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/AfterObserver.java
@@ -0,0 +1,27 @@
+/*
+ * 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.webbeans.portable.events;
+
+/**
+ * An lifecycle event implementing this API will have this callback after each observer.
+ */
+public interface AfterObserver
+{
+ void afterObserver();
+}
diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessAnnotatedTypeImpl.java b/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessAnnotatedTypeImpl.java
index af94499..f493ae0 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessAnnotatedTypeImpl.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessAnnotatedTypeImpl.java
@@ -30,9 +30,8 @@ import javax.enterprise.inject.spi.configurator.AnnotatedTypeConfigurator;
*
* @param <X> bean class info
*/
-public class ProcessAnnotatedTypeImpl<X> extends EventBase implements ProcessAnnotatedType<X>
+public class ProcessAnnotatedTypeImpl<X> extends EventBase implements ProcessAnnotatedType<X>, AfterObserver
{
-
private final WebBeansContext webBeansContext;
@@ -90,12 +89,14 @@ public class ProcessAnnotatedTypeImpl<X> extends EventBase implements ProcessAnn
public void setAnnotatedType(AnnotatedType<X> type)
{
checkState();
+ if (configurator != null)
+ {
+ throw new IllegalStateException("You can't call " +
+ "setAnnotatedType() and configureAnnotatedType()");
+ }
annotatedType = type;
modifiedAnnotatedType = true;
-
- // reset configurator
- configurator = null;
}
/**
@@ -123,6 +124,11 @@ public class ProcessAnnotatedTypeImpl<X> extends EventBase implements ProcessAnn
public AnnotatedTypeConfigurator<X> configureAnnotatedType()
{
checkState();
+ if (modifiedAnnotatedType)
+ {
+ throw new IllegalStateException("You can't call " +
+ "setAnnotatedType() and configureAnnotatedType()");
+ }
if (configurator == null)
{
@@ -142,4 +148,17 @@ public class ProcessAnnotatedTypeImpl<X> extends EventBase implements ProcessAnn
return veto;
}
+ @Override
+ public void afterObserver()
+ {
+ if (configurator != null)
+ {
+ annotatedType = configurator.getNewAnnotatedType();
+ configurator = null;
+ }
+ else if (modifiedAnnotatedType)
+ {
+ modifiedAnnotatedType = false;
+ }
+ }
}
diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessBeanAttributesImpl.java b/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessBeanAttributesImpl.java
index b0caf16..9c5a136 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessBeanAttributesImpl.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessBeanAttributesImpl.java
@@ -26,7 +26,7 @@ import javax.enterprise.inject.spi.configurator.BeanAttributesConfigurator;
import org.apache.webbeans.config.WebBeansContext;
import org.apache.webbeans.configurator.BeanAttributesConfiguratorImpl;
-public class ProcessBeanAttributesImpl<T> extends EventBase implements ProcessBeanAttributes<T>
+public class ProcessBeanAttributesImpl<T> extends EventBase implements ProcessBeanAttributes<T>, AfterObserver
{
private final WebBeansContext webBeansContext;
private Annotated annotated;
@@ -34,6 +34,7 @@ public class ProcessBeanAttributesImpl<T> extends EventBase implements ProcessBe
private boolean veto;
private Throwable definitionError;
private boolean ignoreFinalMethods;
+ private boolean set;
private BeanAttributesConfiguratorImpl beanAttributesConfigurator;
public ProcessBeanAttributesImpl(WebBeansContext webBeansContext, Annotated annotated, BeanAttributes<T> attributes)
@@ -61,8 +62,12 @@ public class ProcessBeanAttributesImpl<T> extends EventBase implements ProcessBe
public void setBeanAttributes(BeanAttributes<T> tBeanAttributes)
{
checkState();
+ if (beanAttributesConfigurator != null)
+ {
+ throw new IllegalStateException("you can't configure and set the bean attributes in the same extension");
+ }
+ set = true;
attributes = tBeanAttributes;
- beanAttributesConfigurator = null;
}
@Override
@@ -89,6 +94,10 @@ public class ProcessBeanAttributesImpl<T> extends EventBase implements ProcessBe
public BeanAttributesConfigurator<T> configureBeanAttributes()
{
checkState();
+ if (set)
+ {
+ throw new IllegalStateException("you can't configure and set the bean attributes in the same extension");
+ }
if (beanAttributesConfigurator == null)
{
@@ -122,5 +131,17 @@ public class ProcessBeanAttributesImpl<T> extends EventBase implements ProcessBe
return definitionError;
}
-
+ @Override
+ public void afterObserver()
+ {
+ if (beanAttributesConfigurator != null)
+ {
+ attributes = beanAttributesConfigurator.getBeanAttributes();
+ beanAttributesConfigurator = null;
+ }
+ else if (set)
+ {
+ set = false;
+ }
+ }
}
diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessInjectionPointImpl.java b/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessInjectionPointImpl.java
index 823ea19..7f6a562 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessInjectionPointImpl.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessInjectionPointImpl.java
@@ -32,9 +32,10 @@ import javax.enterprise.inject.spi.configurator.InjectionPointConfigurator;
* @param <T> bean class
* @param <X> declared type
*/
-public class ProcessInjectionPointImpl<T, X> extends EventBase implements ProcessInjectionPoint<T, X>
+public class ProcessInjectionPointImpl<T, X> extends EventBase implements ProcessInjectionPoint<T, X>, AfterObserver
{
+ private boolean set;
private InjectionPoint injectionPoint;
private InjectionPointConfiguratorImpl injectionPointConfigurator;
@@ -66,8 +67,12 @@ public class ProcessInjectionPointImpl<T, X> extends EventBase implements Proces
public void setInjectionPoint(InjectionPoint injectionPoint)
{
checkState();
+ if (injectionPointConfigurator != null)
+ {
+ throw new IllegalStateException("You can't set and configure the injection point at the same time");
+ }
+ set = true;
this.injectionPoint = injectionPoint;
- this.injectionPointConfigurator = null;
}
/**
@@ -84,6 +89,10 @@ public class ProcessInjectionPointImpl<T, X> extends EventBase implements Proces
public InjectionPointConfigurator configureInjectionPoint()
{
checkState();
+ if (set)
+ {
+ throw new IllegalStateException("You can't set and configure the injection point at the same time");
+ }
if (injectionPointConfigurator == null)
{
@@ -91,4 +100,18 @@ public class ProcessInjectionPointImpl<T, X> extends EventBase implements Proces
}
return injectionPointConfigurator;
}
+
+ @Override
+ public void afterObserver()
+ {
+ if (injectionPointConfigurator != null)
+ {
+ injectionPoint = injectionPointConfigurator.getInjectionPoint();
+ injectionPointConfigurator = null;
+ }
+ else if (set)
+ {
+ set = false;
+ }
+ }
}
diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessObserverMethodImpl.java b/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessObserverMethodImpl.java
index 73905b3..25cdd2a 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessObserverMethodImpl.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessObserverMethodImpl.java
@@ -36,7 +36,8 @@ import org.apache.webbeans.portable.events.discovery.ExtensionAware;
* @param <X> declared bean class
* @param <T> event type
*/
-public class ProcessObserverMethodImpl<T,X> extends EventBase implements ProcessObserverMethod<T, X>, ExtensionAware
+public class ProcessObserverMethodImpl<T,X> extends EventBase implements ProcessObserverMethod<T, X>, ExtensionAware,
+ AfterObserver
{
private final WebBeansContext webBeansContext;
@@ -46,6 +47,7 @@ public class ProcessObserverMethodImpl<T,X> extends EventBase implements Process
/**ObserverMethod instance*/
private ObserverMethod<T> observerMethod;
private boolean vetoed;
+ private boolean set;
private ObserverMethodConfiguratorImpl observerMethodConfigurator;
private Extension extension;
@@ -78,6 +80,10 @@ public class ProcessObserverMethodImpl<T,X> extends EventBase implements Process
public ObserverMethodConfigurator<T> configureObserverMethod()
{
checkState();
+ if (set)
+ {
+ throw new IllegalStateException("You can't call setObserverMethod() and configureObserverMethod()");
+ }
if (observerMethodConfigurator == null)
{
@@ -114,8 +120,13 @@ public class ProcessObserverMethodImpl<T,X> extends EventBase implements Process
public void setObserverMethod(ObserverMethod<T> observerMethod)
{
checkState();
+ if (observerMethodConfigurator != null)
+ {
+ throw new IllegalStateException("You can't call " +
+ "setObserverMethod() and configureObserverMethod()");
+ }
+ set = true;
this.observerMethod = observerMethod;
- this.observerMethodConfigurator = null;
}
@Override
@@ -129,4 +140,18 @@ public class ProcessObserverMethodImpl<T,X> extends EventBase implements Process
{
return vetoed;
}
+
+ @Override
+ public void afterObserver()
+ {
+ if (observerMethodConfigurator != null)
+ {
+ observerMethod = observerMethodConfigurator.getObserverMethod();
+ observerMethodConfigurator = null;
+ }
+ else if (set)
+ {
+ set = false;
+ }
+ }
}
diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java b/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
index 108622f..2c14c6b 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
@@ -730,9 +730,10 @@ public final class WebBeansUtil
//Fires ProcessAnnotatedType
webBeansContext.getBeanManagerImpl().fireEvent(processAnnotatedEvent, true, AnnotationUtil.EMPTY_ANNOTATION_ARRAY);
- if (processAnnotatedEvent.isModifiedAnnotatedType())
+ AnnotatedType newAt = processAnnotatedEvent.getAnnotatedType();
+ if (newAt != annotatedType)
{
- webBeansContext.getAnnotatedElementFactory().setAnnotatedType(processAnnotatedEvent.getAnnotatedType());
+ webBeansContext.getAnnotatedElementFactory().setAnnotatedType(newAt);
}
return processAnnotatedEvent;
diff --git a/webbeans-tck-jakarta/dev-suite.xml b/webbeans-tck-jakarta/dev-suite.xml
new file mode 100644
index 0000000..97798d0
--- /dev/null
+++ b/webbeans-tck-jakarta/dev-suite.xml
@@ -0,0 +1,39 @@
+<!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-346-TCK" verbose="2" configfailurepolicy="continue">
+ <test name="JSR-346 TCK">
+ <classes>
+ <class name="org.jboss.cdi.tck.tests.extensions.beanDiscovery.event.ordering.LifecycleEventOrderingTest" />
+ <!--
+
+ <class name="org.jboss.cdi.tck.tests.event.parameterized.ParameterizedEventTest" />
+ <class name="org.jboss.cdi.tck.tests.event.fires.FireEventTest" />
+ -->
+ </classes>
+ <groups>
+ <run>
+ <exclude name="integration"/>
+ <exclude name="javaee-full"/>
+ </run>
+ </groups>
+ </test>
+ <listeners>
+ <listener class-name="org.jboss.cdi.tck.impl.testng.SingleTestClassMethodInterceptor"/>
+ <listener class-name="org.jboss.cdi.tck.impl.testng.ProgressLoggingTestListener"/>
+ </listeners>
+</suite>
diff --git a/webbeans-tck-jakarta/pom.xml b/webbeans-tck-jakarta/pom.xml
new file mode 100644
index 0000000..49a68a1
--- /dev/null
+++ b/webbeans-tck-jakarta/pom.xml
@@ -0,0 +1,364 @@
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans</artifactId>
+ <version>2.0.18-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>openwebbeans-tck-jakarta</artifactId>
+ <name>CDI TCK runner (Jakarta)</name>
+ <packaging>jar</packaging>
+ <description>All TCK tests for the Apache OpenWebBeans Implementation for Jakarta flavor</description>
+
+ <properties>
+ <tomcat-jakarta.version>10.0.0-M5</tomcat-jakarta.version>
+ <testng-suite>standalone</testng-suite> <!-- -Dtestng-suite=dev while working on TCK -->
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.arquillian</groupId>
+ <artifactId>arquillian-bom</artifactId>
+ <version>${arquillian.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-interceptor_1.2_spec</artifactId>
+ <version>${geronimo_interceptor.version}</version>
+ <classifier>jakarta</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-annotation_1.3_spec</artifactId>
+ <version>${geronimo_annotation.version}</version>
+ <classifier>jakarta</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-atinject_1.0_spec</artifactId>
+ <version>${geronimo_atinject.version}</version>
+ <classifier>jakarta</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans-spi</artifactId>
+ <version>${project.version}</version>
+ <classifier>jakarta</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans-impl</artifactId>
+ <version>${project.version}</version>
+ <classifier>jakarta</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency> <!-- bring conversation service tck impl -->
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans-tck</artifactId>
+ <version>${project.version}</version>
+ <classifier>jakarta</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.xbean</groupId>
+ <artifactId>xbean-finder-shaded</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>6.8.8</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans-ejb</artifactId>
+ <version>${project.version}</version>
+ <classifier>jakarta</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans-el22</artifactId>
+ <version>${project.version}</version>
+ <classifier>jakarta</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jcdi_2.0_spec</artifactId>
+ <version>${geronimo_cdi.version}</version>
+ <classifier>jakarta</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-ejb_3.1_spec</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>jakarta.enterprise</groupId>
+ <artifactId>cdi-tck-impl</artifactId>
+ <version>3.0.0-M3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>jakarta.enterprise</groupId>
+ <artifactId>jakarta.enterprise.cdi-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.servlet</groupId>
+ <artifactId>jakarta.servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.servlet.jsp</groupId>
+ <artifactId>jakarta.servlet.jsp-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.interceptor</groupId>
+ <artifactId>jakarta.interceptor-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.annotation</groupId>
+ <artifactId>jakarta.annotation-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.el</groupId>
+ <artifactId>jakarta.el-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.inject</groupId>
+ <artifactId>jakarta.inject-api</artifactId>
+ </exclusion>
+ <!-- not yet G jakarta jars
+ <exclusion>
+ <groupId>jakarta.ejb</groupId>
+ <artifactId>jakarta.ejb-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.resource</groupId>
+ <artifactId>jakarta.resource-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.jms</groupId>
+ <artifactId>jakarta.jms-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.persistence</groupId>
+ <artifactId>jakarta.persistence-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.ws.rs</groupId>
+ <artifactId>jakarta.ws.rs-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.xml.ws</groupId>
+ <artifactId>jakarta.xml.ws-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.transaction</groupId>
+ <artifactId>jakarta.transaction-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.faces</groupId>
+ <artifactId>jakarta.faces-api</artifactId>
+ </exclusion>
+ -->
+ </exclusions>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>tck</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans-porting</artifactId>
+ <version>${project.version}</version>
+ <classifier>jakarta</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.openwebbeans.arquillian</groupId>
+ <artifactId>owb-arquillian-standalone</artifactId>
+ <version>${project.version}</version>
+ <classifier>jakarta</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.testenricher</groupId>
+ <artifactId>arquillian-testenricher-cdi-jakarta</artifactId>
+ <version>1.7.0.Alpha1</version>
+ </dependency>
+
+ <dependency>
+ <!-- arquillian dependency hell hitting us again... -->
+ <groupId>org.jboss.arquillian.container</groupId>
+ <artifactId>arquillian-container-test-impl-base</artifactId>
+ <version>${arquillian.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jsp-api</artifactId>
+ <version>${tomcat-jakarta.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-el-api</artifactId>
+ <version>${tomcat-jakarta.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-servlet-api</artifactId>
+ <version>${tomcat-jakarta.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jasper-el</artifactId>
+ <version>${tomcat-jakarta.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <!--
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ -->
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <trimStackTrace>false</trimStackTrace>
+ <excludedGroups>integration,javaee-full</excludedGroups>
+ <suiteXmlFiles>
+ <suiteXmlFile>${testng-suite}-suite.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-tck</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+
+ <!-- OWB Porting Package -->
+ <artifactItem>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans-porting</artifactId>
+ <classifier>jakarta</classifier>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/webbeans-tck-jakarta/src/main/resources/META-INF/openwebbeans/openwebbeans.properties b/webbeans-tck-jakarta/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
new file mode 100644
index 0000000..4637dd8
--- /dev/null
+++ b/webbeans-tck-jakarta/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
@@ -0,0 +1,47 @@
+#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.
+#---------------------------------------------------------------
+# The TCK configuration for OpenWebBeans
+#
+#---------------------------------------------------------------
+
+
+################################################################################################
+###################################### TCK CONFIGURATION SECTION ###############################
+################################################################################################
+
+# this is the tck configuration, thus it has a very high ordinal of 150
+configuration.ordinal=150
+
+org.apache.webbeans.application.supportsProducerInterception = false
+
+# enable verification of programmatic qualifiers
+org.apache.webbeans.strictDynamicValidation = true
+
+org.apache.webbeans.spi.ConversationService = org.apache.openwebbeans.tck.conversation.TckConversationService
+org.apache.webbeans.application.supportsConversation=true
+
+
+# we have to switch back to the un-cached version of the normal scoping handler
+org.apache.webbeans.proxy.mapping.jakarta.enterprise.context.ApplicationScoped=org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler
+
+
+org.apache.webbeans.container.InjectionResolver.fastMatching = false
+
+# only org.jboss.cdi.tck.tests.extensions.beanManager.beanAttributes.CreateBeanAttributesTest currently
+# we can write an arquillian extension to avoid to set it globally
+org.apache.webbeans.service.DefaultInjectionPointService.implicitSupport = false
diff --git a/webbeans-tck-jakarta/src/test/resources/META-INF/cdi-tck.properties b/webbeans-tck-jakarta/src/test/resources/META-INF/cdi-tck.properties
new file mode 100644
index 0000000..e01925a
--- /dev/null
+++ b/webbeans-tck-jakarta/src/test/resources/META-INF/cdi-tck.properties
@@ -0,0 +1,25 @@
+# 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.
+
+org.jboss.cdi.tck.libraryDirectory=target/dependency/lib
+org.jboss.cdi.tck.testDataSource=java\:default
+org.jboss.cdi.tck.testJmsConnectionFactory=java\:default
+org.jboss.cdi.tck.testJmsQueue=java\:default
+org.jboss.cdi.tck.testJmsTopic=java\:default
+org.jboss.cdi.tck.spi.Beans=org.apache.webbeans.test.tck.BeansImpl
+org.jboss.cdi.tck.spi.Contexts=org.apache.webbeans.test.tck.ContextsImpl
+org.jboss.cdi.tck.spi.EL=org.apache.webbeans.test.tck.ELImpl
diff --git a/webbeans-tck-jakarta/standalone-suite.xml b/webbeans-tck-jakarta/standalone-suite.xml
new file mode 100644
index 0000000..208b02a
--- /dev/null
+++ b/webbeans-tck-jakarta/standalone-suite.xml
@@ -0,0 +1,166 @@
+<!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-346-TCK" verbose="2" configfailurepolicy="continue" >
+
+ <listeners>
+ <!-- Required - avoid randomly mixed test method execution -->
+ <listener class-name="org.jboss.cdi.tck.impl.testng.SingleTestClassMethodInterceptor"/>
+ <!-- Optional - intended for debug purpose only -->
+ <listener class-name="org.jboss.cdi.tck.impl.testng.ConfigurationLoggingListener"/>
+ <listener class-name="org.jboss.cdi.tck.impl.testng.ProgressLoggingTestListener"/>
+ <!-- Optional - it's recommended to disable the default JUnit XML reporter -->
+ <!-- this is slow, activate locally if needed
+ <listener class-name="org.testng.reporters.SuiteHTMLReporter"/>
+ <listener class-name="org.testng.reporters.FailedReporter"/>
+ <listener class-name="org.testng.reporters.XMLReporter"/>
+ <listener class-name="org.testng.reporters.EmailableReporter"/>
+ <listener class-name="org.testng.reporters.TestHTMLReporter"/>
+ -->
+ </listeners>
+
+ <test name="JSR-346 TCK">
+ <groups>
+ <run>
+ <exclude name="integration" />
+ <exclude name="javaee-full" />
+ </run>
+ </groups>
+
+
+ <packages>
+ <package name="org.jboss.cdi.tck.tests.*">
+
+ <!--X TODO OWB-1182 CDI 2.0 exlcuded for now - current focus on ee -->
+ <exclude name="org.jboss.cdi.tck.tests.se.*" />
+ </package>
+
+ <package name="org.jboss.cdi.tck.interceptors.tests.*"/>
+
+ </packages>
+
+
+ <classes>
+
+ <!-- Tests broken in the CDI-2.0 TCK: -->
+
+ <!-- https://issues.jboss.org/projects/CDITCK/issues/CDITCK-576 -->
+ <class name="org.jboss.cdi.tck.tests.context.passivating.dependency.builtin.BuiltinBeanPassivationDependencyTest">
+ <methods>
+ <exclude name="testInjectionPoint"/>
+ </methods>
+ </class>
+
+ <!-- https://issues.jboss.org/browse/CDITCK-577 -->
+ <class name="org.jboss.cdi.tck.tests.definition.bean.BeanDefinitionTest">
+ <methods>
+ <exclude name="testRawBeanTypes"/>
+ </methods>
+ </class>
+
+ <!-- https://issues.jboss.org/browse/CDITCK-432 -->
+ <class name="org.jboss.cdi.tck.tests.decorators.builtin.event.complex.ComplexEventDecoratorTest">
+ <methods><exclude name=".*"/></methods>
+ </class>
+
+ <!-- https://issues.jboss.org/browse/CDITCK-578, https://issues.jboss.org/browse/CDITCK-579 -->
+ <class name="org.jboss.cdi.tck.tests.definition.bean.custom.CustomBeanImplementationTest">
+ <methods>
+ <exclude name="testCustomBeanIsPassivationCapable"/>
+ <exclude name="testCustomBeanIsPassivationCapableDependency"/>
+ <exclude name="testInjectionPointGetMemberIsUsedToDetermineTheClassThatDeclaresAnInjectionPoint"/>
+ </methods>
+ </class>
+
+ <!-- this tests Weld specific internals -->
+ <class name="org.jboss.cdi.tck.tests.definition.bean.types.illegal.BeanTypesWithIllegalTypeTest">
+ <methods><exclude name=".*"/></methods>
+ </class>
+
+ <!-- https://issues.jboss.org/browse/CDITCK-580 -->
+ <class name="org.jboss.cdi.tck.tests.inheritance.specialization.simple.SimpleBeanSpecializationTest">
+ <methods><exclude name=".*"/></methods>
+ </class>
+
+ <!-- https://issues.jboss.org/browse/CDI-498 dots in EL names are not allowed by the EL spec. -->
+ <class name="org.jboss.cdi.tck.tests.lookup.el.ResolutionByNameTest">
+ <methods><exclude name="testBeanNameWithSeparatedListOfELIdentifiers"/></methods>
+ </class>
+
+ <!-- OWB provides a bit more for @New than CDI requires
+ https://issues.jboss.org/browse/CDITCK-581
+ -->
+ <class name="org.jboss.cdi.tck.tests.lookup.dynamic.DynamicLookupTest">
+ <methods>
+ <exclude name="testNewBeanNotEnabledWithouInjectionPoint"/>
+ <exclude name="testDuplicateBindingsThrowsException"/>
+ </methods>
+ </class>
+
+ <!-- https://issues.jboss.org/browse/CDITCK-582 -->
+ <class name="org.jboss.cdi.tck.tests.deployment.discovery.BeanDiscoveryTest">
+ <methods><exclude name=".*"/></methods>
+ </class>
+
+ <!-- https://issues.jboss.org/browse/CDITCK-586 -->
+ <class name="org.jboss.cdi.tck.tests.event.observer.async.basic.MixedObserversTest">
+ <methods><exclude name="testAsyncObserversCalledInDifferentThread"/></methods>
+ </class>
+
+ <!-- https://issues.jboss.org/browse/CDITCK-588 equals on AnnotatedType -->
+ <!-- https://issues.jboss.org/browse/CDITCK-589 because the ct predicate ends up randomly removing from the wrong ct -->
+ <class name="org.jboss.cdi.tck.tests.extensions.configurators.annotatedTypeConfigurator.AnnotatedTypeConfiguratorTest">
+ <methods><exclude name=".*"/></methods>
+ </class>
+
+ <!-- https://issues.jboss.org/browse/CDITCK-573 should be solved with tck 2.0.1.Final -->
+ <class name="org.jboss.cdi.tck.tests.extensions.configurators.bean.BeanConfiguratorTest">
+ <methods><exclude name=".*"/></methods>
+ </class>
+
+ <!-- https://issues.jboss.org/browse/CDITCK-591 -->
+ <class name="org.jboss.cdi.tck.tests.extensions.alternative.metadata.AlternativeMetadataTest">
+ <methods><exclude name=".*"/></methods>
+ </class>
+
+ <!-- https://issues.jboss.org/browse/CDI-581 , both tests...-->
+ <class name="org.jboss.cdi.tck.tests.extensions.lifecycle.processBeanAttributes.specialization.VetoTest">
+ <methods><exclude name=".*"/></methods>
+ </class>
+ <class name="org.jboss.cdi.tck.tests.extensions.lifecycle.processBeanAttributes.specialization.SpecializationTest">
+ <methods><exclude name=".*"/></methods>
+ </class>
+
+ <!-- CDITCK-466 -->
+ <class name="org.jboss.cdi.tck.tests.extensions.lifecycle.bbd.broken.passivatingScope.AddingPassivatingScopeTest">
+ <methods>
+ <exclude name=".*"/>
+ </methods>
+ </class>
+
+ <!-- https://issues.redhat.com/browse/CDITCK-590 -->
+ <class name="org.jboss.cdi.tck.tests.extensions.beanDiscovery.event.ordering.LifecycleEventOrderingTest">
+ <methods>
+ <exclude name=".*"/>
+ </methods>
+ </class>
+ </classes>
+
+
+ </test>
+
+</suite>