ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18206] - ejbjar task doesn't preserve last line of MANIFEST.MF
Date Fri, 28 Mar 2003 02:40:32 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18206>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18206

ejbjar task doesn't preserve last line of MANIFEST.MF

conor@cortexebusiness.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX



------- Additional Comments From conor@cortexebusiness.com.au  2003-03-28 02:40 -------
Thanks for the detailed test case. Strictly speaking the manifest you have
provided is not quite valid. The grammar for a manifest section is as follows:
(see
http://java.sun.com/j2se/1.4.1/docs/guide/jar/jar.html#Manifest%20Specification) 

individual-section:             Name : value newline *perentry-attribute

Your manifest does not contain the required newline for the last section. 

There is however a note in the spec:
# Before parsing:

If the last character of the file is an EOF character (code 26), the EOF is
treated as whitespace. Two newlines are appended (one for editors that don't put
a newline at the end of the last line, and one so that the grammar doesn't have
to special-case the last entry, which may not have a blank line after it).

It appears the JDK's Manifest class does not do this. You can look at the
src.zip that comes with the JDK to confirm this. (Ant's Manifest does not have
this problem).

We could raise a bug against the JDK but that has already been done
http://developer.java.sun.com/developer/bugParade/bugs/4489716.html
and rejected (The rejection is bogus in light of the above comment in the spec,
IMHO).

Workaround is to add the newlines required to your manifest. We could preprocess
the Manifest through Ant's manifest class to handle this. I'll close this as a
WONTFIX now but feel free to follow up.

Mime
View raw message