Building an executable JAR using the Spring Boot Maven plugin
This recipe is intended for Spring Boot users only. If you are using a different framework that does not support building executable JARS, please refer to previous recipe.
Getting ready
The spring-boot-maven-plugin
is a Maven plugin built by the Spring Boot team to make packaging your Spring Boot applications easier. It not only allows you to package your project, but also helps with running and debugging your application. It introduces a new goal called repackage
, which pretty much repackages your original artifact (JAR or WAR) with an executable uber JAR that has all dependencies in it. If you are familiar with the maven-shade-plugin
, the repackage
goal in Spring Boot does shading. ...
Get Microservices Deployment Cookbook 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.