spring boot executable jar maven

To create an executable jar we need to add the spring-boot-maven-plugin to our pom.xml. Insert the following lines just below the dependencies

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

 

Use maven goal as below to create a executable jar

mvn clean package

 

Download

Spring Boot executable jar

 

Leave a Reply

Your email address will not be published. Required fields are marked *