You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Erik Schepers (JIRA)" <ji...@codehaus.org> on 2009/12/02 21:55:55 UTC

[jira] Updated: (MECLIPSE-130) extra empty lines are preserved when writing Manifest.mf file

     [ http://jira.codehaus.org/browse/MECLIPSE-130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erik Schepers updated MECLIPSE-130:
-----------------------------------

    Attachment: EclipseOSGiManifestWriter.java.patch

Ok, I did some looking into the code. 

The originally proposed patch does not solve the problem (as the author states it merely disables manifest-generation, so the bug does not show).

The real problem is in the EclipseOSGiManifestWriter class, which writes the faulty manifest file.
It has two problems:
 1. It copies the last, empty, line of the original manifest to the new manifest, and then adds the Bundle-Classpath header, causing a newline in the middle of the manifest-file
 2. It does not insert an empty line after the inserted Bundle-Classpath header.

I've attached a simple patch (against 2.7) that ensures a correct manifest.

(BTW it would be even better to use the java.util.jar.Manifest class to read/modify/write the manifest. This ensures that the manifest is correct...)

> extra empty lines are preserved when writing Manifest.mf file
> -------------------------------------------------------------
>
>                 Key: MECLIPSE-130
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-130
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: OSGi, Manifest
>    Affects Versions: 2.3
>         Environment: Windows Xp, eclipse 3.2.0, jdk 1.5, maven 2.0.4 
>            Reporter: stephane bouchet
>            Priority: Minor
>         Attachments: EclipseOSGiManifestWriter.java.patch, MECLIPSE_130.patch, MECLIPSE_130_patch.diff
>
>
> Hi, 
> when i use the last snapshot in pde projects, i notice that bug : 
> the Bundle:Classpath entry is written in the end of the file, but if there is empty line before writing this entry, they are not removed. 
> So eclipse complains about it. 
> To resolve this, i had to manually delete these empty lines. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira