Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with the downloaded Jakarta EE 11 Platform TCK ZIP #1803

Open
jamezp opened this issue Jan 24, 2025 · 4 comments
Open

Issues with the downloaded Jakarta EE 11 Platform TCK ZIP #1803

jamezp opened this issue Jan 24, 2025 · 4 comments
Assignees

Comments

@jamezp
Copy link
Contributor

jamezp commented Jan 24, 2025

I'm creating this as a general issue for what I'm seeing when downloading the platform-tck-11.0.0-SNAPSHOT-dist.zip.

The first issue I've seen is with the artifacts content. After the archive is unzipped you end up with a platform-tck-11.0.0-SNAPSHOT/artifacts directory which contains the TCK JAR's and what looks like some other utility JAR's.

appclient-11.0.0-SNAPSHOT.jar
assembly-tck-11.0.0-SNAPSHOT.jar
common-11.0.0-SNAPSHOT.jar
connector-11.0.0-SNAPSHOT.jar
ejb30-11.0.0-SNAPSHOT.jar
ejb32-11.0.0-SNAPSHOT.jar
el-platform-tck-11.0.0-SNAPSHOT.jar
integration-11.0.0-SNAPSHOT.jar
javaee-tck-11.0.0-SNAPSHOT.jar
javamail-11.0.0-SNAPSHOT.jar
jdbc-11.0.0-SNAPSHOT.jar
jms-tck-11.0.0-SNAPSHOT.jar
jsonb-platform-tck-11.0.0-SNAPSHOT.jar
libutil-11.0.0-SNAPSHOT.jar
pages-platform-tck-11.0.0-SNAPSHOT.jar
persistence-platform-tck-tests-11.0.0-SNAPSHOT.jar
pom.xml
rest-platform-tck-11.0.0-SNAPSHOT.jar
runtime-11.0.0-SNAPSHOT.jar
signaturetest-11.0.0-SNAPSHOT.jar
transactions-tck-11.0.0-SNAPSHOT.jar
tsharness-11.0.0-SNAPSHOT.jar
websocket-tck-platform-tests-2.2.0.jar
xa-11.0.0-SNAPSHOT.jar

This directory also includes a pom.xml which can seemingly be used to install the artifacts into local Maven repository. The contents of the pom.xml looks like:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) "2022" Red Hat and others
  ~
  ~ This program and the accompanying materials are made available under the
  ~ Apache Software License 2.0 which is available at:
  ~ https://www.apache.org/licenses/LICENSE-2.0.
  ~
  ~ SPDX-License-Identifier: Apache-2.0
  ~
  -->

<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>

    <groupId>jakarta.tck</groupId>
    <artifactId>cdi-tck-artifacts</artifactId>
    <packaging>pom</packaging>
    <!-- This is set to project release version during assembly -->
    <version>11.0.0-SNAPSHOT</version>
    <name>Jakarta EE TCK Artifacts</name>

    <build>

        <plugins>
            <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <version>3.1.3</version>
                <executions>
                    <execution>
                        <id>install-appclient</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>appclient</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>appclient-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-assembly-tck</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>assembly-tck</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>assembly-tck-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-common</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>common</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>common-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-connector</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>connector</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>connector-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-ejb30</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>ejb30</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>ejb30-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-ejb32</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>ejb32</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>ejb32-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-el-platform-tck</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>el-platform-tck</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>el-platform-tck-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-integration</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>integration</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>integration-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-javaee-tck</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>javaee-tck</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>javaee-tck-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-rest-platform-tck</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>rest-platform-tck</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>rest-platform-tck-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-javamail</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>javamail</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>javamail-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-jdbc</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>jdbc</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>jdbc-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-jms-tck</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>jms-tck</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>jms-tck-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-persistence-platform-tck-tests</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>persistence-platform-tck-tests</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>persistence-platform-tck-tests-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-jsonb-platform-tck</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>jsonb-platform-tck</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>jsonb-platform-tck-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-pages-platform-tck</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>pages-platform-tck</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>pages-platform-tck-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-transactions-tck</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>transactions-tck</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>transactions-tck-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-libutil</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>libutil</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>libutil-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-runtime</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>runtime</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>runtime-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-signaturetest</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>signaturetest</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>signaturetest-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-tsharness</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>tsharness</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>tsharness-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-websocket-tck-platform-tests</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>websocket-tck-platform-tests</artifactId>
                            <version>2.2.0</version>
                            <packaging>jar</packaging>
                            <file>websocket-tck-platform-tests-2.2.0.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-xa</id>
                        <phase>package</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>jakarta.tck</groupId>
                            <artifactId>xa</artifactId>
                            <version>11.0.0-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <file>xa-11.0.0-SNAPSHOT.jar</file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

