[ 
https://jira.codehaus.org/browse/MEAR-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=322752#comment-322752
 ] 

René Link commented on MEAR-162:
--------------------------------

I ran into the same problem with the ear plugin.

The problem is that if the "Class-Path" attribute already exists in the 
menifest the code works fine. But if a new Class-Path entry is created later 
modifications on this object will not affect the manifest anymore.
So when the Manifest returns an Attribute (already existent) you can modify 
this Attribute and it will be reflected by the manifest.
But if you add a new Attribute to the manifest modifications to the Attribute 
will not be reflected by the manifest anymore.

This is a problem of encapsulation. The developers of the Manifest classes must 
decide whether they want changes to Attributes that have been added to the 
Manifest to be reflected or not.

I wrote a unit test that shows this problem and attached it to this issue.
                
> skinnyWars with wars without manifest Class-Path attribute
> ----------------------------------------------------------
>
>                 Key: MEAR-162
>                 URL: https://jira.codehaus.org/browse/MEAR-162
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Bug
>    Affects Versions: 2.8
>            Reporter: Laszlo Varadi
>         Attachments: EarMojo.patch, Manifest_Class-Path-Bug.patch, 
> MEAR-162.patch
>
>
> The classpath attribute should be set after populating with values, otherwise 
> the classpath will be empty in the war manifest in case when the attribute is 
> a newly created attribute. See patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to