Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Archiver putting in weird line breaks in classpath for manifest

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 empty space.

Using Maven 3, and maven-jar-plugin version 2.3.2 my manifest ends up with some interesting line breaks in the classpath and I think that may be breaking my EAR when deployed into WAS 7.

Just want to make sure the manifest is OK to look like that (may not match byte length but so you get the picture):

Class-Path: log4j-1.2.16.jar projectthatislong-0.0.1-SNAPSHOT.jar projectt    
hatislong-0.0.1-SNAPSHOT.jar

Notice how it breaks in the middle of the third project at the end of the first line? Seems like that would not be a good thing. Is there a way to correct this? I don't believe the "customClasspathLayout" option is going to work for me.

like image 944
Justin Avatar asked Sep 13 '11 12:09

Justin


People also ask

What is class-path in manifest file?

By using the Class-Path header in the manifest, you can avoid having to specify a long -classpath flag when invoking Java to run your application. Note: The Class-Path header points to classes or JAR files on the local network, not JAR files within the JAR file or classes accessible over Internet protocols.


1 Answers

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.

like image 153
Brett Porter Avatar answered Oct 28 '22 02:10

Brett Porter