Maven Archiver putting in weird line breaks in classpath for manifest

只愿长相守 提交于 2019-12-19 16:55:16

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/7402271/maven-archiver-putting-in-weird-line-breaks-in-classpath-for-manifest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!