Konrad Windszus opened MSHARED-815 and commented
According to https://docs.oracle.com/javase/10/docs/specs/jar/jar.html#name-value-pairs-and-sections
Groups of name-value pairs are known as a "section". Sections are separated from other sections by empty lines.
Therefore empty lines in attribute values lead to invalid manifests and must somehow be escaped.
As this is not done by default in java.util.jar.Attributes.writeMain(...) the method MavenArchiver.addManifestAttribute(...) should either throw an exception in case of empty lines given to parameter value or escape those empty lines somehow (
|
Manifest.Attribute attr = new Manifest.Attribute( key, value ); |
).
Affects: maven-archiver-3.4.0
Issue Links:
- JCRVLT-324 In case of a long project description in CDATA the resulting MANIFEST.MF is invalid
Remote Links:
Konrad Windszus opened MSHARED-815 and commented
According to https://docs.oracle.com/javase/10/docs/specs/jar/jar.html#name-value-pairs-and-sections
Therefore empty lines in attribute values lead to invalid manifests and must somehow be escaped.
As this is not done by default in
java.util.jar.Attributes.writeMain(...)the methodMavenArchiver.addManifestAttribute(...)should either throw an exception in case of empty lines given to parametervalueor escape those empty lines somehow (maven-archiver/src/main/java/org/apache/maven/archiver/MavenArchiver.java
Line 221 in d454ab3
Affects: maven-archiver-3.4.0
Issue Links:
Remote Links: