No main manifest attribute in jar Maven and Spring Boot

Asked on June 08, 2018
In my Spring Boot Application I am creating JAR using 

mvn clean package

And when I run JAR using command

java -jar target/my-app.0.0.1-SNAPSHOT.jar

I am getting following error.

no main manifest attribute, in target/my-app.0.0.1-SNAPSHOT.jar

How to fix it?

Replied on June 08, 2018
Look for spring-boot-maven-plugin in build section in your pom.xml. If not available, include it.


in your pom.xml

Replied on June 08, 2018
Thanks. It works.

Write Answer

©2024 | Privacy Policy | Contact Us