Skip to content

Commit 0ff1a43

Browse files
Update runtimes/add GF EE 11 support
2 parents 3efa8d5 + f13f891 commit 0ff1a43

10 files changed

Lines changed: 101 additions & 45 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ jobs:
117117
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=11 -Dprofile=core -DjavaVersion=21 -DoutputDirectory=app -Dgoals="clean package"
118118
rm -rf app
119119
120+
- name: Run Archetype for EE 11, SE 21, GlassFish, with Docker
121+
run: |
122+
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=11 -Dprofile=full -DjavaVersion=21 -Druntime=glassfish -Ddocker=yes -DoutputDirectory=app/glassfish -Dgoals="clean package"
123+
docker build -t test-image app/glassfish/jakartaee-hello-world
124+
docker rmi test-image
125+
rm -rf app/glassfish
126+
120127
- name: Run Archetype for EE 11, SE 21, Payara, with Docker
121128
run: |
122129
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=11 -Dprofile=full -DjavaVersion=21 -Druntime=payara -Ddocker=yes -DoutputDirectory=app/payara -Dgoals="clean package"

.github/workflows/nightly.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=full -DjavaVersion=8 -Druntime=glassfish -Ddocker=yes -DoutputDirectory=app/glassfish -Dgoals="clean package" | tee mvn_output.txt
133133
134134
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
135-
WARN_MESSAGE="GlassFish only supports Docker for Jakarta EE 10"
135+
WARN_MESSAGE="GlassFish only supports Docker for Jakarta EE 10 and above"
136136
if ! { [ $MAVEN_EXIT_CODE -eq 0 ] && [ ! -f app/glassfish/jakartaee-hello-world/Dockerfile ] && grep -q "$WARN_MESSAGE" mvn_output.txt; }; then
137137
echo "Maven build failed, a Dockerfile was found, or the expected warning was not found. Test failed."
138138
exit 1
@@ -426,7 +426,7 @@ jobs:
426426
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=10 -Dprofile=full -DjavaVersion=11 -Druntime=glassfish -Ddocker=yes -DoutputDirectory=app/glassfish -Dgoals="clean package" | tee mvn_output.txt
427427
428428
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
429-
WARN_MESSAGE="GlassFish only supports Docker for Java SE 17"
429+
WARN_MESSAGE="GlassFish 7 only supports Docker for Java SE 17 and above"
430430
if ! { [ $MAVEN_EXIT_CODE -eq 0 ] && [ ! -f app/glassfish/jakartaee-hello-world/Dockerfile ] && grep -q "$WARN_MESSAGE" mvn_output.txt; }; then
431431
echo "Maven build failed, a Dockerfile was found, or the expected warning was not found. Test failed."
432432
exit 1
@@ -692,6 +692,19 @@ jobs:
692692
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=11 -Dprofile=core -DjavaVersion=17 -DoutputDirectory=app -Dgoals="clean package"
693693
rm -rf app
694694
695+
- name: Run Archetype for EE 11, SE 17, GlassFish
696+
run: |
697+
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=11 -Dprofile=full -DjavaVersion=17 -Druntime=glassfish -DoutputDirectory=app/glassfish -Dgoals="clean package" | tee mvn_output.txt
698+
699+
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
700+
ERROR_MESSAGE="GlassFish 8 only supports Java SE 21 and above"
701+
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
702+
echo "Maven build did not fail, or the expected error message was not found. Test failed."
703+
exit 1
704+
fi
705+
706+
rm -f mvn_output.txt
707+
695708
- name: Run Archetype for EE 9, SE 17, GlassFish
696709
run: |
697710
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=9 -Dprofile=full -DjavaVersion=17 -Druntime=glassfish -DoutputDirectory=app/glassfish -Dgoals="clean package"
@@ -996,6 +1009,18 @@ jobs:
9961009
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=11 -Dprofile=core -DjavaVersion=21 -DoutputDirectory=app -Dgoals="clean package"
9971010
rm -rf app
9981011
1012+
- name: Run Archetype for EE 11, SE 21, GlassFish, with Docker
1013+
run: |
1014+
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=11 -Dprofile=full -DjavaVersion=21 -Druntime=glassfish -Ddocker=yes -DoutputDirectory=app/glassfish -Dgoals="clean package"
1015+
docker build -t test-image app/glassfish/jakartaee-hello-world
1016+
docker rmi test-image
1017+
rm -rf app/glassfish
1018+
1019+
- name: Run Archetype for EE 11 Web Profile, SE 21, GlassFish
1020+
run: |
1021+
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=11 -Dprofile=web -DjavaVersion=21 -Druntime=glassfish -DoutputDirectory=app/glassfish -Dgoals="clean package"
1022+
rm -rf app/glassfish
1023+
9991024
- name: Run Archetype for EE 12, SE 21
10001025
run: |
10011026
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=12 -Dprofile=full -DjavaVersion=21 -DoutputDirectory=app -Dgoals="clean package" | tee mvn_output.txt
@@ -1022,9 +1047,11 @@ jobs:
10221047
10231048
rm -f mvn_output.txt
10241049
1025-
- name: Run Archetype for EE 10, SE 21, GlassFish
1050+
- name: Run Archetype for EE 10, SE 21, GlassFish, with Docker
10261051
run: |
1027-
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=10 -Dprofile=full -DjavaVersion=21 -Druntime=glassfish -DoutputDirectory=app/glassfish -Dgoals="clean package"
1052+
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=10 -Dprofile=full -DjavaVersion=21 -Druntime=glassfish -Ddocker=yes -DoutputDirectory=app/glassfish -Dgoals="clean package"
1053+
docker build -t test-image app/glassfish/jakartaee-hello-world
1054+
docker rmi test-image
10281055
rm -rf app/glassfish
10291056
10301057
- name: Run Archetype for EE 10 Web Profile, SE 21, GlassFish

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ mvn archetype:generate -DarchetypeGroupId="org.eclipse.starter" -DarchetypeArtif
3939
```
4040

4141
## Running the UI
42-
In order to run the UI, please execute the following from this directory. You can also simply build the war from Maven and deploy the war to either WildFly 28 or JBoss EAP 8. You can do this in an IDE if desired. Note that you can override the underlying archetype version used by setting the `ARCHETYPE_VERSION` environment variable (the default version will be the most recent released to Maven Central, see
42+
In order to run the UI, please execute the following from this directory. You can also simply build the war from Maven and deploy the war to either WildFly 30 or JBoss EAP 8. You can do this in an IDE if desired. Note that you can override the underlying archetype version used by setting the `ARCHETYPE_VERSION` environment variable (the default version will be the most recent released to Maven Central, see
4343
[here](https://mvnrepository.com/artifact/org.eclipse.starter/jakarta-starter) for the latest value).
4444

4545
```

archetype/src/main/resources/META-INF/archetype-post-generate.groovy

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ private validateInput(jakartaVersion, profile, javaVersion, runtime, docker, Fil
6262
}
6363

6464
if (runtime == 'glassfish') {
65-
if ((jakartaVersion == '11')) {
66-
FileUtils.forceDelete(outputDirectory)
67-
throw new RuntimeException("Failed, GlassFish does not support Jakarta EE 11")
68-
}
69-
7065
if (profile == 'core') {
7166
FileUtils.forceDelete(outputDirectory)
7267
throw new RuntimeException("Failed, GlassFish does not support the Core Profile")
@@ -81,6 +76,11 @@ private validateInput(jakartaVersion, profile, javaVersion, runtime, docker, Fil
8176
FileUtils.forceDelete(outputDirectory)
8277
throw new RuntimeException("Failed, GlassFish 6 does not support Java SE 21")
8378
}
79+
80+
if ((Integer.valueOf(javaVersion) < 21) && (jakartaVersion == '11')) {
81+
FileUtils.forceDelete(outputDirectory)
82+
throw new RuntimeException("Failed, GlassFish 8 only supports Java SE 21 and above")
83+
}
8484
}
8585

8686
if (runtime == 'payara') {
@@ -141,14 +141,16 @@ private generateRuntime(runtime, jakartaVersion, profile, javaVersion, docker, F
141141
switch (runtime) {
142142
case "glassfish": println "Generating code for GlassFish"
143143
if (docker.equalsIgnoreCase("yes")) {
144-
if (Double.valueOf(jakartaVersion) != 10) {
145-
println "WARNING: GlassFish only supports Docker for Jakarta EE 10"
146-
FileUtils.forceDelete(new File(outputDirectory, "Dockerfile"))
147-
} else if (profile != 'full') {
144+
if (profile != 'full') {
148145
println "WARNING: GlassFish only supports Docker for the full platform"
149146
FileUtils.forceDelete(new File(outputDirectory, "Dockerfile"))
150-
} else if (javaVersion != '17') {
151-
println "WARNING: GlassFish only supports Docker for Java SE 17"
147+
} else if (jakartaVersion == '10') {
148+
if (Integer.valueOf(javaVersion) < 17) {
149+
println "WARNING: GlassFish 7 only supports Docker for Java SE 17 and above"
150+
FileUtils.forceDelete(new File(outputDirectory, "Dockerfile"))
151+
}
152+
} else if (jakartaVersion != '11') {
153+
println "WARNING: GlassFish only supports Docker for Jakarta EE 10 and above"
152154
FileUtils.forceDelete(new File(outputDirectory, "Dockerfile"))
153155
}
154156
}

archetype/src/main/resources/archetype-resources/Dockerfile

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,24 @@
4242
#set ($deployDirectory = "/opt/jboss/wildfly/standalone/deployments/")
4343
#end
4444
#elseif (${jakartaVersion} == '11')
45-
#if (${runtime} == 'payara')
45+
#if (${runtime} == 'glassfish')
46+
#set ($baseImage = "ghcr.io/eclipse-ee4j/glassfish:8.0.2")
47+
#set ($deployDirectory = "/opt/gfinstall/glassfish/domains/domain1/autodeploy")
48+
#elseif (${runtime} == 'payara')
4649
#if (${profile} == 'full')
47-
#set ($baseImage = "payara/server-full:7.2026.5")
50+
#set ($baseImage = "payara/server-full:7.2026.6")
4851
#else
49-
#set ($baseImage = "payara/server-web:7.2026.5")
52+
#set ($baseImage = "payara/server-web:7.2026.6")
5053
#end
5154
#set ($deployDirectory = "$DEPLOY_DIR")
5255
#end
5356
#else
5457
#if (${runtime} == 'glassfish')
55-
#set ($baseImage = "ghcr.io/eclipse-ee4j/glassfish:7.0.25")
58+
#if (${javaVersion} == '21')
59+
#set ($baseImage = "ghcr.io/eclipse-ee4j/glassfish:7.1.0")
60+
#else
61+
#set ($baseImage = "ghcr.io/eclipse-ee4j/glassfish:7.0.25")
62+
#end
5663
#set ($deployDirectory = "/opt/glassfish7/glassfish/domains/domain1/autodeploy")
5764
#elseif (${runtime} == 'payara')
5865
#if (${javaVersion} == '21')
@@ -86,13 +93,11 @@
8693
#set ($deployDirectory = "/usr/local/tomee/webapps/")
8794
#elseif (${runtime} == 'wildfly')
8895
#if (${javaVersion} == '21')
89-
#set ($baseImage = "quay.io/wildfly/wildfly:latest-jdk21")
96+
#set ($baseImage = "quay.io/wildfly/wildfly:40.0.1.Final-jdk21")
9097
#elseif (${javaVersion} == '17')
91-
#set ($baseImage = "quay.io/wildfly/wildfly:latest-jdk17")
92-
#elseif (${javaVersion} == '11')
93-
#set ($baseImage = "quay.io/wildfly/wildfly:latest-jdk11")
98+
#set ($baseImage = "quay.io/wildfly/wildfly:40.0.1.Final-jdk17")
9499
#else
95-
#set ($baseImage = "quay.io/wildfly/wildfly")
100+
#set ($baseImage = "quay.io/wildfly/wildfly:34.0.1.Final-jdk11")
96101
#end
97102
#set ($deployDirectory = "/opt/jboss/wildfly/standalone/deployments/")
98103
#end

archetype/src/main/resources/archetype-resources/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,19 @@ Once the runtime starts, you can access the REST end-point at [http://localhost:
4343
#end
4444
#end
4545

46-
#if (((${docker} == 'yes') && (${runtime} != 'glassfish')) || ((${runtime} == 'glassfish') && (${docker} == 'yes') && (${jakartaVersion} == '10') && (${profile} == 'full') && (${javaVersion} == 17)))
46+
#set ($showDocker = false)
47+
#if (${docker} == 'yes')
48+
#if (${runtime} != 'glassfish')
49+
#set ($showDocker = true)
50+
#elseif (${profile} == 'full')
51+
#if ((${jakartaVersion} == '10') && ((${javaVersion} == 17) || (${javaVersion} == 21)))
52+
#set ($showDocker = true)
53+
#elseif (${jakartaVersion} == '11')
54+
#set ($showDocker = true)
55+
#end
56+
#end
57+
#end
58+
#if ($showDocker)
4759
You can also run the project via Docker. To build the Docker image, execute the following commands from the
4860
directory where this file resides. Please ensure you have installed
4961
a [Java SE implementation](https://adoptium.net) appropriate for your Jakarta EE version/runtime

archetype/src/main/resources/archetype-resources/pom.xml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@
1212
#end
1313
#if (${jakartaVersion} == '11')
1414
#set ($eeApiVersion = "11.0.0")
15-
#if (${javaVersion} == '17')
16-
#set ($glassfishVersion = "8.0.0-JDK17")
17-
#else
18-
#set ($glassfishVersion = "8.0.0")
19-
#end
15+
#set ($glassfishVersion = "8.0.2")
2016
#set ($glassfishContainerId = "glassfish8x")
21-
#set ($payaraVersion = "7.2026.5")
17+
#set ($payaraVersion = "7.2026.6")
2218
#elseif (${jakartaVersion} == '10')
2319
#set ($eeApiVersion = "10.0.0")
24-
#set ($glassfishVersion = "7.0.25")
20+
#if (${javaVersion} == '11')
21+
#set ($glassfishVersion = "7.0.25")
22+
#else
23+
#set ($glassfishVersion = "7.1.0")
24+
#end
2525
#set ($glassfishContainerId = "glassfish7x")
2626
#set ($payaraVersion = "6.2025.11")
2727
#if (${javaVersion} == '11')
28-
#set ($wildflyVersion = "29.0.1.Final")
28+
#set ($wildflyVersion = "34.0.1.Final")
2929
#else
30-
#set ($wildflyVersion = "39.0.1.Final")
30+
#set ($wildflyVersion = "40.0.1.Final")
3131
#end
3232
#elseif (${jakartaVersion} == '9.1')
3333
#set ($eeApiVersion = "9.1.0")
@@ -52,7 +52,7 @@
5252
#set ($glassfishContainerId = "glassfish5x")
5353
#set ($payaraVersion = "5.2022.5")
5454
#set ($tomeeVersion = "8.0.16")
55-
#set ($wildflyVersion = "26.1.3.Final")
55+
#set ($wildflyVersion = "26.1.2.Final")
5656
#end
5757
<?xml version="1.0" encoding="UTF-8"?>
5858
<project xmlns="http://maven.apache.org/POM/4.0.0"
@@ -104,8 +104,10 @@
104104
#if (${runtime} == 'wildfly')
105105
#if (${javaVersion} == '8')
106106
<wildfly-plugin.version>3.0.2.Final</wildfly-plugin.version>
107-
#else
107+
#elseif ((${jakartaVersion} == '8') || (${javaVersion} == '11'))
108108
<wildfly-plugin.version>5.1.5.Final</wildfly-plugin.version>
109+
#else
110+
<wildfly-plugin.version>6.0.0.Final</wildfly-plugin.version>
109111
#end
110112
#end
111113
#if (${runtime} == 'open-liberty')

ui/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mvn clean install
1616
```
1717

1818
## Running the UI
19-
In order to run the UI, please execute the following from this directory. You can also simply build the war from Maven and deploy the war to either WildFly 28 or JBoss EAP 8. You can do this in an IDE if desired. Note that you can override the underlying archetype version used by setting the `ARCHETYPE_VERSION` environment variable (the default version will be the most recent released to
19+
In order to run the UI, please execute the following from this directory. You can also simply build the war from Maven and deploy the war to either WildFly 30 or JBoss EAP 8. You can do this in an IDE if desired. Note that you can override the underlying archetype version used by setting the `ARCHETYPE_VERSION` environment variable (the default version will be the most recent released to
2020
Maven Central, see [here](https://mvnrepository.com/artifact/org.eclipse.starter/jakarta-starter) for the latest value).
2121

2222
```

ui/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
<artifactId>wildfly-maven-plugin</artifactId>
185185
<version>5.1.5.Final</version>
186186
<configuration>
187-
<version>28.0.0.Final</version>
187+
<version>30.0.1.Final</version>
188188
<server-config>standalone.xml</server-config>
189189
</configuration>
190190
</plugin>

ui/src/main/java/org/eclipse/starter/ui/Project.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,7 @@ public void onDockerChange() {
258258
private void updateRuntimeEnabledStates() {
259259
runtimes.get("none").setDisabled(docker);
260260

261-
if (jakartaVersion == 11) {
262-
// GlassFish does not support EE 11 yet
263-
runtimes.get("glassfish").setDisabled(true);
264-
} else if (profile.equals("core")) {
261+
if (profile.equals("core")) {
265262
// GlassFish does not support Core Profile
266263
runtimes.get("glassfish").setDisabled(true);
267264
} else if (jakartaVersion == 8 && javaVersion > 8) {
@@ -270,8 +267,12 @@ private void updateRuntimeEnabledStates() {
270267
} else if ((jakartaVersion == 9 || jakartaVersion == 9.1) && javaVersion == 21) {
271268
// GlassFish 6 does not support Java SE 21.
272269
runtimes.get("glassfish").setDisabled(true);
273-
} else if (docker && !(jakartaVersion == 10 && profile.equals("full") && javaVersion == 17)) {
274-
// GlassFish with Docker only supported with EE 10 + platform + Java 17
270+
} else if (jakartaVersion == 11 && javaVersion < 21) {
271+
// GlassFish 8 only supports Java SE 21 and above
272+
runtimes.get("glassfish").setDisabled(true);
273+
} else if (docker && !(profile.equals("full")
274+
&& ((jakartaVersion == 10 && javaVersion >= 17) || jakartaVersion == 11))) {
275+
// GlassFish with Docker only supported with EE 10 + full + Java 17+, or EE 11 + full
275276
runtimes.get("glassfish").setDisabled(true);
276277
} else {
277278
runtimes.get("glassfish").setDisabled(false);

0 commit comments

Comments
 (0)