diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c3407020..35b71846 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -117,6 +117,13 @@ jobs: 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" rm -rf app + - name: Run Archetype for EE 11, SE 21, GlassFish, with Docker + run: | + 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" + docker build -t test-image app/glassfish/jakartaee-hello-world + docker rmi test-image + rm -rf app/glassfish + - name: Run Archetype for EE 11, SE 21, Payara, with Docker run: | 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" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 17bb2cff..d796a1e6 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -132,7 +132,7 @@ jobs: 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 MAVEN_EXIT_CODE=${PIPESTATUS[0]} - WARN_MESSAGE="GlassFish only supports Docker for Jakarta EE 10" + WARN_MESSAGE="GlassFish only supports Docker for Jakarta EE 10 and above" if ! { [ $MAVEN_EXIT_CODE -eq 0 ] && [ ! -f app/glassfish/jakartaee-hello-world/Dockerfile ] && grep -q "$WARN_MESSAGE" mvn_output.txt; }; then echo "Maven build failed, a Dockerfile was found, or the expected warning was not found. Test failed." exit 1 @@ -426,7 +426,7 @@ jobs: 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 MAVEN_EXIT_CODE=${PIPESTATUS[0]} - WARN_MESSAGE="GlassFish only supports Docker for Java SE 17" + WARN_MESSAGE="GlassFish 7 only supports Docker for Java SE 17 and above" if ! { [ $MAVEN_EXIT_CODE -eq 0 ] && [ ! -f app/glassfish/jakartaee-hello-world/Dockerfile ] && grep -q "$WARN_MESSAGE" mvn_output.txt; }; then echo "Maven build failed, a Dockerfile was found, or the expected warning was not found. Test failed." exit 1 @@ -692,6 +692,19 @@ jobs: 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" rm -rf app + - name: Run Archetype for EE 11, SE 17, GlassFish + run: | + 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 + + MAVEN_EXIT_CODE=${PIPESTATUS[0]} + ERROR_MESSAGE="GlassFish 8 only supports Java SE 21 and above" + if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then + echo "Maven build did not fail, or the expected error message was not found. Test failed." + exit 1 + fi + + rm -f mvn_output.txt + - name: Run Archetype for EE 9, SE 17, GlassFish run: | 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: 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" rm -rf app + - name: Run Archetype for EE 11, SE 21, GlassFish, with Docker + run: | + 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" + docker build -t test-image app/glassfish/jakartaee-hello-world + docker rmi test-image + rm -rf app/glassfish + + - name: Run Archetype for EE 11 Web Profile, SE 21, GlassFish + run: | + 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" + rm -rf app/glassfish + - name: Run Archetype for EE 12, SE 21 run: | 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: rm -f mvn_output.txt - - name: Run Archetype for EE 10, SE 21, GlassFish + - name: Run Archetype for EE 10, SE 21, GlassFish, with Docker run: | - 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" + 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" + docker build -t test-image app/glassfish/jakartaee-hello-world + docker rmi test-image rm -rf app/glassfish - name: Run Archetype for EE 10 Web Profile, SE 21, GlassFish diff --git a/README.md b/README.md index 1a8c6cdc..ffc6c3b2 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ mvn archetype:generate -DarchetypeGroupId="org.eclipse.starter" -DarchetypeArtif ``` ## Running the UI -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 +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 [here](https://mvnrepository.com/artifact/org.eclipse.starter/jakarta-starter) for the latest value). ``` diff --git a/archetype/src/main/resources/META-INF/archetype-post-generate.groovy b/archetype/src/main/resources/META-INF/archetype-post-generate.groovy index 6cc485c4..6a3196c3 100644 --- a/archetype/src/main/resources/META-INF/archetype-post-generate.groovy +++ b/archetype/src/main/resources/META-INF/archetype-post-generate.groovy @@ -62,11 +62,6 @@ private validateInput(jakartaVersion, profile, javaVersion, runtime, docker, Fil } if (runtime == 'glassfish') { - if ((jakartaVersion == '11')) { - FileUtils.forceDelete(outputDirectory) - throw new RuntimeException("Failed, GlassFish does not support Jakarta EE 11") - } - if (profile == 'core') { FileUtils.forceDelete(outputDirectory) throw new RuntimeException("Failed, GlassFish does not support the Core Profile") @@ -81,6 +76,11 @@ private validateInput(jakartaVersion, profile, javaVersion, runtime, docker, Fil FileUtils.forceDelete(outputDirectory) throw new RuntimeException("Failed, GlassFish 6 does not support Java SE 21") } + + if ((Integer.valueOf(javaVersion) < 21) && (jakartaVersion == '11')) { + FileUtils.forceDelete(outputDirectory) + throw new RuntimeException("Failed, GlassFish 8 only supports Java SE 21 and above") + } } if (runtime == 'payara') { @@ -141,14 +141,16 @@ private generateRuntime(runtime, jakartaVersion, profile, javaVersion, docker, F switch (runtime) { case "glassfish": println "Generating code for GlassFish" if (docker.equalsIgnoreCase("yes")) { - if (Double.valueOf(jakartaVersion) != 10) { - println "WARNING: GlassFish only supports Docker for Jakarta EE 10" - FileUtils.forceDelete(new File(outputDirectory, "Dockerfile")) - } else if (profile != 'full') { + if (profile != 'full') { println "WARNING: GlassFish only supports Docker for the full platform" FileUtils.forceDelete(new File(outputDirectory, "Dockerfile")) - } else if (javaVersion != '17') { - println "WARNING: GlassFish only supports Docker for Java SE 17" + } else if (jakartaVersion == '10') { + if (Integer.valueOf(javaVersion) < 17) { + println "WARNING: GlassFish 7 only supports Docker for Java SE 17 and above" + FileUtils.forceDelete(new File(outputDirectory, "Dockerfile")) + } + } else if (jakartaVersion != '11') { + println "WARNING: GlassFish only supports Docker for Jakarta EE 10 and above" FileUtils.forceDelete(new File(outputDirectory, "Dockerfile")) } } diff --git a/archetype/src/main/resources/archetype-resources/Dockerfile b/archetype/src/main/resources/archetype-resources/Dockerfile index 912c51c7..6d9d55ff 100644 --- a/archetype/src/main/resources/archetype-resources/Dockerfile +++ b/archetype/src/main/resources/archetype-resources/Dockerfile @@ -42,17 +42,24 @@ #set ($deployDirectory = "/opt/jboss/wildfly/standalone/deployments/") #end #elseif (${jakartaVersion} == '11') - #if (${runtime} == 'payara') + #if (${runtime} == 'glassfish') + #set ($baseImage = "ghcr.io/eclipse-ee4j/glassfish:8.0.2") + #set ($deployDirectory = "/opt/gfinstall/glassfish/domains/domain1/autodeploy") + #elseif (${runtime} == 'payara') #if (${profile} == 'full') - #set ($baseImage = "payara/server-full:7.2026.5") + #set ($baseImage = "payara/server-full:7.2026.6") #else - #set ($baseImage = "payara/server-web:7.2026.5") + #set ($baseImage = "payara/server-web:7.2026.6") #end #set ($deployDirectory = "$DEPLOY_DIR") #end #else #if (${runtime} == 'glassfish') - #set ($baseImage = "ghcr.io/eclipse-ee4j/glassfish:7.0.25") + #if (${javaVersion} == '21') + #set ($baseImage = "ghcr.io/eclipse-ee4j/glassfish:7.1.0") + #else + #set ($baseImage = "ghcr.io/eclipse-ee4j/glassfish:7.0.25") + #end #set ($deployDirectory = "/opt/glassfish7/glassfish/domains/domain1/autodeploy") #elseif (${runtime} == 'payara') #if (${javaVersion} == '21') @@ -86,13 +93,11 @@ #set ($deployDirectory = "/usr/local/tomee/webapps/") #elseif (${runtime} == 'wildfly') #if (${javaVersion} == '21') - #set ($baseImage = "quay.io/wildfly/wildfly:latest-jdk21") + #set ($baseImage = "quay.io/wildfly/wildfly:40.0.1.Final-jdk21") #elseif (${javaVersion} == '17') - #set ($baseImage = "quay.io/wildfly/wildfly:latest-jdk17") - #elseif (${javaVersion} == '11') - #set ($baseImage = "quay.io/wildfly/wildfly:latest-jdk11") + #set ($baseImage = "quay.io/wildfly/wildfly:40.0.1.Final-jdk17") #else - #set ($baseImage = "quay.io/wildfly/wildfly") + #set ($baseImage = "quay.io/wildfly/wildfly:34.0.1.Final-jdk11") #end #set ($deployDirectory = "/opt/jboss/wildfly/standalone/deployments/") #end diff --git a/archetype/src/main/resources/archetype-resources/README.md b/archetype/src/main/resources/archetype-resources/README.md index 57358c66..7a607f14 100644 --- a/archetype/src/main/resources/archetype-resources/README.md +++ b/archetype/src/main/resources/archetype-resources/README.md @@ -43,7 +43,19 @@ Once the runtime starts, you can access the REST end-point at [http://localhost: #end #end - #if (((${docker} == 'yes') && (${runtime} != 'glassfish')) || ((${runtime} == 'glassfish') && (${docker} == 'yes') && (${jakartaVersion} == '10') && (${profile} == 'full') && (${javaVersion} == 17))) + #set ($showDocker = false) + #if (${docker} == 'yes') + #if (${runtime} != 'glassfish') + #set ($showDocker = true) + #elseif (${profile} == 'full') + #if ((${jakartaVersion} == '10') && ((${javaVersion} == 17) || (${javaVersion} == 21))) + #set ($showDocker = true) + #elseif (${jakartaVersion} == '11') + #set ($showDocker = true) + #end + #end + #end + #if ($showDocker) You can also run the project via Docker. To build the Docker image, execute the following commands from the directory where this file resides. Please ensure you have installed a [Java SE implementation](https://adoptium.net) appropriate for your Jakarta EE version/runtime diff --git a/archetype/src/main/resources/archetype-resources/pom.xml b/archetype/src/main/resources/archetype-resources/pom.xml index 8fcf3e85..2d45d0d1 100644 --- a/archetype/src/main/resources/archetype-resources/pom.xml +++ b/archetype/src/main/resources/archetype-resources/pom.xml @@ -12,22 +12,22 @@ #end #if (${jakartaVersion} == '11') #set ($eeApiVersion = "11.0.0") - #if (${javaVersion} == '17') - #set ($glassfishVersion = "8.0.0-JDK17") - #else - #set ($glassfishVersion = "8.0.0") - #end + #set ($glassfishVersion = "8.0.2") #set ($glassfishContainerId = "glassfish8x") - #set ($payaraVersion = "7.2026.5") + #set ($payaraVersion = "7.2026.6") #elseif (${jakartaVersion} == '10') #set ($eeApiVersion = "10.0.0") - #set ($glassfishVersion = "7.0.25") + #if (${javaVersion} == '11') + #set ($glassfishVersion = "7.0.25") + #else + #set ($glassfishVersion = "7.1.0") + #end #set ($glassfishContainerId = "glassfish7x") #set ($payaraVersion = "6.2025.11") #if (${javaVersion} == '11') - #set ($wildflyVersion = "29.0.1.Final") + #set ($wildflyVersion = "34.0.1.Final") #else - #set ($wildflyVersion = "39.0.1.Final") + #set ($wildflyVersion = "40.0.1.Final") #end #elseif (${jakartaVersion} == '9.1') #set ($eeApiVersion = "9.1.0") @@ -52,7 +52,7 @@ #set ($glassfishContainerId = "glassfish5x") #set ($payaraVersion = "5.2022.5") #set ($tomeeVersion = "8.0.16") - #set ($wildflyVersion = "26.1.3.Final") + #set ($wildflyVersion = "26.1.2.Final") #end 3.0.2.Final - #else + #elseif ((${jakartaVersion} == '8') || (${javaVersion} == '11')) 5.1.5.Final + #else + 6.0.0.Final #end #end #if (${runtime} == 'open-liberty') diff --git a/ui/README.md b/ui/README.md index e96c5ddf..cc1e9a8e 100644 --- a/ui/README.md +++ b/ui/README.md @@ -16,7 +16,7 @@ mvn clean install ``` ## Running the UI -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 +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 [here](https://mvnrepository.com/artifact/org.eclipse.starter/jakarta-starter) for the latest value). ``` diff --git a/ui/pom.xml b/ui/pom.xml index 17da4e4d..61fe536f 100644 --- a/ui/pom.xml +++ b/ui/pom.xml @@ -184,7 +184,7 @@ wildfly-maven-plugin 5.1.5.Final - 28.0.0.Final + 30.0.1.Final standalone.xml diff --git a/ui/src/main/java/org/eclipse/starter/ui/Project.java b/ui/src/main/java/org/eclipse/starter/ui/Project.java index a43147cd..3369b0dc 100644 --- a/ui/src/main/java/org/eclipse/starter/ui/Project.java +++ b/ui/src/main/java/org/eclipse/starter/ui/Project.java @@ -258,10 +258,7 @@ public void onDockerChange() { private void updateRuntimeEnabledStates() { runtimes.get("none").setDisabled(docker); - if (jakartaVersion == 11) { - // GlassFish does not support EE 11 yet - runtimes.get("glassfish").setDisabled(true); - } else if (profile.equals("core")) { + if (profile.equals("core")) { // GlassFish does not support Core Profile runtimes.get("glassfish").setDisabled(true); } else if (jakartaVersion == 8 && javaVersion > 8) { @@ -270,8 +267,12 @@ private void updateRuntimeEnabledStates() { } else if ((jakartaVersion == 9 || jakartaVersion == 9.1) && javaVersion == 21) { // GlassFish 6 does not support Java SE 21. runtimes.get("glassfish").setDisabled(true); - } else if (docker && !(jakartaVersion == 10 && profile.equals("full") && javaVersion == 17)) { - // GlassFish with Docker only supported with EE 10 + platform + Java 17 + } else if (jakartaVersion == 11 && javaVersion < 21) { + // GlassFish 8 only supports Java SE 21 and above + runtimes.get("glassfish").setDisabled(true); + } else if (docker && !(profile.equals("full") + && ((jakartaVersion == 10 && javaVersion >= 17) || jakartaVersion == 11))) { + // GlassFish with Docker only supported with EE 10 + full + Java 17+, or EE 11 + full runtimes.get("glassfish").setDisabled(true); } else { runtimes.get("glassfish").setDisabled(false);