Skip to content

Commit

Permalink
Fixes #145 - Add Piranha Embedded as an available stack (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem committed Mar 15, 2024
1 parent af2153a commit cbdda2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main/java/start/ProjectZipBean.java
Expand Up @@ -85,6 +85,16 @@ private String getBuildPluginsForPomXml(StartModel model) {
*/
private String getDependenciesForPomXml(StartModel model) {
StringBuilder builder = new StringBuilder();
if (model.getStack().equals("embedded")) {
builder.append("""
<dependency>
<groupId>cloud.piranha</groupId>
<artifactId>piranha-embedded</artifactId>
<version>24.2.0</version>
<scope>compile</scope>
</dependency>
""");
}
if (model.getStack().equals("coreprofile")) {
builder.append("""
<dependency>
Expand All @@ -109,7 +119,7 @@ private String getDependenciesForPomXml(StartModel model) {
builder.append("""
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-core-api</artifactId>
<artifactId>jakarta.jakartaee-web-api</artifactId>
<version>10.0.0</version>
<scope>provided</scope>
</dependency>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/start/StartBean.java
Expand Up @@ -160,6 +160,7 @@ public SelectItem[] getPackagings() {
*/
public SelectItem[] getStacks() {
return new SelectItem[]{
new SelectItem("embedded", "Piranha Embedded"),
new SelectItem("servlet", "Jakarta Servlet 6"),
new SelectItem("coreprofile", "Jakarta Core Profile 10"),
new SelectItem("webprofile", "Jakarta Web Profile 10"),};
Expand Down

0 comments on commit cbdda2e

Please sign in to comment.