Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-960

Set the standard java.lang.Package fields in the MANIFEST

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.1-milestone-1
    • Fix Version/s: 7.4.3, 8.1-milestone-2
    • Component/s: None
    • Labels:
      None
    • Documentation:
      N/A
    • Similar issues:

      Description

      The is a very easy way to get information about a jar trough Package class. Unfortunately we did not configured Maven to set most of the standard fields that Package expect (Specification-* and Implementation-* fields).

      Once enabled it mean you can get the version of your module (or the module of any class as easily) by doing

          this.getClass().getPackage().getImplementationVersion().
      

      See https://maven.apache.org/shared/maven-archiver/examples/manifest.html for more.

      See http://markmail.org/message/jur4inugsw6lh3mg.

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              tmortagne Thomas Mortagne
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: