Bundlor
  1. Bundlor
  2. BNDLR-252

Maven: MANIFEST.MF generated but not added to the JAR

    Details

    • Type: Defect Defect
    • Status: Done Done
    • Priority: Minor Minor
    • Resolution: Works as Designed
    • Affects Version/s: 1.0.0.M4
    • Fix Version/s: None
    • Labels:
      None

      Description

      I use the manifest maven sample:

      [wolff@WhiteRabbit:~/bundlor-1.0.0.M4/projects/samples/maven/manifest]mvn install package
      ....
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 5 seconds
      [INFO] Finished at: Tue May 19 16:15:23 CEST 2009
      [INFO] Final Memory: 10M/18M
      [INFO] ------------------------------------------------------------------------
      ....

      The MANIFEST.MF is created:
      [wolff@WhiteRabbit:~/bundlor-1.0.0.M4/projects/samples/maven/manifest]cat target/generated-resources/META-INF/MANIFEST.MF
      Manifest-Version: 1.0
      Bundle-Name: Bundlor Maven Transform Sample
      Archiver-Version: Plexus Archiver
      Build-Jdk: 1.5.0_16
      Built-By: wolff
      Created-By: Apache Maven
      Bundle-ManifestVersion: 2
      Bundle-Vendor: SpringSource
      Bundle-SymbolicName: com.springsource.bundlor.sample.maven
      Export-Package: com.springsource.bundlor.sample.maven;provider="bundlo
      r";version="1.0.0.BUILD-SNAPSHOT"

      But it is not in the JAR:

      [wolff@WhiteRabbit:~/bundlor-1.0.0.M4/projects/samples/maven/manifest]jar xvf target/com.springsource.bundlor.maven.sample-1.0.0.BUILD-SNAPSHOT.jar
      erstellt: META-INF/
      dekomprimiert: META-INF/MANIFEST.MF
      erstellt: com/
      ....

      [wolff@WhiteRabbit:~/bundlor-1.0.0.M4/projects/samples/maven/manifest]more META-INF/MANIFEST.MF
      Manifest-Version: 1.0
      Archiver-Version: Plexus Archiver
      Created-By: Apache Maven
      Built-By: wolff
      Build-Jdk: 1.5.0_16

        Activity

        Hide
        Ben Hale (c) added a comment -

        This sample is only supposed to create a separate file. The transform sample (and the transform goal) are the ones that change the JAR file.

        Show
        Ben Hale (c) added a comment - This sample is only supposed to create a separate file. The transform sample (and the transform goal) are the ones that change the JAR file.
        Hide
        Eberhard Wolff added a comment -

        Hi Ben,
        thanks. I just took a look at documentation and it seems like a RTFM but I have to admit that it is strange to use "transform" if you want a manifest in the jar and "manifest" if you actually don't want it in the JAR. I would change the documentation in 6.3.2.1 and 6.3.2.2 to actually state this difference. Also it would be helpful if the documentation would include scenarios in which "manifest" makes sense - Why should I create a MANIFEST.MF but not put it in the JAR?
        Thanks,
        Eberhard

        Show
        Eberhard Wolff added a comment - Hi Ben, thanks. I just took a look at documentation and it seems like a RTFM but I have to admit that it is strange to use "transform" if you want a manifest in the jar and "manifest" if you actually don't want it in the JAR. I would change the documentation in 6.3.2.1 and 6.3.2.2 to actually state this difference. Also it would be helpful if the documentation would include scenarios in which "manifest" makes sense - Why should I create a MANIFEST.MF but not put it in the JAR? Thanks, Eberhard
        Hide
        Chuck Canning added a comment - - edited

        You can use the manifest and transform goals together to generate the manifest and have it placed in the jar.

        ...
        <goals>
        <goal>manifest</goal>
        <goal>transform</goal>
        </goals>

        Show
        Chuck Canning added a comment - - edited You can use the manifest and transform goals together to generate the manifest and have it placed in the jar. ... <goals> <goal>manifest</goal> <goal>transform</goal> </goals>

          People

          • Assignee:
            Unassigned
            Reporter:
            Eberhard Wolff
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: