Setting up the application build

Whatever pom.xml we have used until now is enough to execute our sample REST service. This service would package the code into a JAR. To make this JAR executable we need to opt for the following options:

Here, we use the Maven tool to execute the generated JAR, steps for the same are as follows:

To build the JAR, perform the mvn clean package Maven goal. It creates the JAR file in a target directory, then, the JAR can be executed using the command: