I have successfully built my Spring MVC project with mvn clean package
by following this tutorial.
Now I am trying to run the service with:
mvn clean package && java -jar target/gs-serving-web-content-0.1.0.jar
But I get this error:
Failed to load Main-Class manifest attribute from target/gs-serving-web-content-0.1.0.jar
Am I missing something?
For spring boot, I've created a MANIFEST.MF file inside META-INF folder.
in my STS IDE, I placed the META-INFO folder inside the src/main/resources folder like so:
the content of the MANIFEST.MF file:
****the above manifest was created for me by using the "spring-boot-maven-plugin" mentioned above by "Mradul Pandey" (answered Sep 2 '15 at 4:50)
Hope this helps
If you are working with Spring Boot this will solve your problem:
Reference Guide | Spring Boot Maven Plugin