Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-38

Archiver should be adding "Created-By: Apache Maven _2.0.4_" to the manifest

    Details

      Description

      The maven-archiver currently adds the string "Created-By: Apache Maven" to the manifest of all projects. This is good, but it needs to be more specific - e.g. Apache Maven 2.0.4. This would have two major benefits:
      1) It would bring it in line with the "Build-Jdk" field, which has values like "1.5.0_09"
      2) It would help in having truly repeatable builds - potentially, you need to know which version of Maven was used to build an artifact

      I'd write the patch myself if I could figure out how to get at the information... it's in a @component called "runtimeInformation", but how do you access components from a low-level library like maven-archiver?

      1. MSHARED-38.patch
        41 kB
        Anders Hammar
      2. MSHARED-38_preview.patch
        26 kB
        Anders Hammar

        Issue Links

          Activity

          Hide
          afloom Anders Hammar added a comment -

          Unfortunately it seems as the API of MavenArchiver needs to be altered so that MavenSession as well is passed in to be able retrieve the maven.version property.

          Show
          afloom Anders Hammar added a comment - Unfortunately it seems as the API of MavenArchiver needs to be altered so that MavenSession as well is passed in to be able retrieve the maven.version property.
          Hide
          afloom Anders Hammar added a comment -

          Attaching one suggested solution, where the API is extended with MavenSession as a parameter. There is currently no unit test for the new API though.

          Plugins (m-jar-p e.g.) needs to be updated to use the new method(s) unfortunately. It's a fairly easy change though to pass in the MavenSession object.

          Show
          afloom Anders Hammar added a comment - Attaching one suggested solution, where the API is extended with MavenSession as a parameter. There is currently no unit test for the new API though. Plugins (m-jar-p e.g.) needs to be updated to use the new method(s) unfortunately. It's a fairly easy change though to pass in the MavenSession object.
          Hide
          afloom Anders Hammar added a comment -

          Attached improved patch with unit tests. Minor formatting changes are included as well as the code base doesn't seem to fully follow the Maven formatting conventions.

          Show
          afloom Anders Hammar added a comment - Attached improved patch with unit tests. Minor formatting changes are included as well as the code base doesn't seem to fully follow the Maven formatting conventions.
          Hide
          olamy Olivier Lamy (*$^¨%`£) added a comment -

          fixed r1233983.
          Thanks!

          Show
          olamy Olivier Lamy (*$^¨%`£) added a comment - fixed r1233983. Thanks!

            People

            • Assignee:
              olamy Olivier Lamy (*$^¨%`£)
              Reporter:
              mbeerman Matthew Beermann
            • Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development