Skip to content

Commit feba1f0

Browse files
committed
Add profile for testing JakartaEE11 with GlassFish 8 (rebased)
1 parent e4c0ac6 commit feba1f0

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ jobs:
3030
- jakartaee11,wildfly-jakartaee11-managed
3131
- glassfish-managed
3232
- tomee-managed
33+
# Build warp with the JakartaEE11 api and run it using the glassfish 8 server:
34+
- jakartaee11,glassfish-jakartaee11-managed
35+
exclude:
36+
# GlassFish 8 does not support Java 17
37+
- java: 17
38+
container: jakartaee11,glassfish-jakartaee11-managed
3339
steps:
3440
- name: Checkout
3541
uses: actions/checkout@v5

build/ftest-base/pom.xml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,75 @@
327327
</dependency>
328328
</dependencies>
329329
</profile>
330+
<profile>
331+
<!-- The GlassFish 8 container supports JakartaEE11.
332+
Run this profile only in combination with the profile "jakartaee11" so that arquillian-extension-warp is built using the JakartaEE11 api:
333+
mvn clean install -Pjakartaee11,glassfish-jakartaee11-managed
334+
335+
GlassFish 8 does not support Java 17
336+
-->
337+
<id>glassfish-jakartaee11-managed</id>
338+
<activation>
339+
<property>
340+
<name>integration</name>
341+
<value>glassfish</value>
342+
</property>
343+
</activation>
344+
<properties>
345+
<arquillian.launch.glassfish>true</arquillian.launch.glassfish>
346+
<arquillian.container.home>${project.build.directory}/glassfish8</arquillian.container.home>
347+
<arquillian.container.distribution>org.glassfish.main.distributions:glassfish:zip:${version.glassfish8}
348+
</arquillian.container.distribution>
349+
<!-- Relative path to a file that should be made "executable" when the container is started by the arquillian container.
350+
Here it is the "asadmin" script (https://github.com/OmniFish-EE/arquillian-container-glassfish/pull/9) -->
351+
<arquillian.container.linux.executepermission.file>glassfish8/glassfish/bin/asadmin
352+
</arquillian.container.linux.executepermission.file>
353+
</properties>
354+
355+
<!--This profile requires Java 21 to run, as this is required by GlassFish 8 -->
356+
<build>
357+
<plugins>
358+
<plugin>
359+
<groupId>org.apache.maven.plugins</groupId>
360+
<artifactId>maven-enforcer-plugin</artifactId>
361+
<version>3.6.1</version>
362+
<executions>
363+
<execution>
364+
<id>enforce-java</id>
365+
<goals>
366+
<goal>enforce</goal>
367+
</goals>
368+
<configuration>
369+
<rules>
370+
<requireJavaVersion>
371+
<version>21</version>
372+
</requireJavaVersion>
373+
</rules>
374+
</configuration>
375+
</execution>
376+
</executions>
377+
</plugin>
378+
</plugins>
379+
</build>
380+
381+
<dependencies>
382+
<dependency>
383+
<groupId>ee.omnifish.arquillian</groupId>
384+
<artifactId>arquillian-glassfish-server-managed</artifactId>
385+
<version>${version.arquillian.glassfish}</version>
386+
<scope>test</scope>
387+
</dependency>
388+
<!--The dependency on the servlet api must be declared for each profile, see detailed explanation in the
389+
test "org.jboss.arquillian.warp.jsf.ftest.lifecycle.TestFacesLifecycleFailurePropagation" in "jsf-ftest" project.
390+
Here we use the JBoss implementation instead of the one of GlassFish, as it works as well and is easier to configure.
391+
-->
392+
<dependency>
393+
<groupId>jakarta.servlet</groupId>
394+
<artifactId>jakarta.servlet-api</artifactId>
395+
<scope>provided</scope>
396+
</dependency>
397+
</dependencies>
398+
</profile>
330399

331400
<profile>
332401
<!--While executing the tests, Drone uses a locally installed Chrome browser. Combine this profile with any server profile, e.g. "mvnw clean install -Pwildfly-remote,browser-chrome"-->

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@
107107
It does not have to match exactly the version bundled with TomEE, but it should be at least the same JakartaEE spec version.-->
108108
<version.tomee.tomcat>10.1.44</version.tomee.tomcat>
109109
<version.glassfish>7.0.25</version.glassfish>
110+
<!-- GlassFish 8 ist used to test JakartaEE11 features -->
111+
<version.glassfish8>8.0.0-M13</version.glassfish8>
110112
<version.wildfly>38.0.0.Final</version.wildfly>
111113
<version.wildfly.arquillian.container>5.1.0.Final</version.wildfly.arquillian.container>
112114

0 commit comments

Comments
 (0)