A JAR (Java Archive) packages compiled classes, resources, and metadata for distribution or execution. An executable Spring Boot JAR also includes dependency libraries and a manifest identifying the application’s main class. section 1.2.2
For a Spring Boot project initialized with JAR packaging, Maven or Gradle can build the executable archive. Maven places it in target; Gradle places it in build/libs. Run the resulting file with java -jar. section 18.2
Build and run Taco Cloud
The Maven wrapper packages Taco Cloud, then java -jar starts the resulting archive. Its bootstrap class runs the Spring application. For a web application, the JAR starts an embedded server and listens on the configured port, 8080 by default. section 1.2.2 section 18.2
$ ./mvnw package ... $ java -jar target/taco-cloud-0.0.1-SNAPSHOT.jar
See the Maven package and java -jar commands for Taco Cloud. section 1.2.2
An executable JAR is a production deployment option, including for a Platform as a Service such as Cloud Foundry. For a traditional Java application server, use a WAR instead. A JAR can also be packaged in a Docker container for Docker or Kubernetes. section 18.1 section 18.2
$ cf push tacocloud -p target/tacocloud-0.0.19-SNAPSHOT.jar
See how to push a built JAR to Cloud Foundry with the cf command-line tool. section 18.2

