Per the java spec the classpath line in the manifest.mf for a jar can only be a certain number of bytes. After that a line break is inserted and the new line begins with an
I was struggling ~8 hours. Plexus archiver always repacks/restructures your MANIFEST file if even you specify custom one. Line breaks are always added (72 chars limitation) There is no way to change this behaviour plexus archiver code I found the following workaround. I started using truezip-maven-plugin to update generated ear:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>truezip-maven-plugin</artifactId>
<executions>
<execution>
<id>replace-broken-manifest</id>
<goals>
<goal>copy</goal>
</goals>
<phase>package</phase>
<configuration>
<files>
<file>
<source>src/main/resources/META-INF/MANIFEST.MF</source>
<outputDirectory>${project.build.directory}/${project.build.finalName}.${project.packaging}/META-INF</outputDirectory>
</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
This is in line with the specification for Java manifest files. Note the line length is 72 characters, and if it exceeds that it is meant to wrap at that point.