Maven Shared Components

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

Details

  • Number of attachments :
    2

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_preview.patch
    18/Jan/12 6:31 AM
    26 kB
    Anders Hammar
  2. MSHARED-38.patch
    20/Jan/12 3:01 AM
    41 kB
    Anders Hammar

Issue Links

Activity

Hide
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
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
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
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
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
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
Olivier Lamy added a comment -

fixed r1233983.
Thanks!

Show
Olivier Lamy added a comment - fixed r1233983. Thanks!

People

Vote (4)
Watch (5)

Dates

  • Created:
    Updated:
    Resolved: