Maven 1.x Jar Plugin

Specification-Version and Implementation-Vendor-Id not being set

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Description:
    Hide

    Please make the jar manifests consistent.

    1. Specification-Version not being set. pom.specifiationVersion not defined in project schema.

    • maven.jar.plugin uses:

    <ant:attribute
    name="Specification-Version"
    value="${pom.specificationVersion}"/>

    • maven.ejb.plugin uses:

    <ant:attribute
    name="Specification-Version"
    value="${pom.currentVersion}"/>

    2. Implementation-Vendor-Id not being set. pom.organization.identifier not defined in project schema.

    • maven.jar.plugin uses:

    <ant:attribute
    name="Implementation-Vendor-Id"
    value="${pom.organization.identifier}"/>

    • maven.ejb.plugin uses (title rather than vendor-id):

    <ant:attribute
    name="Implementation-Title"
    value="${pom.package}"/>

    Thanks,

    Show
    Please make the jar manifests consistent. 1. Specification-Version not being set. pom.specifiationVersion not defined in project schema.
    • maven.jar.plugin uses:
    <ant:attribute name="Specification-Version" value="${pom.specificationVersion}"/>
    • maven.ejb.plugin uses:
    <ant:attribute name="Specification-Version" value="${pom.currentVersion}"/> 2. Implementation-Vendor-Id not being set. pom.organization.identifier not defined in project schema.
    • maven.jar.plugin uses:
    <ant:attribute name="Implementation-Vendor-Id" value="${pom.organization.identifier}"/>
    • maven.ejb.plugin uses (title rather than vendor-id):
    <ant:attribute name="Implementation-Title" value="${pom.package}"/> Thanks,
  • Environment:
    XP

Issue Links

Activity

Hide
John Casey added a comment - 19/Nov/03 10:59 PM

Maybe I'm missing something, but I don't see anywhere in the maven core (including core-bundled plugins) where pom.specificationVersion is set. To prove this to myself, I created a jar of one of my commonjava projects, then checked the MANIFEST.MF. This is what I got:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.5.3
Created-By: Apache Jakarta Maven
Built-By: jdcasey
Package: org.commonjava.io
Build-Jdk: 1.4.2_01
Extension-Name: commonjava-io

Specification-Version:
^^^^^^^^^^^^^^

Specification-Vendor: CommonJava Open Component Project
Specification-Title:
Implementation-Version: 2.0
Implementation-Vendor: CommonJava Open Component Project
Implementation-Vendor-Id:

As you can see, nothing! Maybe we should be setting Specification-Version to ${pom.currentVersion} everywhere...

Show
John Casey added a comment - 19/Nov/03 10:59 PM Maybe I'm missing something, but I don't see anywhere in the maven core (including core-bundled plugins) where pom.specificationVersion is set. To prove this to myself, I created a jar of one of my commonjava projects, then checked the MANIFEST.MF. This is what I got: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.5.3 Created-By: Apache Jakarta Maven Built-By: jdcasey Package: org.commonjava.io Build-Jdk: 1.4.2_01 Extension-Name: commonjava-io Specification-Version: ^^^^^^^^^^^^^^ Specification-Vendor: CommonJava Open Component Project Specification-Title: Implementation-Version: 2.0 Implementation-Vendor: CommonJava Open Component Project Implementation-Vendor-Id: As you can see, nothing! Maybe we should be setting Specification-Version to ${pom.currentVersion} everywhere...
Hide
dion gillard added a comment - 20/Nov/03 12:54 AM

I've fixed the jar plugins use of pom.specificationVersion.
It now uses pom.currentVersion

Show
dion gillard added a comment - 20/Nov/03 12:54 AM I've fixed the jar plugins use of pom.specificationVersion. It now uses pom.currentVersion
Hide
dion gillard added a comment - 20/Nov/03 12:59 AM

jar plugin uses:

<ant:attribute name="Implementation-Vendor"
value="${pom.organization.name}"/>

which looks ok

Show
dion gillard added a comment - 20/Nov/03 12:59 AM jar plugin uses: <ant:attribute name="Implementation-Vendor" value="${pom.organization.name}"/> which looks ok
Hide
Stephen McConnell added a comment - 20/Nov/03 2:12 AM

Setting the project properties works fine for the declaration of the spec-version and vendor-id.

Example:

<ant:property name="pom.organization.identifier" value="ASF"/>
<ant:property name="pom.specificationVersion" value="1.2"/>

Show
Stephen McConnell added a comment - 20/Nov/03 2:12 AM Setting the project properties works fine for the declaration of the spec-version and vendor-id. Example: <ant:property name="pom.organization.identifier" value="ASF"/> <ant:property name="pom.specificationVersion" value="1.2"/>
Hide
John Casey added a comment - 20/Nov/03 8:37 AM

Should we go ahead and fix the rest of the attributes in these two plugins? We could specify the following in the jar plugin:

Specification-Title: ${pom.shortDescription}
Implementation-Vendor-Id: ${pom.groupId}
Implementation-Title: ${pom.shortDescription}

Then, we could simply copy the <ant:artifact>...</ant:artifact> element structure to the ejb plugin...I'm willing to submit this as a patch, just want a go-ahead to do it.

Show
John Casey added a comment - 20/Nov/03 8:37 AM Should we go ahead and fix the rest of the attributes in these two plugins? We could specify the following in the jar plugin: Specification-Title: ${pom.shortDescription} Implementation-Vendor-Id: ${pom.groupId} Implementation-Title: ${pom.shortDescription} Then, we could simply copy the <ant:artifact>...</ant:artifact> element structure to the ejb plugin...I'm willing to submit this as a patch, just want a go-ahead to do it.
Hide
dion gillard added a comment - 20/Nov/03 9:24 AM

A patch would be great

Show
dion gillard added a comment - 20/Nov/03 9:24 AM A patch would be great
Hide
Stephen McConnell added a comment - 20/Nov/03 10:49 AM

My impression is that the maven.ejb.plugin assignment of pom.currentVersion to Specification-Version is a bug. A spec version is not the same as an impl version.

Show
Stephen McConnell added a comment - 20/Nov/03 10:49 AM My impression is that the maven.ejb.plugin assignment of pom.currentVersion to Specification-Version is a bug. A spec version is not the same as an impl version.
Hide
Stephen McConnell added a comment - 20/Nov/03 10:54 AM

If you submitting a patch that references the POM short description - can you please check for trimming of the value to a single line. Currently something like the following will cause runtime error as the pom value is not returning a trimmed single line value.

<shortDescrption>
My short description.
</shortDescription>

Show
Stephen McConnell added a comment - 20/Nov/03 10:54 AM If you submitting a patch that references the POM short description - can you please check for trimming of the value to a single line. Currently something like the following will cause runtime error as the pom value is not returning a trimmed single line value. <shortDescrption> My short description. </shortDescription>
Hide
John Casey added a comment - 20/Nov/03 12:50 PM

Okay, so in the EJB manifest, should the Specification-* attributes refer to the EJB spec? If so, can we hard-code the specification vendor and title as SUN and EJB/J2EE, etc.?

Show
John Casey added a comment - 20/Nov/03 12:50 PM Okay, so in the EJB manifest, should the Specification-* attributes refer to the EJB spec? If so, can we hard-code the specification vendor and title as SUN and EJB/J2EE, etc.?
Hide
Lynn Richards added a comment - 27/Nov/03 1:35 PM

I believe the EJB jar manifest should document the specification and implementation of the application not that of EJB/J2EE. EJB information is available separately in EJB-specific files (via DTDs in XML).

Show
Lynn Richards added a comment - 27/Nov/03 1:35 PM I believe the EJB jar manifest should document the specification and implementation of the application not that of EJB/J2EE. EJB information is available separately in EJB-specific files (via DTDs in XML).
Hide
Stephen McConnell added a comment - 16/Apr/04 11:51 AM

Under Maven RC2 the jar plugin manifest entries have been changed in such a way that can result in runtime failure based on the assigned specification version.

The change is the inclusion of the following line in the manifest:

<ant:attribute name="Specification-Version" value="${pom.currentVersion}"/>

Firstly - the "Specification-Version" is not the same as the implementation version (impl version is correctly assigned as ${pom.currentVersion). Secondly the jar optional extensions spec requires that the specification version is a dewey decimal. RC2 generated jars will fail if the current version of the jar contains alphanumeric characters (e.g. 1.2-dev) or any string value that cannot be converted to a dewey decimal.

Show
Stephen McConnell added a comment - 16/Apr/04 11:51 AM Under Maven RC2 the jar plugin manifest entries have been changed in such a way that can result in runtime failure based on the assigned specification version. The change is the inclusion of the following line in the manifest: <ant:attribute name="Specification-Version" value="${pom.currentVersion}"/> Firstly - the "Specification-Version" is not the same as the implementation version (impl version is correctly assigned as ${pom.currentVersion). Secondly the jar optional extensions spec requires that the specification version is a dewey decimal. RC2 generated jars will fail if the current version of the jar contains alphanumeric characters (e.g. 1.2-dev) or any string value that cannot be converted to a dewey decimal.
Hide
Brett Porter added a comment - 27/Apr/04 11:44 PM

commented out offending entries. Will raise a new issue to correct the assignment of certain pom variables to Specification/Implementation-*

Show
Brett Porter added a comment - 27/Apr/04 11:44 PM commented out offending entries. Will raise a new issue to correct the assignment of certain pom variables to Specification/Implementation-*

People

Dates

  • Created:
    15/Oct/03 2:29 PM
    Updated:
    27/Jan/06 10:07 PM
    Resolved:
    27/Apr/04 11:44 PM