Wrong Manifest.mf in IntelliJ IDEA created .jar
To fix:
- File > Project Structure
- Under Project Settings on the left, select "Artifacts"
- Find the JAR definition In the middle pane and select it
- In the left pane of the "Output Layout" tab find the jar file in the list and select it
- At the bottom, click the "Use Existing Manifest" button and select the manifest file that is in your project source.
- Click OK and run the build
I had the same problem.
Make sure your MANIFEST.MF is in:
src/main/resources/META_INF/
NOT
src/main/java/META_INF/