1 Reply Latest reply on Jun 20, 2012 4:28 AM by struberg

    ShrinkWrap Asset URLs within WebArchive

    struberg

      Hi!

       

      In Apache DeltaSpike we currently face the following problem:

       

      We create a @Deployment with a WebArchive containing 3 JARs.

       

      All of those JARs contain a META-INF/beans.xml file. The problem is that all of them get the same URL assigned: "archive://META-INF/beans.xml".

      That way a CDI container cannot distinguish between them and will always only randomly take one of the three

       

      Sources:

      https://git-wip-us.apache.org/repos/asf?p=incubator-deltaspike.git;a=blob;f=deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/alternative/global/GlobalAlternativeTest.java;h=abb94304d7ce4d4b9930358e2830cd042b4129ac;hb=HEAD

       

      This can be tested in OpenWebBeans ShrinkWrapMetaDataDiscovery#parseBeansXmls

        • 1. Re: [blocker] ShrinkWrap Asset URLs within WebArchive
          struberg

          Update: seems not to be a ShrinkWrap core issue but an integration problem. Both the arquillian-container-openwebbans and weld (and problably others as well) did just use "archive:/" + entry.get() to construct the URL. But this doesn't work if you have multiple jars with the same resource in them as the URL#equals always first takes the URI name to distinguish.