glassfish
  1. glassfish
  2. GLASSFISH-20779

GlassFish 4.0 classloader does not observe package information in WAR /META-INF/MANIFEST.MF

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: classloader
    • Labels:
      None
    • Environment:

      GlassFish 4.0, Oracle JDK 7u25, Fedora 19

      Description

      I have my application package information set inside a web application archive /META-INF/MANIFEST.MF as generated by maven-war-plugin, using:

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-war-plugin</artifactId>
              <version>2.4</version>
              <configuration>
                <archive>
                  <manifest>
                    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                    <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                  </manifest>
                </archive>
              </configuration>
            </plugin>
      

      This produces the correct information inside the WAR in /META-INF/MANIFEST.MF:

      Manifest-Version: 1.0
      Implementation-Vendor: Sakari A. Maaranen
      Implementation-Title: Some Project
      Implementation-Version: 0.0.0-SNAPSHOT
      Implementation-Vendor-Id: somegroup
      Built-By: sam
      Build-Jdk: 1.7.0_25
      Specification-Vendor: Sakari A. Maaranen
      Specification-Title: Some Project
      Created-By: Apache Maven 3.0.5
      Specification-Version: 0.0.0-SNAPSHOT
      Archiver-Version: Plexus Archiver
      

      However, in the web application source code that is directly in the WAR under /WEB-INF/classes/... the following will return null:

      TITLE = getClass().getPackage().getImplementationTitle();
      VERSION = getClass().getPackage().getImplementationVersion();
      ...
      

      If GlassFish classloader could correctly observe this information it would greatly help my testing and deployment processes.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Sanjeeb Sahoo
            Reporter:
            S.A.M.
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: