Command line via the JAR file

To run it through the Java file, we need to compile and package it, and then we can run the project with the Java command line. To compile and package it, we can use the pretty standard Maven command like this:

mvn clean install

After the project is compiled and packaged as a Fat-JAR, we can execute the JAR file, go to the target folder and check the files from this folder, probably the result will look like this:

We have two main files in our target folder, the cms-0.0.1-SNAPSHOT.jar and the cms-0.0.1-SNAPSHOT.jar.originalthe file with the .original extension is not executable. It is the original artifact resulting ...

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.