jira-importer commented on issue #230: URL: https://github.com/apache/maven-jar-plugin/issues/230#issuecomment-2956684030
**[Steven Coco](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=steevcoco)** commented Hi. Well, simply, lines in the manifest cannot be longer than 72 bytes -- not characters, but UTF-8 encoded bytes. So, if a given attribute value causes the first line of the name-value pair to exceed that, it needs to be broken across more than one line. That's all. To do that, the lines after the first must be preceeded with a single space -- not any whitespace, but only a single space character. -- Presumably, if the attribute value so happens to contain some kind of white space at this location, only the first space character is stripped away and the remainder of the line is the continuing attribute value. But then importantly also, the first blank line in the manifest separates the main attributes section from the rest, the per-entry attributes. So Maven can't put any fully blank lines in the manifest's main section. And it also can't do that in individual per-entry sections either. But it will do that. Does tht make sense? I realized that I mixed up the posted test case; I posted a few issues at the same time and mixed files up, and this zip is not useful. I'll see if I can attach a better test case: but if I fail, you can make a simple POM, and set the \<description> attribute literally like this: \<description> This is a problem. \</description> Then Maven will scoop this up and place it into the manifest as the "Specification Title", and it will include the blank line and all the rest. This Jar is then invalid. The section in the Jar specification titled "Notes on Manifest and Signature Files" explains the line length and breaking long lines. Thanks!! - Steven Coco -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
