Issue Details (XML | Word | Printable)

Key: MASSEMBLY-121
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: John Casey
Reporter: Mark Reynolds
Votes: 4
Watchers: 5
Operations

If you were logged in you would be able to see more operations.
Maven 2.x Assembly Plugin

Custom manifest attributres are ignored.

Created: 03/Jul/06 02:30 PM   Updated: 03/Sep/08 03:49 AM   Resolved: 22/Jun/07 04:46 PM
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.2-beta-2

Time Tracking:
Not Specified

File Attachments: 1. Text File assembly-plugin.patch (1 kB)
2. Zip Archive massembly121.zip (14 kB)

Environment:
Windows XP SP2
Java JDK 1.5.0_07
Maven 2.0.4
Issue Links:
Duplicate
 


 Description  « Hide

Configure custom manifest entry in pom.xml
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.1</version>
<inherited>false</inherited>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${basedir}/src/main/assembly/install.xml</descriptor>
</descriptors>
<outputDirectory>${project.build.directory}</outputDirectory>
<workDirectory>${project.build.directory}/assembly/work</workDirectory>
<archive>
<manifest>
<mainClass>com.company.Install</mainClass>
</manifest>
<manifestEntries>
<mode>development</mode>
</manifestEntries>
</archive>
</configuration>
</execution>
</executions>
</plugin>
Custom manifest entry "mode" does not appear in jar manifest (although main class entry does).



John Casey added a comment - 12/Jan/07 12:36 AM

Fixed version should be hitting snapshot repository in a minute.


Bernd added a comment - 19/Jan/07 02:56 PM

I can't get that fix to work.

I assume maven downloads the respective snapshot:

[DEBUG] maven-assembly-plugin: resolved to version 2.2-20070112.063452-32 from repository apache.org
...
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-assembly-plugin:2.2-SNAPSHOT:assembly' -->

It finds my custom attribute:
[DEBUG] (f) manifestEntries = {mode=development}

but they still do not appear in the assembly.

What is wrong?


Bernd added a comment - 20/Jan/07 03:03 PM

Attaching a testcase to hopefully make the problem reproducable.

run

mvn archetype:create -DgroupId=test -DartifactId=massembly121

modify the pom

  • add snapshot repo
  • add assembly config to add custom attributes to manifest

run

mvn clean package assembly:assembly

Then the assembly does not contain a manifest with custom attributes.

The zip contains the project, including the modified pom and the target dir.
In the project root is the output of mvn .X ... in file log.txt

Clearing the local repo does not help, no other repos involved.

Hopefully the helps to reproduce my problem.


Bernd added a comment - 28/Jan/07 02:35 PM

I retried on a freshly installed W2K,JDK1.5_10,mvn2.0.4 box and still the same problem.

It gets a snapshot:
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/maven/plugins/maven-assembly-plugin/2.2-SNAPSHOT/maven-assembly-plugin-2.2-20070112.063452-32.jar

Is this the snapshot with the fix?

but no entries in the manifest file.


Brian Fox added a comment - 31/Jan/07 07:15 AM

I added a test, can someone please verify if the test is valid?

I can not re-open it (not priviliges for me?) Can someone do that for me please? Or shall I open a new one and link to -121?

thanks

Bernd


Paul Gier added a comment - 21/Jun/07 04:43 PM

Attaching a small change that seems to fix the issue without breaking any of the other tests.


John Casey added a comment - 22/Jun/07 04:08 PM

brian: What's the test you added? Is it an IT, or a unit test, or...? I'll check this out, in addition to looking at the new patch.


John Casey added a comment - 22/Jun/07 04:46 PM

Applied. Thanks!


Petar Tahchiev added a comment - 01/Apr/08 05:35 AM

I am currently using 2.2-beta2 and it is STILL not fixed.


Dennis Lundberg added a comment - 01/Aug/08 12:11 PM

Petar, what is it that isn't working for you?
Can you please supply us with your configuration.


Petar Tahchiev added a comment - 03/Sep/08 03:49 AM

I tried now with 2.1, 2.2-beta-1, 2.2-beta-2, 2.2-beta-3-SNAPSHOT from both the project root and the parent's directory and it works well.

You can go on and close the issue, sorry for my previous post.

Thanks, Petar.