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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With