[ http://jira.codehaus.org/browse/MPJAR-52?page=all ]
     
Lukas Theussl closed MPJAR-52:
------------------------------

     Assign To: Lukas Theussl
    Resolution: Won't Fix

I finally think that this is actually the correct behaviour: the docs say that 
maven.jar.manifest.attributes.list  can be used to define custom attributes to 
*add* to the manifest in addition to the entries added by default. Looking at 
the source code, it doesn't seem possible to override attributes that are 
already present in the manifest this way.

To achieve what you want, you should define a custom manifest file with the 
maven.jar.manifest property. All settings there will override Maven's defaults. 
The only problem with that is that variable substitution will not work, ie, 
${pom.currentVersion} will end up as a string in your manifest. This is maybe 
worth a separate issue or you could create the manifest file on the fly in a 
preGoal.

Please check and report back if this solves your problem (or not).

> Cannot override Implementation-Version attribute in Manifest via a properties 
> file
> ----------------------------------------------------------------------------------
>
>          Key: MPJAR-52
>          URL: http://jira.codehaus.org/browse/MPJAR-52
>      Project: maven-jar-plugin
>         Type: Bug

>     Versions: 1.7
>  Environment: Windows XP SP2; SunOS 5.9;Linux RedHat 2.4.21-32.0.ELsmp; Maven 
> 1.0.2 (Problem occurs on all these platforms)
>     Reporter: Anna Nicotera
>     Assignee: Lukas Theussl
>     Priority: Critical
>      Fix For: 1.8
>  Attachments: project.properties
>
>
> When using maven-jar-plugin-1.7.1.jar, when I try to override the Manifest's 
> Implementation-Version via a project.properties file, the resulting Manifest 
> is unchanged (always seems to take what is specified in the plugin.jelly).  
> This was not a problem when I was using maven-jar-plugin-1.6.1.jar. When I 
> was using maven-jar-plugin-1.6.1.jar, the Implementation-Version attribute 
> was being set to whatever I set in my project.properties file.
> This is the EXPECTED manifest file contents (produced when using 
> maven-jar-plugin-1.6.1.jar. ):
> Manifest-Version: 1.0
> Ant-Version: Apache Ant 1.5.3 
> Created-By: Apache Maven
> Built-By: axp
> Package: 
> Build-Jdk: 1.4.2_08
> Class-Path:  AdvCommon.jar Advisor.jar AdvisorSvr.jar ClusteringFramew
>  ork.jar record-1.0.jar sourcegen_workaround.jar extensions-3.0.jar i1
>  8n-3.0.jar mb-resources-3.0.jar mb-messages-3.0.jar df-messages-3.0.j
>  ar df-resources-3.0.jar scheduler-spi-3.0.jar antlr-2.7.5H3.jar commo
>  ns-vfs-1.0-RC4.jar commons-collections-3.1.jar commons-logging-api-1.
>  0.2.jar ecs.jar ant-antlr-1.6.5.jar bsh-2.0b1.jar bsf-2.3.jar colt.ja
>  r cglib-2.1.2.jar javassist-3.0.jar dom4j-1.6.1.jar castor-0.9.3.9.ja
>  r foxtrot-2.0.jar getopt-1.0.9.jar java_readline.jar trove.jar hibern
>  ate3.jar htmlparser-1.41.jar jide-1.8.3.05.jar forms-1.0b2.jar jdom-1
>  .0beta9.jar jstyle.jar jloox-3.0.jar jlayout-1.3.jar nb-editor.jar as
>  m.jar asm-attrs.jar oro-2.0.8.jar concurrent-1.3.4.jar jcchartK-5.0.j
>  ar jdnc-0.5-all.jar jacl.jar tcljava.jar j2printerworks-3.2.jar xml-a
>  pis-1.0.jar xercesImpl-2.7.0.jar xerces-1.3.1.jar ZKM.jar velocity-1.
>  4.jar velocity-dep-1.4.jar
> Extension-Name: mb
> Specification-Title: ModelBuilder executable
> Specification-Vendor: Fair Isaac Corporation
> Implementation-Title: 
> Implementation-Vendor: Fair Isaac Corporation
> Implementation-Version: 3.0.0.dev
> This is the actual Manifest file contents (produced when using 
> maven-jar-plugin-1.7.1.jar):
> Manifest-Version: 1.0
> Ant-Version: Apache Ant 1.5.3 
> Created-By: Apache Maven
> Built-By: axp
> Package: 
> Build-Jdk: 1.4.2_08
> Class-Path:  AdvCommon.jar Advisor.jar AdvisorSvr.jar ClusteringFramew
>  ork.jar record-1.0.jar sourcegen_workaround.jar extensions-3.0.jar i1
>  8n-3.0.jar mb-resources-3.0.jar mb-messages-3.0.jar df-messages-3.0.j
>  ar df-resources-3.0.jar scheduler-spi-3.0.jar antlr-2.7.5H3.jar commo
>  ns-vfs-1.0-RC4.jar commons-collections-3.1.jar commons-logging-api-1.
>  0.2.jar ecs.jar ant-antlr-1.6.5.jar bsh-2.0b1.jar bsf-2.3.jar colt.ja
>  r cglib-2.1.2.jar javassist-3.0.jar dom4j-1.6.1.jar castor-0.9.3.9.ja
>  r foxtrot-2.0.jar getopt-1.0.9.jar java_readline.jar trove.jar hibern
>  ate3.jar htmlparser-1.41.jar jide-1.8.3.05.jar forms-1.0b2.jar jdom-1
>  .0beta9.jar jstyle.jar jloox-3.0.jar jlayout-1.3.jar nb-editor.jar as
>  m.jar asm-attrs.jar oro-2.0.8.jar concurrent-1.3.4.jar jcchartK-5.0.j
>  ar jdnc-0.5-all.jar jacl.jar tcljava.jar j2printerworks-3.2.jar xml-a
>  pis-1.0.jar xercesImpl-2.7.0.jar xerces-1.3.1.jar ZKM.jar velocity-1.
>  4.jar velocity-dep-1.4.jar
> Extension-Name: mb
> Specification-Title: ModelBuilder executable
> Specification-Vendor: Fair Isaac Corporation
> Implementation-Title: 
> Implementation-Vendor: Fair Isaac Corporation
> Implementation-Version: 3.0

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to