This is example project to demonstrate how to use maven-assembly-plugin to package a SpringBoot application into a non-fat jar.
The resulting package structure will be:
.
βββ bin
βΒ Β βββ start.sh
βΒ Β βββ stop.sh
βββ classes
βΒ Β βββ application.yml
βΒ Β βββ com
βΒ Β βΒ Β βββ kchen
βΒ Β βΒ Β βββ example
βΒ Β βΒ Β βββ ExampleApplication.class
βΒ Β βΒ Β βββ controller
βΒ Β βΒ Β βββ HomeController.class
βΒ Β βββ logback-spring.xml
βββ lib
βΒ Β βββ classmate-1.3.3.jar
βΒ Β βββ hibernate-validator-5.3.5.Final.jar
βΒ Β βββ jackson-annotations-2.8.0.jar
βΒ Β βββ jackson-core-2.8.8.jar
βΒ Β βββ jackson-databind-2.8.8.jar
βΒ Β βββ jboss-logging-3.3.1.Final.jar
βΒ Β βββ jcl-over-slf4j-1.7.25.jar
βΒ Β βββ jul-to-slf4j-1.7.25.jar
βΒ Β βββ log4j-over-slf4j-1.7.25.jar
βΒ Β βββ logback-classic-1.1.11.jar
βΒ Β βββ logback-core-1.1.11.jar
βΒ Β βββ slf4j-api-1.7.25.jar
βΒ Β βββ snakeyaml-1.17.jar
βΒ Β βββ spring-aop-4.3.9.RELEASE.jar
βΒ Β βββ spring-beans-4.3.9.RELEASE.jar
βΒ Β βββ spring-boot-1.5.4.RELEASE.jar
βΒ Β βββ spring-boot-autoconfigure-1.5.4.RELEASE.jar
βΒ Β βββ spring-boot-starter-1.5.4.RELEASE.jar
βΒ Β βββ spring-boot-starter-logging-1.5.4.RELEASE.jar
βΒ Β βββ spring-boot-starter-tomcat-1.5.4.RELEASE.jar
βΒ Β βββ spring-boot-starter-web-1.5.4.RELEASE.jar
βΒ Β βββ spring-context-4.3.9.RELEASE.jar
βΒ Β βββ spring-core-4.3.9.RELEASE.jar
βΒ Β βββ spring-expression-4.3.9.RELEASE.jar
βΒ Β βββ spring-web-4.3.9.RELEASE.jar
βΒ Β βββ spring-webmvc-4.3.9.RELEASE.jar
βΒ Β βββ tomcat-embed-core-8.5.15.jar
βΒ Β βββ tomcat-embed-el-8.5.15.jar
βΒ Β βββ tomcat-embed-websocket-8.5.15.jar
βΒ Β βββ validation-api-1.1.0.Final.jar
βββ log
βββ example.log
The start.sh and stop.sh scripts borrowed a lot of inspiration from Zhang Kaitao's blog:
Many thanks to Kaitao!