Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
build-archetype:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Java SE 8
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 8

- name: Cache Maven packages
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
rm -rf app/tomee

- name: Set up Java SE 11
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
Expand All @@ -82,7 +82,7 @@ jobs:
rm -rf app/tomee

- name: Set up Java SE 17
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
Expand All @@ -107,7 +107,7 @@ jobs:
rm -rf app/wildfly

- name: Set up Java SE 21
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
Expand All @@ -132,15 +132,15 @@ jobs:
build-ui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup Java
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17

- name: Cache Maven packages
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down
110 changes: 61 additions & 49 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
build-archetype:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Java SE 8
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: 8

- name: Cache Maven packages
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down Expand Up @@ -320,7 +320,7 @@ jobs:
rm -f mvn_output.txt

- name: Set up Java SE 11
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: 11
Expand Down Expand Up @@ -426,7 +426,7 @@ jobs:
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.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 17"
WARN_MESSAGE="GlassFish only supports Docker for Java SE 17"
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
Expand Down Expand Up @@ -627,7 +627,7 @@ jobs:
rm -rf app/wildfly

- name: Set up Java SE 17
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: 17
Expand Down Expand Up @@ -910,7 +910,7 @@ jobs:
rm -f mvn_output.txt

- name: Set up Java SE 21
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: 21
Expand Down Expand Up @@ -990,23 +990,16 @@ jobs:

- name: Run Archetype for EE 9, SE 21, GlassFish
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=9 -Dprofile=full -DjavaVersion=21 -Druntime=glassfish -DoutputDirectory=app/glassfish -Dgoals="clean package"
rm -rf app/glassfish

- name: Run Archetype for EE 9 Web Profile, SE 21, GlassFish
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=9 -Dprofile=web -DjavaVersion=21 -Druntime=glassfish -DoutputDirectory=app/glassfish -Dgoals="clean package"
rm -rf app/glassfish
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=9 -Dprofile=full -DjavaVersion=21 -Druntime=glassfish -DoutputDirectory=app/glassfish -Dgoals="clean package" | tee mvn_output.txt

- name: Run Archetype for EE 9.1, SE 21, GlassFish
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=9.1 -Dprofile=full -DjavaVersion=21 -Druntime=glassfish -DoutputDirectory=app/glassfish -Dgoals="clean package"
rm -rf app/glassfish
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="GlassFish 6 does not support Java SE 21"
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

- name: Run Archetype for EE 9.1 Web Profile, SE 21, GlassFish
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=9.1 -Dprofile=web -DjavaVersion=21 -Druntime=glassfish -DoutputDirectory=app/glassfish -Dgoals="clean package"
rm -rf app/glassfish
rm -f mvn_output.txt

- name: Run Archetype for EE 10, SE 21, GlassFish
run: |
Expand Down Expand Up @@ -1083,17 +1076,16 @@ jobs:

- name: Run Archetype for EE 8, SE 21, Payara, with Docker
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=full -DjavaVersion=21 -Druntime=payara -Ddocker=yes -DoutputDirectory=app/payara -Dgoals="clean package"
docker build -t test-image app/payara/jakartaee-hello-world
docker rmi test-image
rm -rf app/payara
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=full -DjavaVersion=21 -Druntime=payara -Ddocker=yes -DoutputDirectory=app/payara -Dgoals="clean package" | tee mvn_output.txt

- name: Run Archetype for EE 8 Web Profile, SE 21, Payara, with Docker
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=web -DjavaVersion=21 -Druntime=payara -Ddocker=yes -DoutputDirectory=app/payara -Dgoals="clean package"
docker build -t test-image app/payara/jakartaee-hello-world
docker rmi test-image
rm -rf app/payara
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="Payara 5 does not support Java SE 21"
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 10, SE 21, Payara, with Docker
run: |
Expand Down Expand Up @@ -1137,32 +1129,52 @@ jobs:
docker rmi test-image
rm -rf app/payara

- name: Run Archetype for EE 8 Web Profile, SE 21, TomEE
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=web -DjavaVersion=21 -Druntime=tomee -Ddocker=no -DoutputDirectory=app/tomee -Dgoals="clean package"
rm -rf app/tomee

- name: Run Archetype for EE 8 Web Profile, SE 21, TomEE, with Docker
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=web -DjavaVersion=21 -Druntime=tomee -Ddocker=yes -DoutputDirectory=app/tomee -Dgoals="clean package"
docker build -t test-image app/tomee/jakartaee-hello-world
docker rmi test-image
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=web -DjavaVersion=21 -Druntime=tomee -Ddocker=yes -DoutputDirectory=app/tomee -Dgoals="clean package" | tee mvn_output.txt

