[shrinkwrap-issues] [JBoss JIRA] (SHRINKWRAP-431) Archive.merge is broken

Andrew Rubinger (JIRA) jira-events at lists.jboss.org
Thu Nov 1 18:45:18 EDT 2012


     [ https://issues.jboss.org/browse/SHRINKWRAP-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Rubinger updated SHRINKWRAP-431:
---------------------------------------

        Fix Version/s: 1.1.1
    Affects Version/s: 1.1.1-alpha-1

    
> Archive.merge is broken
> -----------------------
>
>                 Key: SHRINKWRAP-431
>                 URL: https://issues.jboss.org/browse/SHRINKWRAP-431
>             Project: ShrinkWrap
>          Issue Type: Bug
>    Affects Versions: 1.1.1-alpha-1
>            Reporter: Andrew Rubinger
>            Assignee: Andrew Rubinger
>            Priority: Blocker
>             Fix For: 1.1.1
>
>
> Observed different behavior in Archive.merge depending upon the order in which archives were merged; the merged view has been incomplete.
> {code}Nov 01, 2012 3:20:26 PM org.jboss.arquillian.daemon.server.NettyServer start
> INFO: Server started on localhost:12345
> Nov 01, 2012 3:20:26 PM org.jboss.arquillian.daemon.protocol.arquillian.DaemonDeploymentPackager generateDeployment
> INFO: arquillian-junit.jar: 259 assets
> Nov 01, 2012 3:20:26 PM org.jboss.arquillian.daemon.protocol.arquillian.DaemonDeploymentPackager generateDeployment
> INFO: arquillian-core.jar: 495 assets
> Nov 01, 2012 3:20:26 PM org.jboss.arquillian.daemon.protocol.arquillian.DaemonDeploymentPackager generateDeployment
> INFO: Returning: f98cada5-136a-45bc-b233-d8fb97cb1994.jar: 756 assets
> Nov 01, 2012 3:20:27 PM org.jboss.arquillian.daemon.server.NettyServer$ActionControllerHandler inboundBufferUpdated
> INFO: Readable bytes: 142205
> Nov 01, 2012 3:20:27 PM org.jboss.arquillian.daemon.server.NettyServer$DeployHandlerAdapter inboundBufferUpdated
> INFO: Readable bytes received: 142205{code}
> and:
> {code}Nov 01, 2012 3:24:10 PM org.jboss.arquillian.daemon.server.NettyServer start
> INFO: Server started on localhost:12345
> Nov 01, 2012 3:24:11 PM org.jboss.arquillian.daemon.protocol.arquillian.DaemonDeploymentPackager generateDeployment
> INFO: arquillian-core.jar: 495 assets
> Nov 01, 2012 3:24:11 PM org.jboss.arquillian.daemon.protocol.arquillian.DaemonDeploymentPackager generateDeployment
> INFO: arquillian-junit.jar: 259 assets
> Nov 01, 2012 3:24:11 PM org.jboss.arquillian.daemon.protocol.arquillian.DaemonDeploymentPackager generateDeployment
> INFO: Returning: cad149cf-f4a8-472c-bb07-a5a7f5225ed3.jar: 756 assets
> Nov 01, 2012 3:24:11 PM org.jboss.arquillian.daemon.server.NettyServer$ActionControllerHandler inboundBufferUpdated
> INFO: Readable bytes: 277001
> Nov 01, 2012 3:24:11 PM org.jboss.arquillian.daemon.server.NettyServer$DeployHandlerAdapter inboundBufferUpdated
> INFO: Readable bytes received: 277001
> Nov 01, 2012 3:24:11 PM org.jboss.arquillian.daemon.server.NettyServer$DeployHandlerAdapter inboundBufferUpdated
> INFO: Deployed: 78178897-e394-45a1-b9d4-b465c145560a.jar: 259 assets{code}
> Though each report 756 assets, the file size of the exported view is different.  I suspect that directories are being written without content?
> Using the following manual code, all works as expected:
> {code}            // TODO THIS IS BROKEN IN SHRINKWRAP, FIX IT
>             // archive.merge(auxArchive);
>             
>             //TODO This hack replaces the above.
>             final Map<ArchivePath, Node> content = auxArchive.getContent();
>             final Collection<ArchivePath> paths = content.keySet();
>             for (final ArchivePath path : paths) {
>                 final Node current = archive.get(path);
>                 final Node aux = content.get(path);
>                 if (current != null) {
>                     if (current.getAsset() == null && aux.getAsset() == null) {
>                     } else if (current.getAsset() == null && aux.getAsset() != null) {
>                         throw new IllegalStateException("Current archive has dir and aux has " + aux.getAsset()
>                             + " at " + path);
>                     } else if (current.getAsset() != null && aux.getAsset() == null) {
>                         throw new IllegalStateException("Current archive has " + current.getAsset()
>                             + " and aux has dir at " + path);
>                     } else {
>                         archive.add(aux.getAsset(), path);
>                     }
>                 } else {
>                     if (aux.getAsset() != null) {
>                         archive.add(aux.getAsset(), path);
>                     }
>                 }
>             {code}

--
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


More information about the shrinkwrap-issues mailing list