The initial problem I'm seeing is the generatePom configuration is being set to true. In some cases this is okay, but we're missing all the dependency information from the TCK. We could add the missing dependencies to working POM and maybe this is the best solution. However, it's not obvious what all needs to be added.

Just as an example when I attempt to run the rest-platform-tck I see this:

# Created at 2025-01-24T13:22:06.237
org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
	at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:160)
	at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:132)
	at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:107)
	at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:78)
	at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:99)
	at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:77)
	at org.junit.platform.launcher.core.DelegatingLauncher.discover(DelegatingLauncher.java:42)
	at org.apache.maven.surefire.junitplatform.LazyLauncher.discover(LazyLauncher.java:50)
	at org.apache.maven.surefire.junitplatform.TestPlanScannerFilter.accept(TestPlanScannerFilter.java:52)
	at org.apache.maven.surefire.api.util.DefaultScanResult.applyFilter(DefaultScanResult.java:87)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.scanClasspath(JUnitPlatformProvider.java:142)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
Caused by: org.junit.platform.commons.JUnitException: ClassSelector [className = 'com.sun.ts.tests.jaxrs.jaxrs21.platform.providers.jsonb.JAXRSClientIT', classLoader = null] resolution failed
	at org.junit.platform.launcher.listeners.discovery.AbortOnFailureLauncherDiscoveryListener.selectorProcessed(AbortOnFailureLauncherDiscoveryListener.java:39)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:103)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:83)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
	at org.junit.jupiter.engine.discovery.DiscoverySelectorResolver.resolveSelectors(DiscoverySelectorResolver.java:48)
	at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:69)
	at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)
	... 15 more
Caused by: java.lang.NoClassDefFoundError: com/sun/ts/tests/common/webclient/TestFailureException
	at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3578)
	at java.base/java.lang.Class.privateGetPublicMethods(Class.java:3603)
	at java.base/java.lang.Class.getMethods(Class.java:2185)
	at org.junit.platform.commons.util.ReflectionUtils.getDefaultMethods(ReflectionUtils.java:1743)
	at org.junit.platform.commons.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:1716)
	at org.junit.platform.commons.util.ReflectionUtils.findMethod(ReflectionUtils.java:1558)
	at org.junit.platform.commons.util.ReflectionUtils.isMethodPresent(ReflectionUtils.java:1409)
	at org.junit.jupiter.engine.discovery.predicates.IsTestClassWithTests.hasTestOrTestFactoryOrTestTemplateMethods(IsTestClassWithTests.java:50)
	at org.junit.jupiter.engine.discovery.predicates.IsTestClassWithTests.test(IsTestClassWithTests.java:46)
	at org.junit.jupiter.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:67)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:135)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1685)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:189)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:126)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:92)
	... 20 more
Caused by: java.lang.ClassNotFoundException: com.sun.ts.tests.common.webclient.TestFailureException
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 44 more

If the correct jakarta.tck:rest-platform-tck POM is included and used for the install, we could avoid having to add all the dependencies.

Please feel free to close this if this was intended and that vendors need to include the expected dependencies.

@starksm64 starksm64 self-assigned this Jan 24, 2025
@starksm64
Copy link
Contributor

The generatePom should probably not be used for any of these artifacts. I'm working on updating the basic testing included in the distribution job so these basic failures will be caught.

@jamezp
Copy link
Contributor Author

jamezp commented Jan 24, 2025

That makes sense to me. Feel free to close this or I'll be happy to. The more I'm thinking about it, the less it seems like a bug or issue at all.

@arjantijms
Copy link
Contributor

what looks like some other utility JAR's.

Let's please not include those utility JARs. That's IMHO backwards. Only the actual tests should be included. Utility and tools jars can simply be fetched from Maven Central.

(actually, see the requirements for the core profile to (also?) release all the jars to Maven Central anyway)

IMHO again, the less we work with the archaic jars in zip archive, the better.

@starksm64
Copy link
Contributor

starksm64 commented Jan 26, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants