[jboss-jira] [JBoss JIRA] (WFLY-942) Arquillian should merge existing MANIFEST.MF

Ron Šmeral (JIRA) issues at jboss.org
Fri May 16 10:07:58 EDT 2014


    [ https://issues.jboss.org/browse/WFLY-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12968413#comment-12968413 ] 

Ron Šmeral commented on WFLY-942:
---------------------------------

Looking at https://github.com/wildfly/wildfly/blob/master/arquillian/protocol-jmx/src/main/java/org/jboss/as/arquillian/protocol/jmx/JMXProtocolPackager.java#L238 , it is apparent, that the {{JMXProtocolPackager}} - the class which handles and appends the manifests - actually *does the merging*.

However, it uses the JDK's {{java.util.jar.Manifest}} to handle the manifests, which appears to be very strict about requiring a newline after the last line. 

E.g.: this results only in a file with the Manifest-Version element, and the Dependencies element is *ignored*.
{code:java}
new Manifest(new ByteArrayInputStream("Manifest-Version: 1.0\nDependencies: some.thing".getBytes()));
{code}

I verified that the following currently works (note the *\n*): 
{code:java}
war.setManifest(new StringAsset("Dependencies: some.thing\n"));
{code}

> Arquillian should merge existing MANIFEST.MF
> --------------------------------------------
>
>                 Key: WFLY-942
>                 URL: https://issues.jboss.org/browse/WFLY-942
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Test Suite
>            Reporter: Martin Kouba
>            Assignee: Andrew Rubinger
>            Priority: Minor
>
> CDI/ARQ/AS7 test - it's not possible to modify MANIFEST.MF (to activate AS7 module) when creating test archive because ARQ replaces user-defined manifest with its own version in the end. ARQ should merge existing manifest instead.



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)



More information about the jboss-jira mailing list