You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kristian Rosenvold (JIRA)" <ji...@apache.org> on 2015/06/08 20:52:00 UTC
[jira] [Closed] (MSHARED-331) Sections in own manifest file are
mixed up
[ https://issues.apache.org/jira/browse/MSHARED-331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Rosenvold closed MSHARED-331.
--------------------------------------
Resolution: Invalid
Assignee: Kristian Rosenvold
The jar specification explicitly states that a blank line is newline newline, hence spaces are not permitted.
> Sections in own manifest file are mixed up
> ------------------------------------------
>
> Key: MSHARED-331
> URL: https://issues.apache.org/jira/browse/MSHARED-331
> Project: Maven Shared Components
> Issue Type: Bug
> Components: maven-archiver
> Affects Versions: maven-archiver-2.5
> Reporter: Johannes Schneider
> Assignee: Kristian Rosenvold
>
> I'm using my own manifest file as described [here|http://maven.apache.org/shared/maven-archiver/examples/manifestFile.html]. Plugin-Config:
> {code:xml}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <version>2.4</version>
> <configuration>
> <archive>
> <manifestEntries>
> <Implementation-Version>${project.version}</Implementation-Version>
> </manifestEntries>
> <manifestFile>manifest.mf</manifestFile>
> </archive>
> </configuration>
> </plugin>
> {code}
> The manifest.mf file contains a "Name: Dependencies" section:
> {noformat}
> Implementation-Title: hello-api
> Implementation-Vendor: js
>
> Name: Dependencies
> helloModule: 3.0.0
> somethingElse: 6.4:0.2
> tools: 6.4:0.64
> {noformat}
> In the resulting MANIFEST.MF inside the jar file, however, all entries are disorderd. In particular, the section is destroyed:
> {noformat}
> Manifest-Version: 1.0
> Implementation-Vendor: js
> Implementation-Title: hello-api
> somethingElse: 6.4:0.2
> tools: 6.4:0.64
> Implementation-Version: 6.4.11-2-SNAPSHOT
> Built-By: js
> Build-Jdk: 1.7.0_51
> Name: Dependencies
> helloModule: 3.0.0
> Created-By: Apache Maven 3.0.5
> Archiver-Version: Plexus Archiver
> {noformat}
> As a workaround, I can define the whole manifest in the pom file. However, this is not a good solution since I do not want everyone to edit the pom file, which always involves the risk of destroying/manipulating the build. Furthermore, it is not very convenient to search for the <archive> section in a lengthy pom file.
> Remark: I am not sure which version of maven-archiver is used by maven-jar-plugin 2.4, so I chose the most recent one.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)