Skip to content

Commit 325f2c2

Browse files
authored
Merge pull request #186 from jamezp/ee11-core-profile
Migrate the core-tck-runner for Jakarta EE 11 Core Profile.
2 parents 732f9dd + e611b6e commit 325f2c2

File tree

14 files changed

+469
-355
lines changed

14 files changed

+469
-355
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Jakarta EE 11 Core Profile with WildFly - Manual
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
wildfly-version:
7+
description: WildFly Version
8+
required: true
9+
type: string
10+
java-version:
11+
description: Java Version
12+
required: true
13+
default: 17
14+
type: string
15+
16+
# Only run the latest job
17+
concurrency:
18+
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
19+
cancel-in-progress: true
20+
21+
jobs:
22+
coreprofile-tck-manual:
23+
# The type of runner that the job will run on
24+
runs-on: ubuntu-latest
25+
26+
# Runner steps
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: Setup Java JDK
30+
uses: actions/setup-java@v4
31+
with:
32+
java-version: ${{ inputs.java-version }}
33+
distribution: 'temurin'
34+
cache: 'maven'
35+
- name: Build with Maven Java ${{ inputs.java-version }} on WildFly
36+
run: |
37+
cd core-profile
38+
mvn -B -V clean verify -Dversion.org.wildfly=${{ inputs.wildfly-version }} -fae -Pstaging
39+
- uses: actions/upload-artifact@v4
40+
if: failure()
41+
with:
42+
name: test-reports-${{ inputs.java-version }}
43+
path: |
44+
'**/surefire-reports/'
45+
'**/failsafe-reports/'
46+

.github/workflows/core-profile-tck.yml .github/workflows/core-profile-tck-ee11.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is a basic workflow that is manually triggered
22

3-
name: Jakarta EE Core Profile with WildFly
3+
name: Jakarta EE 11 Core Profile with WildFly
44

55
# Controls when the action will run. Workflow runs when manually triggered using the UI
66
# or API.
@@ -38,8 +38,7 @@ jobs:
3838
strategy:
3939
fail-fast: false
4040
matrix:
41-
os: [ubuntu-latest]
42-
java: ['11', '17', '21']
41+
java: ['17', '21']
4342

4443
# Runner steps
4544
steps:

core-profile/cdi-langmodel-tck/pom.xml

+19-9
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<dependency>
5252
<groupId>jakarta.enterprise</groupId>
5353
<artifactId>cdi-tck-lang-model</artifactId>
54-
<version>${cdi.tck.version}</version>
54+
<version>${version.jakarta.cdi.tck}</version>
5555
<scope>test</scope>
5656
<exclusions>
5757
<exclusion>
@@ -63,7 +63,7 @@
6363
<dependency>
6464
<groupId>org.jboss.weld</groupId>
6565
<artifactId>weld-core-test-common</artifactId>
66-
<version>${weld.version}</version>
66+
<version>${version.org.jboss.weld}</version>
6767
<scope>test</scope>
6868
</dependency>
6969
<dependency>
@@ -83,15 +83,13 @@
8383
</exclusions>
8484
</dependency>
8585
<dependency>
86-
<groupId>junit</groupId>
87-
<artifactId>junit</artifactId>
88-
<version>4.13.2</version>
86+
<groupId>org.junit.jupiter</groupId>
87+
<artifactId>junit-jupiter</artifactId>
8988
<scope>test</scope>
9089
</dependency>
9190
<dependency>
92-
<groupId>org.jboss.arquillian.junit</groupId>
93-
<artifactId>arquillian-junit-container</artifactId>
94-
<version>${version.org.jboss.arquillian}</version>
91+
<groupId>org.jboss.arquillian.junit5</groupId>
92+
<artifactId>arquillian-junit5-container</artifactId>
9593
<scope>test</scope>
9694
</dependency>
9795

@@ -108,19 +106,24 @@
108106
<goal>run</goal>
109107
</goals>
110108
<configuration>
111-
<!-- Export the properties defined below so they can be used for the signature tests -->
109+
<!-- Export the properties defined below so they can be used on the test class path -->
112110
<exportAntProperties>true</exportAntProperties>
113111
<target>
114112
<fileset id="jakarta-api-jars"
115113
dir="${jboss.home}${file.separator}modules/system/layers/base/jakarta/">
114+
<!-- Jakarta API's needed on the test class path -->
116115
<include name="**/annotation/api/main/*.jar"/>
117116
<include name="**/enterprise/api/main/*.jar"/>
118117
<include name="**/inject/api/main/*.jar"/>
119118
<include name="**/interceptor/api/main/*.jar"/>
119+
<!-- Required for the Weld Arquillian Container -->
120+
<include name="**/el/api/main/*.jar"/>
121+
<include name="**/ejb/api/main/*.jar"/>
120122
</fileset>
121123
<pathconvert pathsep="," property="jakarta.api.jars" refid="jakarta-api-jars"/>
122124
<fileset id="weld-jars"
123125
dir="${jboss.home}${file.separator}modules/system/layers/base/org/jboss/">
126+
<!-- Implementations are required on the test class path -->
124127
<include name="**/classfilewriter/main/*.jar"/>
125128
<include name="**/logging/main/*.jar"/>
126129
<include name="**/weld/**/weld*.jar"/>
@@ -157,13 +160,20 @@
157160
</goals>
158161
<configuration>
159162
<skip>false</skip>
163+
<!-- Include the libraries from the server on the test class path -->
160164
<additionalClasspathElements>
161165
<additionalClasspathElement>${weld.jars}</additionalClasspathElement>
162166
<additionalClasspathElement>${jakarta.api.jars}</additionalClasspathElement>
163167
</additionalClasspathElements>
168+
<!-- Exclude transitive dependencies from the class we provide on the class path above from
169+
the server.
170+
-->
164171
<classpathDependencyExcludes>
165172
<exclude>jakarta.enterprise:jakarta.enterprise.cdi-api</exclude>
166173
<exclude>jakarta.enterprise:jakarta.enterprise.lang-model</exclude>
174+
<exclude>jakarta.ejb:*</exclude>
175+
<exclude>jakarta.el:*</exclude>
176+
<exclude>org.glassfish:*</exclude>
167177
</classpathDependencyExcludes>
168178
</configuration>
169179
</execution>

core-profile/cdi-langmodel-tck/src/test/java/org/jboss/weld/langmodel/tck/LangModelTckTest.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111

1212
import jakarta.enterprise.inject.build.compatible.spi.BuildCompatibleExtension;
1313
import org.jboss.arquillian.container.test.api.Deployment;
14-
import org.jboss.arquillian.junit.Arquillian;
14+
import org.jboss.arquillian.junit5.ArquillianExtension;
1515
import org.jboss.cdi.lang.model.tck.LangModelVerifier;
1616
import org.jboss.shrinkwrap.api.Archive;
1717
import org.jboss.shrinkwrap.api.BeanDiscoveryMode;
1818
import org.jboss.shrinkwrap.api.ShrinkWrap;
1919
import org.jboss.shrinkwrap.api.spec.WebArchive;
2020
import org.jboss.shrinkwrap.impl.BeansXml;
21-
import org.junit.Assert;
22-
import org.junit.Test;
23-
import org.junit.runner.RunWith;
21+
import org.junit.jupiter.api.Assertions;
22+
import org.junit.jupiter.api.Test;
23+
import org.junit.jupiter.api.extension.ExtendWith;
2424

2525
/**
2626
* <p>
@@ -33,7 +33,7 @@
3333
* Actual test happens inside {@link LangModelExtension} by calling {@link LangModelVerifier#verify(ClassInfo)}.
3434
* </p>
3535
*/
36-
@RunWith(Arquillian.class)
36+
@ExtendWith(ArquillianExtension.class)
3737
public class LangModelTckTest {
3838

3939
@Deployment
@@ -49,7 +49,7 @@ public static Archive<?> deploy() {
4949
@Test
5050
public void testLangModel() {
5151
// test is executed in LangModelExtension; here we just assert that the relevant extension method was invoked
52-
Assert.assertTrue(LangModelExtension.ENHANCEMENT_INVOKED == 1);
52+
Assertions.assertEquals(1, LangModelExtension.ENHANCEMENT_INVOKED);
5353
}
5454
}
5555

core-profile/cdi-tck/pom.xml

+36-22
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<name>WildFly Jakarta CDI TCK Runner</name>
2424

2525
<properties>
26-
<testng.version>7.4.0</testng.version>
26+
<testng.version>7.9.0</testng.version>
2727
</properties>
2828

2929
<dependencies>
@@ -54,7 +54,7 @@
5454
<dependency>
5555
<groupId>jakarta.enterprise</groupId>
5656
<artifactId>cdi-tck-core-impl</artifactId>
57-
<version>${cdi.tck.version}</version>
57+
<version>${version.jakarta.cdi.tck}</version>
5858
<scope>test</scope>
5959
<exclusions>
6060
<exclusion>
@@ -90,9 +90,9 @@
9090
<dependency>
9191
<groupId>jakarta.enterprise</groupId>
9292
<artifactId>cdi-tck-core-impl</artifactId>
93-
<version>${cdi.tck.version}</version>
93+
<version>${version.jakarta.cdi.tck}</version>
9494
<type>sig</type>
95-
<classifier>sigtest-jdk11</classifier>
95+
<classifier>sigtest-jdk17</classifier>
9696
<scope>test</scope>
9797
<exclusions>
9898
<exclusion>
@@ -108,7 +108,7 @@
108108
<dependency>
109109
<groupId>org.jboss.weld</groupId>
110110
<artifactId>weld-porting-package-tck</artifactId>
111-
<version>${weld.version}</version>
111+
<version>${version.org.jboss.weld}</version>
112112
<scope>test</scope>
113113
<exclusions>
114114
<exclusion>
@@ -128,23 +128,23 @@
128128
<dependency>
129129
<groupId>jakarta.ee.tck.coreprofile</groupId>
130130
<artifactId>cdi-lite-tck-suite</artifactId>
131-
<version>${core.profile.tck.version}</version>
131+
<version>${version.jakarta.platform.core.profile.tck.version}</version>
132132
<scope>test</scope>
133133
</dependency>
134134
<dependency>
135135
<groupId>jakarta.ee.tck.coreprofile</groupId>
136136
<artifactId>cdi-lite-tck-suite</artifactId>
137137
<type>xml</type>
138-
<version>${core.profile.tck.version}</version>
138+
<version>${version.jakarta.platform.core.profile.tck.version}</version>
139139
<scope>test</scope>
140140
</dependency>
141141

142142
<dependency>
143143
<groupId>jakarta.ee.tck.coreprofile</groupId>
144144
<artifactId>common-annotations</artifactId>
145-
<version>${core.profile.tck.version}</version>
145+
<version>${version.jakarta.platform.core.profile.tck.version}</version>
146146
<type>sig</type>
147-
<classifier>sigtest-jdk11</classifier>
147+
<classifier>${core.profile.sigtest.classifier}</classifier>
148148
<scope>test</scope>
149149
</dependency>
150150

@@ -162,7 +162,6 @@
162162
<dependency>
163163
<groupId>org.jboss.arquillian.protocol</groupId>
164164
<artifactId>arquillian-protocol-servlet-jakarta</artifactId>
165-
<version>${version.org.jboss.arquillian}</version>
166165
<scope>test</scope>
167166
</dependency>
168167
<dependency>
@@ -220,7 +219,7 @@
220219
<includeGroupIds>jakarta.enterprise</includeGroupIds>
221220
<includeArtifactIds>cdi-tck-core-impl</includeArtifactIds>
222221
<type>sig</type>
223-
<classifier>sigtest-jdk11</classifier>
222+
<classifier>sigtest-jdk17</classifier>
224223
<stripVersion>true</stripVersion>
225224
<overWriteReleases>true</overWriteReleases>
226225
<outputDirectory>${project.build.directory}/sigtest</outputDirectory>
@@ -237,7 +236,7 @@
237236
<includeGroupIds>jakarta.ee.tck.coreprofile</includeGroupIds>
238237
<includeArtifactIds>common-annotations</includeArtifactIds>
239238
<type>sig</type>
240-
<classifier>sigtest-jdk11</classifier>
239+
<classifier>${core.profile.sigtest.classifier}</classifier>
241240
<stripVersion>true</stripVersion>
242241
<overWriteReleases>true</overWriteReleases>
243242
<outputDirectory>${project.build.directory}/sigtest</outputDirectory>
@@ -269,8 +268,9 @@
269268
</unzip>
270269
<fileset id="jakarta-api-jars"
271270
dir="${jboss.home}${file.separator}modules/system/layers/base/jakarta/">
271+
<!-- Jakarta API's needed on the test class path -->
272272
<include name="**/annotation/api/main/*.jar"/>
273-
<include name="**/el/main/*.jar"/>
273+
<include name="**/el/api/main/*.jar"/>
274274
<include name="**/enterprise/api/main/*.jar"/>
275275
<include name="**/inject/api/main/*.jar"/>
276276
<include name="**/interceptor/api/main/*.jar"/>
@@ -279,6 +279,7 @@
279279
property="jakarta.api.jars" refid="jakarta-api-jars"/>
280280
<fileset id="weld-jars"
281281
dir="${jboss.home}${file.separator}modules/system/layers/base/org//">
282+
<!-- Implementations are required on the test class path -->
282283
<include name="**/jboss/weld/**/weld*.jar"/>
283284
<!-- Required by Weld -->
284285
<include name="**/jboss/classfilewriter/main/*.jar"/>
@@ -291,6 +292,20 @@
291292
</target>
292293
</configuration>
293294
</execution>
295+
<execution>
296+
<id>echo</id>
297+
<phase>process-test-classes</phase>
298+
<goals>
299+
<goal>run</goal>
300+
</goals>
301+
<configuration>
302+
<target>
303+
<echo message="sigtest.classpath=${sigtest.classpath}"/>
304+
<echo message="jakarta.api.jars=${jakarta.api.jars}"/>
305+
<echo message="impl.jars=${impl.jars}"/>
306+
</target>
307+
</configuration>
308+
</execution>
294309
</executions>
295310
</plugin>
296311

@@ -313,7 +328,6 @@
313328
<value>false</value>
314329
</property>
315330
</properties>
316-
<forkMode>once</forkMode>
317331
<dependenciesToScan>
318332
<dependency>jakarta.enterprise:cdi-tck-core-impl</dependency>
319333
</dependenciesToScan>
@@ -353,28 +367,28 @@
353367
</goals>
354368
<configuration>
355369
<additionalClasspathElements>
370+
<!-- Include the libraries from the server on the test class path -->
356371
<additionalClasspathElement>${weld.jars}</additionalClasspathElement>
357372
<additionalClasspathElement>${jakarta.api.jars}</additionalClasspathElement>
358373
</additionalClasspathElements>
374+
<!-- Exclude transitive dependencies from the class we provide on the class path above from
375+
the server.
376+
-->
359377
<classpathDependencyExcludes>
360378
<exclude>jakarta.annotation:jakarta.annotation-api</exclude>
361379
<exclude>jakarta.enterprise:jakarta.enterprise.cdi-api</exclude>
362380
<exclude>jakarta.inject:jakarta.inject-api</exclude>
363381
<exclude>jakarta.interceptor:jakarta.interceptor-api</exclude>
382+
<exclude>org.jboss.spec.javax.servlet:*</exclude>
364383
</classpathDependencyExcludes>
365384
</configuration>
366385
</execution>
367386
</executions>
368387
</plugin>
369388

370389
<plugin>
371-
<groupId>org.netbeans.tools</groupId>
390+
<groupId>jakarta.tck</groupId>
372391
<artifactId>sigtest-maven-plugin</artifactId>
373-
<version>1.7</version>
374-
<configuration>
375-
<!-- Avoids an NPE fixed upstream -->
376-
<ignoreJDKClasses/>
377-
</configuration>
378392
<executions>
379393
<execution>
380394
<id>sigtest</id>
@@ -383,7 +397,7 @@
383397
<goal>check</goal>
384398
</goals>
385399
<configuration>
386-
<sigfile>${project.build.directory}/sigtest/cdi-tck-core-impl-sigtest-jdk11.sig</sigfile>
400+
<sigfile>${project.build.directory}/sigtest/cdi-tck-core-impl-sigtest-jdk17.sig</sigfile>
387401
<packages>jakarta.decorator,jakarta.enterprise,jakarta.interceptor</packages>
388402
<classes>${project.build.directory}/sig-classes/</classes>
389403
<report>${project.build.directory}/cdi-sig-report.txt</report>
@@ -396,7 +410,7 @@
396410
<goal>check</goal>
397411
</goals>
398412
<configuration>
399-
<sigfile>${project.build.directory}/sigtest/common-annotations-sigtest-jdk11.sig</sigfile>
413+
<sigfile>${project.build.directory}/sigtest/common-annotations-${core.profile.sigtest.classifier}.sig</sigfile>
400414
<packages>jakarta.annotation</packages>
401415
<classes>${project.build.directory}/sig-classes/</classes>
402416
<report>${project.build.directory}/ca-sig-report.txt</report>

0 commit comments

Comments
 (0)