Added WAR instructions

This commit is contained in:
Erik C. Thauvin 2023-10-30 12:28:56 -07:00
parent 2e9c73968c
commit 2b69c37e2b
3 changed files with 11 additions and 12 deletions

2
.idea/misc.xml generated
View file

@ -17,6 +17,8 @@
<pattern value="com.example.springboot.Application" method="main" /> <pattern value="com.example.springboot.Application" method="main" />
<pattern value="com.example.springboot.ApplicationBuild" method="main" /> <pattern value="com.example.springboot.ApplicationBuild" method="main" />
<pattern value="com.example.springboot.HelloControllerIT" method="main" /> <pattern value="com.example.springboot.HelloControllerIT" method="main" />
<pattern value="com.example.springboot.ApplicationBuild" method="bootjar" />
<pattern value="com.example.springboot.ApplicationBuild" method="bootwar" />
</component> </component>
<component name="PDMPlugin"> <component name="PDMPlugin">
<option name="customRuleSets"> <option name="customRuleSets">

View file

@ -23,7 +23,7 @@ To access the web application services:
``` ```
curl localhost:8080/actuator/health curl localhost:8080/actuator/health
curl localhost:8080/actuator/info curl localhost:8080/actuator/info
curl localhost:8080/actuator/shutdown curl -X POST localhost:8080/actuator/shutdown
``` ```
## Testing the Application ## Testing the Application
@ -34,9 +34,16 @@ To run the web application tests, issue the following command:
./bld test ./bld test
``` ```
## Creating and launching the executable JAR ## Creating and launching the executable Java Archive (JAR)
``` ```
./bld bootjar ./bld bootjar
java -jar build/dist/demoapplication-0.1.0-boot.jar java -jar build/dist/demoapplication-0.1.0-boot.jar
``` ```
## Creating and launching the executable Web Archive (WAR)
```
./bld bootwa
java -jar build/dist/demoapplication-0.1.0-boot.war
```

View file

@ -52,14 +52,4 @@ public class ApplicationBuild extends WebProject {
.fromProject(this) .fromProject(this)
.execute(); .execute();
} }
@BuildCommand(summary = "Creates an executable JAR for the project")
public void uberjar() throws Exception {
bootjar();
}
@BuildCommand(summary = "Create an executable WAR for the project")
public void war() throws Exception {
bootwar();
}
} }