adding Executable Jars to Spring Maven Project

  1. Add the spring-boot-maven-plugin to the plugins section of your pom.xml file.
  2. Set the mainClass property in the configuration section of the spring-boot-maven-plugin to point to the main class of your application.
  3. Execute the mvn package command to build the executable JAR file.
  4. The executable JAR file will be created in the target directory of your Maven project.