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
44 changes: 43 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,27 @@ jobs:
docker rmi test-image
rm -rf app/open-liberty

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

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

- name: Run Archetype for EE 11 Core Profile, SE 17, Open Liberty, with Docker
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=11 -Dprofile=core -DjavaVersion=17 -Druntime="open-liberty" -Ddocker=yes -DoutputDirectory=app/open-liberty -Dgoals="clean package"
docker build -t test-image app/open-liberty/jakartaee-hello-world
docker rmi test-image
rm -rf app/open-liberty

- name: Run Archetype for EE 8, SE 17, 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=17 -Druntime=payara -Ddocker=yes -DoutputDirectory=app/payara -Dgoals="clean package"
Expand Down Expand Up @@ -901,7 +922,7 @@ jobs:
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.8.0-SNAPSHOT -DjakartaVersion=11 -Dprofile=full -DjavaVersion=17 -Druntime=wildfly -DoutputDirectory=app/wildfly -Dgoals="clean package" | tee mvn_output.txt

MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="only Payara currently supports Jakarta EE 11 in a stable release"
ERROR_MESSAGE="WildFly does not support Jakarta EE 11"
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
Expand Down Expand Up @@ -1074,6 +1095,27 @@ jobs:
docker rmi test-image
rm -rf app/open-liberty

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

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

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

- 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" | tee mvn_output.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ private validateInput(jakartaVersion, profile, javaVersion, runtime, docker, Fil
throw new RuntimeException("Failed, valid Docker options are yes and no")
}

// For now, this catch-all will simplify the rest of the validation.
// It should be evolved once more runtimes properly suppport Jakarta EE 11.
if ((jakartaVersion == '11') && (runtime != 'none') && (runtime != 'payara')) {
FileUtils.forceDelete(outputDirectory)
throw new RuntimeException("Failed, only Payara currently supports Jakarta EE 11 in a stable release")
}

if ((profile == 'core') && (Double.valueOf(jakartaVersion) < 10)) {
FileUtils.forceDelete(outputDirectory)
throw new RuntimeException("Failed, the Core Profile is only supported for Jakarta EE 10 and above")
Expand All @@ -69,6 +62,11 @@ 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")
Expand Down Expand Up @@ -127,6 +125,11 @@ private validateInput(jakartaVersion, profile, javaVersion, runtime, docker, Fil
}

if (runtime == 'wildfly') {
if ((jakartaVersion == '11')) {
FileUtils.forceDelete(outputDirectory)
throw new RuntimeException("Failed, WildFly does not support Jakarta EE 11")
}

if ((jakartaVersion == '9') || (jakartaVersion == '9.1')) {
FileUtils.forceDelete(outputDirectory)
throw new RuntimeException("Failed, WildFly does not offer a stable release for Jakarta EE 9 or Jakarta EE 9.1")
Expand Down
6 changes: 1 addition & 5 deletions ui/src/main/java/org/eclipse/starter/ui/Project.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,7 @@ private void updateRuntimeEnabledStates() {
runtimes.get("glassfish").setDisabled(false);
}

if (jakartaVersion == 11) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This else-if block can now be removed altogether.

runtimes.get("open-liberty").setDisabled(true);
} else {
runtimes.get("open-liberty").setDisabled(false);
}
runtimes.get("open-liberty").setDisabled(false);

if (jakartaVersion == 8 && javaVersion == 21) {
// Payara 5 does not support Java SE 21.
Expand Down
6 changes: 3 additions & 3 deletions ui/src/main/webapp/index.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</p:selectOneMenu>
<h:outputText
styleClass="footnote"
value="Jakarta EE 10 and above requires Java SE above 8."/>
value="Jakarta EE 11 requires Java SE 17 or later, Jakarta EE 10 requires Java SE 11 or later."/>
</p:column>

<p:column>
Expand All @@ -52,7 +52,7 @@
</p:selectOneMenu>
<h:outputText
styleClass="footnote"
value="Core Profile only available for Jakarta EE 10 and later."/>
value="Core Profile is only available for Jakarta EE 10 and later."/>
</p:column>

<p:column>
Expand All @@ -73,7 +73,7 @@
</p:selectOneMenu>
<h:outputText
styleClass="footnote"
value="Java SE 11 requires Jakarta EE below 11."/>
value="Java SE 11 requires Jakarta EE 10 or earlier, Java SE 8 requires Jakarta EE 9.1 or earlier."/>
</p:column>

<p:column>
Expand Down