Archiva
  1. Archiva
  2. MRM-1425

Add Implementation details to MANIFEST.MF in the produced war

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.3.2
    • Fix Version/s: 1.4-M2
    • Component/s: Web Interface
    • Labels:
      None
    • Environment:
      NA.
    • Number of attachments :
      1

      Description

      Could we please add the implementation information, derived from the pom into the manifest.mf file?

      Specifically, I'm looking for: Implementation-Version. This allows my deployment scripts to determine the version being installed.

        Activity

        Hide
        Brett Porter added a comment -

        you want this in all the Archiva manifest files, or just the webapp?

        It's a pretty simple config option for the archiver I think.

        Show
        Brett Porter added a comment - you want this in all the Archiva manifest files, or just the webapp? It's a pretty simple config option for the archiver I think.
        Hide
        Chris Graham added a comment -

        It is good practice to definatively label/version everything. However, for my purposes, I only need the war file itself versioned. Then I can do this:

        JarFile jf = new JarFile("archiva.war");
        Manifest manifest = jf.getManifest();
        jf.close();
        String implementationVersion = manifest.getMainAttributes().getValue("Implementation-Version");
        System.out.println("implementationVersion = " + implementationVersion);

        I know that archiva is distributed as a versioned named war file, but I can not rely upon people not renaming it.

        Yes, it's trivially simple to do:

        <configuration>
        <archive>
        <addMavenDescriptor>true/addMavenDescriptor>
        <manifest>
        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
        <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
        </manifest>
        </archive>
        </configuration>

        Show
        Chris Graham added a comment - It is good practice to definatively label/version everything. However, for my purposes, I only need the war file itself versioned. Then I can do this: JarFile jf = new JarFile("archiva.war"); Manifest manifest = jf.getManifest(); jf.close(); String implementationVersion = manifest.getMainAttributes().getValue("Implementation-Version"); System.out.println("implementationVersion = " + implementationVersion); I know that archiva is distributed as a versioned named war file, but I can not rely upon people not renaming it. Yes, it's trivially simple to do: <configuration> <archive> <addMavenDescriptor>true/addMavenDescriptor> <manifest> <addDefaultImplementationEntries>true</addDefaultImplementationEntries> <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> </manifest> </archive> </configuration>
        Hide
        Chris Graham added a comment -

        This patch is for pom.xml to added in the default implentation entries. Tested against the current (M2-SNAPSHOT) trunk.

        Show
        Chris Graham added a comment - This patch is for pom.xml to added in the default implentation entries. Tested against the current (M2-SNAPSHOT) trunk.
        Hide
        Olivier Lamy added a comment -

        Thanks for the patch.

        Show
        Olivier Lamy added a comment - Thanks for the patch.

          People

          • Assignee:
            Olivier Lamy
            Reporter:
            Chris Graham
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: