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

jungm pushed a commit to branch ee11
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git

commit de3161f65f991e98cf7a527b832a64769d4195d8
Author: Markus Jung <[email protected]>
AuthorDate: Sun Jul 19 21:09:06 2026 +0200

    Package the CDI TCK porting jar for test-phase runs
    
    The cdi and cdi-ee runners stop at the test phase, so the porting module's
    default package-phase jar:jar never ran and the antrun copy that stages the
    jar into org.jboss.cdi.tck.libraryDirectory found nothing. Ant's copy with 
an
    empty fileset succeeds silently, so every deployed archive shipped without
    org.apache.openejb.tck.cdi.tomee.BeansImpl and the TCK failed its porting 
SPI
    lookup with "Unable to get configuration" before reaching any test body.
    
    Bind jar:jar to test-compile in the porting module so the artifact exists by
    the time the sibling runners' generate-test-resources copy looks for it, and
    assert in both runners that a jar was actually staged so a future regression
    fails where the cause is visible rather than 107 tests later.
---
 runner-standalone/cdi-ee/pom.xml          | 12 ++++++++++++
 runner-standalone/cdi-tck-porting/pom.xml | 22 ++++++++++++++++++++++
 runner-standalone/cdi/pom.xml             | 12 ++++++++++++
 3 files changed, 46 insertions(+)

diff --git a/runner-standalone/cdi-ee/pom.xml b/runner-standalone/cdi-ee/pom.xml
index 42270e0..ec12423 100644
--- a/runner-standalone/cdi-ee/pom.xml
+++ b/runner-standalone/cdi-ee/pom.xml
@@ -188,6 +188,18 @@
                     <exclude name="*-javadoc.jar"/>
                   </fileset>
                 </copy>
+                <!-- An empty fileset copies nothing and still succeeds, which
+                     would ship archives without BeansImpl and turn every test
+                     into an "Unable to get configuration" failure. Fail here
+                     instead, where the cause is obvious. -->
+                <fail message="No cdi-tck-porting jar staged into the TCK 
library directory; the sibling module did not package one.">
+                  <condition>
+                    <resourcecount when="equal" count="0">
+                      <fileset dir="${project.build.directory}/dependency/lib"
+                               
includes="runner-standalone-cdi-tck-porting-*.jar"/>
+                    </resourcecount>
+                  </condition>
+                </fail>
               </target>
             </configuration>
           </execution>
diff --git a/runner-standalone/cdi-tck-porting/pom.xml 
b/runner-standalone/cdi-tck-porting/pom.xml
index fa066be..be583de 100644
--- a/runner-standalone/cdi-tck-porting/pom.xml
+++ b/runner-standalone/cdi-tck-porting/pom.xml
@@ -44,4 +44,26 @@
       <scope>provided</scope>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <!-- The cdi and cdi-ee runners stop at the test phase, so the default
+           package-phase jar:jar would never run and their antrun copy would
+           stage nothing: the deployed archives would miss BeansImpl and every
+           CDI TCK test would fail its configuration lookup. Bind the jar goal
+           to test-compile as well so the artifact exists by the time the
+           sibling runners' generate-test-resources copy looks for it. -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>jar-for-test-phase-runs</id>
+            <phase>test-compile</phase>
+            <goals><goal>jar</goal></goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>
diff --git a/runner-standalone/cdi/pom.xml b/runner-standalone/cdi/pom.xml
index dab859c..bd45d5f 100644
--- a/runner-standalone/cdi/pom.xml
+++ b/runner-standalone/cdi/pom.xml
@@ -247,6 +247,18 @@
                     <exclude name="*-javadoc.jar"/>
                   </fileset>
                 </copy>
+                <!-- An empty fileset copies nothing and still succeeds, which
+                     would ship archives without BeansImpl and turn every test
+                     into an "Unable to get configuration" failure. Fail here
+                     instead, where the cause is obvious. -->
+                <fail message="No cdi-tck-porting jar staged into the TCK 
library directory; the sibling module did not package one.">
+                  <condition>
+                    <resourcecount when="equal" count="0">
+                      <fileset dir="${project.build.directory}/dependency/lib"
+                               
includes="runner-standalone-cdi-tck-porting-*.jar"/>
+                    </resourcecount>
+                  </condition>
+                </fail>
               </target>
             </configuration>
           </execution>

Reply via email to