0 Replies Latest reply on Feb 16, 2011 7:12 PM by Mason Harding

    test.war always created, cannot change contents

    Mason Harding Newbie

      OK...this is an odd one.  I'm running Arquillian 1.0.0.Alpha4 on jbossas-remote-6.  have the following Deployment...

       

          @Deployment
          public static Archive<?> getTestArchive() {
              final WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war")
              .setWebXML(new File("/proj/myproj/myproj-war/src/main/webapp/WEB-INF/web.xml"))
              .addResource(new File("/proj/myproj/myproj-war/src/main/webapp/WEB-INF/components.xml"), "WEB-INF/components.xml");
      
              final JavaArchive ejb = ShrinkWrap.create(JavaArchive.class, "test.jar")
                  .addResource("seam.properties", "seam.properties")
                  .addResource("META-INF/ejb-jar.xml", "META-INF/ejb-jar.xml")
                  .addResource("META-INF/persistence.xml", "META-INF/persistence.xml");
      
              final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "test.ear")
                      .addModule(ejb)
                      .addModule(war)
                      .addModule(new File("/proj/myproj/myproj-ear/target/myproj-ear-1.0-SNAPSHOT/lib/jboss-seam-2.2.1.Final.jar"))
                      .addModule(new File("/proj/myproj/myproj-ear/target/myproj-ear-1.0-SNAPSHOT/lib/el-api-1.0.jar"));
      
              return ear;
          }
      

       

      This will Always create a test.war with the following layout

      test.war

      --/WEB-INF

      ----/lib/

      ------arquillian-protocol.jar

       

      In other words, no mater what resources I try to add, it only ever has that one file.

       

      If I change ShrinkWrap.create(WebArchive.class, "test.war") to ShrinkWrap.create(WebArchive.class, "test2.war") then I will get the correctly created test2.war with my resources in it...AND the test.war with only arquillian-protocol.jar in it.

       

      Thanks,

      Mason