Maven Archiver在类路径中添加奇怪的换行符以实现清单 [英] Maven Archiver putting in weird line breaks in classpath for manifest

查看:90
本文介绍了Maven Archiver在类路径中添加奇怪的换行符以实现清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据Java规范,jar的manifest.mf中的类路径行只能是一定数量的字节.之后插入一个换行符,新行以一个空白开始.

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.

使用Maven 3和maven-jar-plugin版本2.3.2,我的清单最终在类路径中出现了一些有趣的换行符,我认为当部署到WAS 7中时,可能会破坏我的EAR.

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

注意在第一行结尾的第三个项目中间如何中断它?似乎那不是一件好事.有没有办法纠正这个问题?我不认为"customClasspathLayout"选项对我有用.

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.

推荐答案

这与

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.

这篇关于Maven Archiver在类路径中添加奇怪的换行符以实现清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