[ 
https://jira.codehaus.org/browse/MSHARED-331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Johannes Schneider updated MSHARED-331:
---------------------------------------

    Description: 
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.

  was:
I'm using my own manifest file as described 
[here|http://maven.apache.org/shared/maven-archiver/examples/manifestFile.html].
 Plugin-Config:
{quote}
<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>
{quote}

The manifest.mf file contains a "Name: Dependencies" section:
{quote}
Implementation-Title: hello-api
Implementation-Vendor: js
                            
Name: Dependencies
helloModule: 3.0.0
somethingElse: 6.4:0.2
tools:  6.4:0.64
{quote}

In the resulting MANIFEST.MF inside the jar file, however, all entries are 
disorderd. In particular, the section is destroyed:
{quote}
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
{quote}

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.


> Sections in own manifest file are mixed up
> ------------------------------------------
>
>                 Key: MSHARED-331
>                 URL: https://jira.codehaus.org/browse/MSHARED-331
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-archiver
>    Affects Versions: maven-archiver-2.5
>            Reporter: Johannes Schneider
>
> 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.1.6#6162)

Reply via email to