[seam-commits] Seam SVN: r15081 - branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Aug 24 07:34:38 EDT 2012


Author: maschmid
Date: 2012-08-24 07:34:37 -0400 (Fri, 24 Aug 2012)
New Revision: 15081

Modified:
   branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Deployments.java
Log:
remove jboss-seam-ui from the SeamTest tests


Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Deployments.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Deployments.java	2012-08-24 11:07:07 UTC (rev 15080)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Deployments.java	2012-08-24 11:34:37 UTC (rev 15081)
@@ -2,6 +2,7 @@
 
 import java.io.File;
 
+import org.jboss.shrinkwrap.api.ArchivePath;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.asset.StringAsset;
 import org.jboss.shrinkwrap.api.importer.ZipImporter;
@@ -9,27 +10,7 @@
 
 public class Deployments {
    public static WebArchive defaultSeamDeployment() {
-      return ShrinkWrap.create(ZipImporter.class, "test.war").importFrom(new File("target/seam-integration-tests.war")).as(WebArchive.class)
-            .addAsWebInfResource(new StringAsset(
-                  "<jboss-deployment-structure>" +
-                        "<deployment>" +
-                        "<dependencies>" +
-                        "<module name=\"org.javassist\"/>" +
-                        "<module name=\"org.dom4j\"/>" +
-                        "</dependencies>" +
-                        "</deployment>" +
-                  "</jboss-deployment-structure>"), "jboss-deployment-structure.xml")
-                  .addAsResource("seam.properties")
-                  .addAsResource("components.properties")
-                  .addAsResource("messages_en.properties")
-                  .addAsResource("META-INF/persistence.xml")
-
-                  .addAsResource("hibernate.cfg.xml")
-                  .addAsWebInfResource("WEB-INF/components.xml", "components.xml")
-                  .addAsWebInfResource("WEB-INF/pages.xml", "pages.xml")
-                  .addAsWebInfResource("WEB-INF/web.xml", "web.xml")
-                  .addAsWebInfResource("WEB-INF/ejb-jar.xml", "ejb-jar.xml")
-                  .addAsWebInfResource("WEB-INF/jboss-seam-integration-tests-hornetq-jms.xml", "jboss-seam-integration-tests-hornetq-jms.xml");
+      return defaultSeamDeployment("WEB-INF/components.xml");
    }
    
    // Deployment that use the proper SeamListener instead of the MockSeamListener
@@ -90,7 +71,7 @@
    }
 
    public static WebArchive defaultSeamDeployment(String customComponentsXml) {
-      return ShrinkWrap.create(ZipImporter.class, "test.war").importFrom(new File("target/seam-integration-tests.war")).as(WebArchive.class)
+      WebArchive war = ShrinkWrap.create(ZipImporter.class, "test.war").importFrom(new File("target/seam-integration-tests.war")).as(WebArchive.class)
             .addAsWebInfResource(new StringAsset(
                   "<jboss-deployment-structure>" +
                         "<deployment>" +
@@ -111,5 +92,15 @@
                   .addAsWebInfResource("WEB-INF/web.xml", "web.xml")
                   .addAsWebInfResource("WEB-INF/ejb-jar.xml", "ejb-jar.xml")
                   .addAsWebInfResource("WEB-INF/jboss-seam-integration-tests-hornetq-jms.xml", "jboss-seam-integration-tests-hornetq-jms.xml");
+      
+      // Remove jboss-seam-ui for a Mock SeamTest test as it would cause Mojarra to initialize
+      for (ArchivePath path : war.getContent().keySet()) {
+         if (path.get().contains("jboss-seam-ui")) {
+            war.delete(path);
+            break;
+         }
+      }
+      
+      return war;
    }
 }



More information about the seam-commits mailing list