0 Replies Latest reply on May 10, 2011 2:46 PM by Wang Liyu

    Weld EE 1.1 - Embedded container doesn't support WebArchive

    Wang Liyu Apprentice


      Just wandering if anyone has problem with WebArchive on the Weld EE1.1 - Embedded container? I found that in my test case, I have 2 jars, one is runtime jar, one is test support jar (contains some alternatives), if I use JavaArchive and ShrinkWrap.merge, it can run on Weld EE1.1 embedded container, but it will fail with JBoss remote 6, if I use WebArchive, it only can run with JBoss remote6, the EE-embedded will fail. So there is no way that I can use the same test case to run against different test env?



      public static WebArchive createTestArchive() {

          return ArquillianWrapper.create("TestEmbedded.war")

                          .addSystemLibs("javax.faces:jsf-api:2.1", "org.jboss.seam:jboss-el:2.0.0.GA", "com.sun.faces:jsf-impl:2.1.0").

                          .addModules("1.0-SNAPSHOT", "cdi-bridge", "arq-support")

                          .addWebInfResources(ArquillianWrapper.ARQUILLIAN_RESOURCES_PATH, "beans.xml", "web.xml").addPackages(SampleTestCase.class.getPackage()).getArchive();



      And the latest Arquillian doesn't support the war file name other than test.war by default, so if you rename the test case to any name other than "test.war", you have to put "jboss.xml" in the war file and jboss-web.xml contains:


      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">





      Is this suppose to happen or it's a bug?