Maven JAR Plugin
  1. Maven JAR Plugin
  2. MJAR-153

Missing continuation characters in Export-Package field

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux, Maven 3.0.4
    • Number of attachments :
      1

      Description

      The following plugin configuration results in an "Export-Package" field which has two problems. First, every other line has "CR" instead of just "CRLF'. Second, every other line is missing the continuation character. This latter problem results in an invalid header exception when the jar is opened by Java.

                  <plugin>
                      <artifactId>maven-jar-plugin</artifactId>
                      <version>2.4</version>
                      <configuration>
                          <archive>
                              <manifestEntries>
                                  <Bundle-SymbolicName>a.test.of.maven-jar-plugin</Bundle-SymbolicName>
                                  <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
                                  <Fragment-Host>org.jboss.weld.osgi-bundle</Fragment-Host>
                                  <Export-Package>
      org.jboss.weld.literal,
      org.jboss.weld.logging,
      org.jboss.weld.logging.messages,
      org.jboss.metadata.validation,
      org.jboss.weld.bean.interceptor,
      org.jboss.weld.metadata,
      org.jboss.weld.metadata.cache,
      org.jboss.weld.resources,
      org.jboss.weld.test,
      org.jboss.weld.tests,
      org.jboss.weld.tests.extensions,
      org.jboss.weld.tests.extensions.injectionTarget,
      org.jboss.weld.exceptions,
                                  </Export-Package>
                                  <Bundle-Description>a.test.of.maven-jar-plugin</Bundle-Description> 
                              </manifestEntries>
                          </archive>
                      </configuration>
                  </plugin>
      

      Here's the manifest contents:

      Manifest-Version: 1.0^M
      Export-Package: org.jboss.weld.literal,
      org.jboss.weld.logging,
      org.jb^M
       oss.weld.logging.messages,
      org.jboss.metadata.validation,
      org.jboss.w^M
       eld.bean.interceptor,
      org.jboss.weld.metadata,
      org.jboss.weld.metadat^M
       a.cache,
      org.jboss.weld.resources,
      org.jboss.weld.test,
      org.jboss.wel^M
       d.tests,
      org.jboss.weld.tests.extensions,
      org.jboss.weld.tests.extens^M
       ions.injectionTarget,
      org.jboss.weld.exceptions,^M
      Fragment-Host: org.jboss.weld.osgi-bundle^M
      Built-By: rseddon^M
      Build-Jdk: 1.6.0_29^M
      Bundle-ManifestVersion: 2^M
      Created-By: Apache Maven^M
      Bundle-Description: a.test.of.maven-jar-plugin^M
      Bundle-SymbolicName: a.test.of.maven-jar-plugin^M
      Archiver-Version: Plexus Archiver^M
      
      1. pom.xml
        2 kB
        Richard Seddon

        Activity

        Hide
        Jane Young added a comment -

        The same problem is happening in "Import-Package" field.

        Show
        Jane Young added a comment - The same problem is happening in "Import-Package" field.

          People

          • Assignee:
            Unassigned
            Reporter:
            Richard Seddon
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: