9 Replies Latest reply on Mar 23, 2011 4:25 PM by Saif KHan

    Error creating WebArchive

    Saif KHan Newbie



      I am using JSFUnit 2.0.0 + Arquillian to test jsf 2.0 + primefaces application. I am facing issues creating WebArchive. Following is my code to

      create WebArchive:



      WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war")

                      .setWebXML(new File("src/main/webapp/WEB-INF/web.xml"))

                      .addPackage(Package.getPackage("com.permit.ui.arquillian")) // my test package

                      .addResource(new File("src/main/webapp", "index.xhtml"))

                      .addWebResource(EmptyAsset.INSTANCE, "beans.xml")

                      .addWebResource(new File("src/main/webapp/WEB-INF/faces-config.xml"), "faces-config.xml")

                      .addManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));



      Now webapp contains lot of folders and resources. Is there any pattern way of adding resources like "src/main/webapp/**.*" Now when I add resource which requires lot of other resources I get following exception:



      com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 500 Server Error for http://localhost:9090/test/ui/login.jsf



      Any help will be highly appreciated.