creating a jar file in spring boot that is using command line runners

I have an application that is using command-line runners from spring-boot. When I want to build a jar package through

.mvnw package
.mvnw clean install

It just start the application instead of building the .jar as expected. I have below plugin


The code is working fine but i need to use a jar file. How can i achieve that?


if you need run your test task, you need run “mvn clean package “, else run “mvn clean package -Dmaven.test.skip=true”, jar file in your project root path ‘target’