Skip to content

Commit 60a5503

Browse files
Merge pull request #382 from jhanders34/jha_branch1
Update starter to include Liberty for Jakarta EE 11
2 parents ed57da3 + 3666eb1 commit 60a5503

4 files changed

Lines changed: 57 additions & 16 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,27 @@ jobs:
801801
docker rmi test-image
802802
rm -rf app/open-liberty
803803
804+
- name: Run Archetype for EE 11, SE 17, Open Liberty, with Docker
805+
run: |
806+
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"
807+
docker build -t test-image app/open-liberty/jakartaee-hello-world
808+
docker rmi test-image
809+
rm -rf app/open-liberty
810+
811+
- name: Run Archetype for EE 11 Web Profile, SE 17, Open Liberty, with Docker
812+
run: |
813+
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"
814+
docker build -t test-image app/open-liberty/jakartaee-hello-world
815+
docker rmi test-image
816+
rm -rf app/open-liberty
817+
818+
- name: Run Archetype for EE 11 Core Profile, SE 17, Open Liberty, with Docker
819+
run: |
820+
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"
821+
docker build -t test-image app/open-liberty/jakartaee-hello-world
822+
docker rmi test-image
823+
rm -rf app/open-liberty
824+
804825
- name: Run Archetype for EE 8, SE 17, Payara, with Docker
805826
run: |
806827
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=full -DjavaVersion=17 -Druntime=payara -Ddocker=yes -DoutputDirectory=app/payara -Dgoals="clean package"
@@ -901,7 +922,7 @@ jobs:
901922
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=wildfly -DoutputDirectory=app/wildfly -Dgoals="clean package" | tee mvn_output.txt
902923
903924
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
904-
ERROR_MESSAGE="only Payara currently supports Jakarta EE 11 in a stable release"
925+
ERROR_MESSAGE="WildFly does not support Jakarta EE 11"
905926
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
906927
echo "Maven build did not fail, or the expected error message was not found. Test failed."
907928
exit 1
@@ -1074,6 +1095,27 @@ jobs:
10741095
docker rmi test-image
10751096
rm -rf app/open-liberty
10761097
1098+
- name: Run Archetype for EE 11, SE 21, Open Liberty, with Docker
1099+
run: |
1100+
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"
1101+
docker build -t test-image app/open-liberty/jakartaee-hello-world
1102+
docker rmi test-image
1103+
rm -rf app/open-liberty
1104+
1105+
- name: Run Archetype for EE 11 Web Profile, SE 21, Open Liberty, with Docker
1106+
run: |
1107+
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"
1108+
docker build -t test-image app/open-liberty/jakartaee-hello-world
1109+
docker rmi test-image
1110+
rm -rf app/open-liberty
1111+
1112+
- name: Run Archetype for EE 11 Core Profile, SE 21, Open Liberty, with Docker
1113+
run: |
1114+
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"
1115+
docker build -t test-image app/open-liberty/jakartaee-hello-world
1116+
docker rmi test-image
1117+
rm -rf app/open-liberty
1118+
10771119
- name: Run Archetype for EE 8, SE 21, Payara, with Docker
10781120
run: |
10791121
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.9.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=full -DjavaVersion=21 -Druntime=payara -Ddocker=yes -DoutputDirectory=app/payara -Dgoals="clean package" | tee mvn_output.txt

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@ private validateInput(jakartaVersion, profile, javaVersion, runtime, docker, Fil
4646
throw new RuntimeException("Failed, valid Docker options are yes and no")
4747
}
4848

49-
// For now, this catch-all will simplify the rest of the validation.
50-
// It should be evolved once more runtimes properly suppport Jakarta EE 11.
51-
if ((jakartaVersion == '11') && (runtime != 'none') && (runtime != 'payara')) {
52-
FileUtils.forceDelete(outputDirectory)
53-
throw new RuntimeException("Failed, only Payara currently supports Jakarta EE 11 in a stable release")
54-
}
55-
5649
if ((profile == 'core') && (Double.valueOf(jakartaVersion) < 10)) {
5750
FileUtils.forceDelete(outputDirectory)
5851
throw new RuntimeException("Failed, the Core Profile is only supported for Jakarta EE 10 and above")
@@ -69,6 +62,11 @@ private validateInput(jakartaVersion, profile, javaVersion, runtime, docker, Fil
6962
}
7063

7164
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+
7270
if (profile == 'core') {
7371
FileUtils.forceDelete(outputDirectory)
7472
throw new RuntimeException("Failed, GlassFish does not support the Core Profile")
@@ -127,6 +125,11 @@ private validateInput(jakartaVersion, profile, javaVersion, runtime, docker, Fil
127125
}
128126

129127
if (runtime == 'wildfly') {
128+
if ((jakartaVersion == '11')) {
129+
FileUtils.forceDelete(outputDirectory)
130+
throw new RuntimeException("Failed, WildFly does not support Jakarta EE 11")
131+
}
132+
130133
if ((jakartaVersion == '9') || (jakartaVersion == '9.1')) {
131134
FileUtils.forceDelete(outputDirectory)
132135
throw new RuntimeException("Failed, WildFly does not offer a stable release for Jakarta EE 9 or Jakarta EE 9.1")

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,7 @@ private void updateRuntimeEnabledStates() {
277277
runtimes.get("glassfish").setDisabled(false);
278278
}
279279

280-
if (jakartaVersion == 11) {
281-
runtimes.get("open-liberty").setDisabled(true);
282-
} else {
283-
runtimes.get("open-liberty").setDisabled(false);
284-
}
280+
runtimes.get("open-liberty").setDisabled(false);
285281

286282
if (jakartaVersion == 8 && javaVersion == 21) {
287283
// Payara 5 does not support Java SE 21.

ui/src/main/webapp/index.xhtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</p:selectOneMenu>
3232
<h:outputText
3333
styleClass="footnote"
34-
value="Jakarta EE 10 and above requires Java SE above 8."/>
34+
value="Jakarta EE 11 requires Java SE 17 or later, Jakarta EE 10 requires Java SE 11 or later."/>
3535
</p:column>
3636

3737
<p:column>
@@ -52,7 +52,7 @@
5252
</p:selectOneMenu>
5353
<h:outputText
5454
styleClass="footnote"
55-
value="Core Profile only available for Jakarta EE 10 and later."/>
55+
value="Core Profile is only available for Jakarta EE 10 and later."/>
5656
</p:column>
5757

5858
<p:column>
@@ -73,7 +73,7 @@
7373
</p:selectOneMenu>
7474
<h:outputText
7575
styleClass="footnote"
76-
value="Java SE 11 requires Jakarta EE below 11."/>
76+
value="Java SE 11 requires Jakarta EE 10 or earlier, Java SE 8 requires Jakarta EE 9.1 or earlier."/>
7777
</p:column>
7878

7979
<p:column>

0 commit comments

Comments
 (0)