MAVEN_EXIT_CODE=${PIPESTATUS[0]}
WARN_MESSAGE="TomEE does not support Docker for Java SE 21"
if ! { [ $MAVEN_EXIT_CODE -eq 0 ] && [ ! -f app/tomee/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
fi

rm -f mvn_output.txt
rm -rf app/tomee

- name: Run Archetype for EE 9.1 Web Profile, SE 21, TomEE, with Docker
- name: Run Archetype for EE 9.1 Web Profile, SE 21, TomEE
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=9.1 -Dprofile=web -DjavaVersion=21 -Druntime=tomee -Ddocker=yes -DoutputDirectory=app/tomee -Dgoals="clean package"
docker build -t test-image app/tomee/jakartaee-hello-world
docker rmi test-image
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=9.1 -Dprofile=web -DjavaVersion=21 -Druntime=tomee -Ddocker=no -DoutputDirectory=app/tomee -Dgoals="clean package"
rm -rf app/tomee

- name: Run Archetype for EE 8, SE 21, WildFly
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=full -DjavaVersion=21 -Druntime=wildfly -Ddocker=no -DoutputDirectory=app/wildfly -Dgoals="clean package"
rm -rf app/wildfly

- name: Run Archetype for EE 8, SE 21, WildFly, with Docker
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=full -DjavaVersion=21 -Druntime=wildfly -Ddocker=yes -DoutputDirectory=app/wildfly -Dgoals="clean package"
docker build -t test-image app/wildfly/jakartaee-hello-world
docker rmi test-image
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=full -DjavaVersion=21 -Druntime=wildfly -Ddocker=yes -DoutputDirectory=app/wildfly -Dgoals="clean package" | tee mvn_output.txt

MAVEN_EXIT_CODE=${PIPESTATUS[0]}
WARN_MESSAGE="WildFly 26 does not support Docker for Java SE 21"
if ! { [ $MAVEN_EXIT_CODE -eq 0 ] && [ ! -f app/wildfly/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
fi

rm -f mvn_output.txt
rm -rf app/wildfly

- name: Run Archetype for EE 8 Web Profile, SE 21, WildFly, with Docker
- name: Run Archetype for EE 8 Web Profile, SE 21, WildFly
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=web -DjavaVersion=21 -Druntime=wildfly -Ddocker=yes -DoutputDirectory=app/wildfly -Dgoals="clean package"
docker build -t test-image app/wildfly/jakartaee-hello-world
docker rmi test-image
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=web -DjavaVersion=21 -Druntime=wildfly -Ddocker=no -DoutputDirectory=app/wildfly -Dgoals="clean package"
rm -rf app/wildfly

- name: Run Archetype for EE 10, SE 21, WildFly, with Docker
Expand All @@ -1189,15 +1201,15 @@ jobs:
build-ui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup Java
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: 17

- name: Cache Maven packages
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ private validateInput(jakartaVersion, profile, javaVersion, runtime, docker, Fil
FileUtils.forceDelete(outputDirectory)
throw new RuntimeException("Failed, GlassFish 5 only supports Java SE 8")
}

if ((javaVersion == '21') && ((jakartaVersion == '9') || (jakartaVersion == '9.1'))) {
FileUtils.forceDelete(outputDirectory)
throw new RuntimeException("Failed, GlassFish 6 does not support Java SE 21")
}
}

if (runtime == 'payara') {
Expand All @@ -86,6 +91,12 @@ private validateInput(jakartaVersion, profile, javaVersion, runtime, docker, Fil
throw new RuntimeException("Failed, Payara does not offer a stable release for Jakarta EE 9 or Jakarta EE 9.1")
}

// Payara 5 does not support Java SE 21
if ((jakartaVersion == '8') && (javaVersion == '21')) {
FileUtils.forceDelete(outputDirectory)
throw new RuntimeException("Failed, Payara 5 does not support Java SE 21")
}

// Payara 7 with EE 11 only supports SE 21 and above, not SE 17
if ((jakartaVersion == '11') && (javaVersion == '17')) {
FileUtils.forceDelete(outputDirectory)
Expand Down Expand Up @@ -134,7 +145,7 @@ private generateRuntime(runtime, jakartaVersion, profile, javaVersion, docker, F
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 17"
println "WARNING: GlassFish only supports Docker for Java SE 17"
FileUtils.forceDelete(new File(outputDirectory, "Dockerfile"))
}
}
Expand All @@ -147,9 +158,21 @@ private generateRuntime(runtime, jakartaVersion, profile, javaVersion, docker, F
break

case "tomee": println "Generating code for TomEE"
if (docker.equalsIgnoreCase("yes")) {
if (javaVersion == '21') {
println "WARNING: TomEE does not support Docker for Java SE 21"
FileUtils.forceDelete(new File(outputDirectory, "Dockerfile"))
}
}
break

case "wildfly": println "Generating code for WildFly"
if (docker.equalsIgnoreCase("yes")) {
if ((jakartaVersion == '8') && (javaVersion == '21')) {
println "WARNING: WildFly 26 does not support Docker for Java SE 21"
FileUtils.forceDelete(new File(outputDirectory, "Dockerfile"))
}
}
break

default: println "No runtime will be included in the sample"
Expand Down
6 changes: 5 additions & 1 deletion archetype/src/main/resources/archetype-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
#set ($glassfishVersion = "7.0.23")
#set ($glassfishContainerId = "glassfish7x")
#set ($payaraVersion = "6.2025.11")
#set ($wildflyVersion = "38.0.1.Final")
#if (${javaVersion} == '11')
#set ($wildflyVersion = "29.0.1.Final")
#else
#set ($wildflyVersion = "38.0.1.Final")
#end
#elseif (${jakartaVersion} == '9.1')
#set ($eeApiVersion = "9.1.0")
#set ($glassfishContainerId = "glassfish6x")
Expand Down
Loading