Bug? Valid MANIFEST.MF file invalidated when building Artifact (Class-Path)

Answered

Hello,

working with Intellij IDEA (Community Edition, last version as of November 2019), I have a project with multiple JAR dependencies. I provide my MANIFEST.MF file which has a Class-Path attribute properly set with newlines etc...

When building the artifact, this MANIFEST.MF file is modified and removes some spaces separating the different JAR files resulting in NoClassDefFoundError...

 

Is there anything that can be done to avoid that? (workaround).

 

Thanks

 

 

PS: I also encounter problems when creating artifact where generated MANIFEST.MF is placed in <project>/src/main/java directory instead of <project>/src/main/resources resulting in the Artifact Build action to not take it...

 

0
1 comment

Did you configure IntelliJ IDEA to generate Class-path in your manifest or does IntelliJ IDEA modify the existing MANIFEST.MF you are referencing?

In any case, please file a bug at https://youtrack.jetbrains.com/issues/IDEA and attach a small sample project to illustrate the issue. The comment at https://youtrack.jetbrains.com/issue/IDEA-148005#focus=streamItem-27-1270856.0-0 looks related to your problem.

As a workaround you can generate the jar using Maven or Gradle instead of using IntelliJ IDEA artifact.

0

Please sign in to leave a comment.