IntelliJ Spring Boot: How to create an executable jar
You should use spring-boot-maven-plugin
or spring-boot-gradle-plugin
, depending on your preferred build system.
EDIT:
Just run ./gradlew build
I suggest to dive into this getting started guide. It clarifies a lot of stuff for beginners.
A typical Spring boot project is a Maven project or a Gradle-Project (I only know how to do it with Maven, for Gradle see [luboskrnacs answer][1]). So you just need to run the maven target
packageand pick the jar form the (created)
target` folder
use a shell, go to the project root directory (where the pom.xml
file is) and type
mvn clean package
cd target
the there is the xxx.jar file.