Wrong Manifest.mf in IntelliJ IDEA created .jar

grudolf

I'm trying to package a project using OptaPlanner 6.0.1 libraries into a .jar through IntelliJ IDEA's jar artifact but instead of my manifest.mf containing the standard

Manifest-Version: 1.0
Main-Class: a.b.c.app

the jar uses the one supplied in ecj-3.7.2.jar, one of OptaPlanner's supporting libraries:

Manifest-Version: 1.0
Build-Jdk: 1.6.0_26
Built-By: ibrandt
Created-By: Apache Maven
Archiver-Version: Plexus Archiver

Because of this, a "no main manifest attribute, in appname.jar" error happens when trying to run the app. If I manually replace the manifest in .jar file with mine everything works correctly. Is there anything I can do to fix this?

I keep the libraries in a separate /lib directory and they were added to the root of jar artifact as Extracted Directory, IntelliJ IDEA is v13.0.1.

jamhan

I had the same problem.

Make sure your MANIFEST.MF is in:

src/main/resources/META_INF/

NOT

src/main/java/META_INF/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Replacing the MANIFEST.MF file in a JAR programmatically

From Java

What is the equivalent to JAR file META-INF/MANIFEST.MF for a JIMAGE file?

From Java

Gradle duplicate entry error: META-INF/MANIFEST.MF (Or how to delete a file from jar)

From Dev

What is the proper way to parse the entries of a manifest.mf file in jar?

From Dev

What is Manifest-Version in MANIFEST.MF?

From Dev

Java 'Could not find main class' for .jar even though its written in manifest.mf

From Dev

How to sign the jar files in Intellij IDEA?

From Dev

Run jar configuration in IntelliJ IDEA

From Dev

Importing jar file into IntelliJ Idea?

From Dev

Intellij IDEA using the wrong comment style

From Dev

How to use a "custom jar" in IntelliJ IDEA?

From Dev

Specify Manifest.MF during test - Fat / Shaded JAR

From Dev

Intellij Idea\ AndroidStudio prefix of created variables

From Dev

Gradle Manifest.MF

From Dev

How to add Classpath attribute in manifest.mf when using spring boot maven plugin to build jar

From Dev

IntelliJ IDEA export Runnable program as Uber Jar

From Dev

Does the jar MANIFEST.MF max line length of 72 include the EOL bytes

From Dev

spring-boot-devtools fails on JAR with missing MANIFEST.MF

From Dev

Programmatically read Manifest.MF from JAR in an EAR

From Dev

Creating Jar with Intellij 2016 - No main manifest attribute

From Dev

Adding external library to artifact jar in IntelliJ IDEA

From Dev

What is the equivalent to JAR file META-INF/MANIFEST.MF for a JIMAGE file?

From Dev

Java 'Could not find main class' for .jar even though its written in manifest.mf

From Dev

Specify Manifest.MF during test - Fat / Shaded JAR

From Dev

Class-Path not getting write to MANIFEST.MF file on jar creation

From Dev

Can't update manifest.mf inside .jar: line too long error

From Dev

spring-boot-devtools fails on JAR with missing MANIFEST.MF

From Dev

Intellij Idea not finding jar

From Dev

META.MF already exists n VCS in IntelliJ Idea

Related Related

  1. 1

    Replacing the MANIFEST.MF file in a JAR programmatically

  2. 2

    What is the equivalent to JAR file META-INF/MANIFEST.MF for a JIMAGE file?

  3. 3

    Gradle duplicate entry error: META-INF/MANIFEST.MF (Or how to delete a file from jar)

  4. 4

    What is the proper way to parse the entries of a manifest.mf file in jar?

  5. 5

    What is Manifest-Version in MANIFEST.MF?

  6. 6

    Java 'Could not find main class' for .jar even though its written in manifest.mf

  7. 7

    How to sign the jar files in Intellij IDEA?

  8. 8

    Run jar configuration in IntelliJ IDEA

  9. 9

    Importing jar file into IntelliJ Idea?

  10. 10

    Intellij IDEA using the wrong comment style

  11. 11

    How to use a "custom jar" in IntelliJ IDEA?

  12. 12

    Specify Manifest.MF during test - Fat / Shaded JAR

  13. 13

    Intellij Idea\ AndroidStudio prefix of created variables

  14. 14

    Gradle Manifest.MF

  15. 15

    How to add Classpath attribute in manifest.mf when using spring boot maven plugin to build jar

  16. 16

    IntelliJ IDEA export Runnable program as Uber Jar

  17. 17

    Does the jar MANIFEST.MF max line length of 72 include the EOL bytes

  18. 18

    spring-boot-devtools fails on JAR with missing MANIFEST.MF

  19. 19

    Programmatically read Manifest.MF from JAR in an EAR

  20. 20

    Creating Jar with Intellij 2016 - No main manifest attribute

  21. 21

    Adding external library to artifact jar in IntelliJ IDEA

  22. 22

    What is the equivalent to JAR file META-INF/MANIFEST.MF for a JIMAGE file?

  23. 23

    Java 'Could not find main class' for .jar even though its written in manifest.mf

  24. 24

    Specify Manifest.MF during test - Fat / Shaded JAR

  25. 25

    Class-Path not getting write to MANIFEST.MF file on jar creation

  26. 26

    Can't update manifest.mf inside .jar: line too long error

  27. 27

    spring-boot-devtools fails on JAR with missing MANIFEST.MF

  28. 28

    Intellij Idea not finding jar

  29. 29

    META.MF already exists n VCS in IntelliJ Idea

HotTag

Archive