When exporting a project into a jar file in intellij the content of the META-INF/MANIFEST.MF file is altered and no longer contains the entry point(main class) even though the source/main/java/META-INF/MANIFEST.MF contains a valid entry point:
$ cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Main-Class: org.fiware.kiara.generator.kiaragen
The project directory looks like:
where MANIFEST.MF is the (valid) manifest file. Upon creation of an artifact the correct meta directory is picked:
Unpacking the exported .jar file shows a manifest file with a completely different content:
$ jar xf kiaragen.jar
cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Implementation-Title: Some Vendor
Implementation-Version: 1.0.1
Archiver-Version: Plexus Archiver
Built-By: ub
Specification-Vendor: Some Vendor
Specification-Title: Some Vendor
Implementation-Vendor-Id:
Created-By: Apache Maven
Build-Jdk: 1.6.0_29
Specification-Version: 1.0.1
Implementation-Vendor: Some Vendor
Where does Intellij find this information and why does it remove the Main-Class entry point?