In Maven pom.xml specify the main class in the manifest file

If we build standalone Java application (jar) via Maven, there is problem, its by default not add the Main class name into MANIFEST.MF in generated jar file. this is file is used, when run the application via java -jar app.jar

To add the main class info in manifest file we need to add maven-jar-plugin in pom.xml file and specify the main class info.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.