[seam-commits] Seam SVN: r15562 - in branches/enterprise/WFK-2_1/examples: booking/booking-ejb/src/test/java/org/jboss/seam/example/booking/test and 17 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Jun 13 08:49:10 EDT 2013


Author: rsmeral
Date: 2013-06-13 08:49:09 -0400 (Thu, 13 Jun 2013)
New Revision: 15562

Modified:
   branches/enterprise/WFK-2_1/examples/blog/blog-ejb/src/test/java/org/jboss/seam/example/blog/test/BlogTest.java
   branches/enterprise/WFK-2_1/examples/booking/booking-ejb/src/test/java/org/jboss/seam/example/booking/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/contactlist/contactlist-ejb/src/test/java/org/jboss/seam/example/contactlist/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/excel/excel-ejb/src/test/java/org/jboss/seam/example/excel/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/hibernate/hibernate-web/src/test/java/org/jboss/seam/example/hibernate/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/itext/itext-ejb/src/test/java/org/jboss/seam/example/itext/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/jee6/jee6-web/src/test/java/org/jboss/seam/example/booking/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/jpa/jpa-web/src/test/java/org/jboss/seam/example/jpa/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/mail/mail-ejb/src/test/java/org/jboss/seam/example/mail/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/seam/example/messages/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/nestedbooking/nestedbooking-ejb/src/test/java/org/jboss/seam/example/nestedbooking/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/quartz/quartz-ejb/src/test/java/org/jboss/seam/example/quartz/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/registration/registration-ejb/src/test/java/org/jboss/seam/example/registration/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/restbay/restbay-ejb/src/test/java/org/jboss/seam/example/restbay/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/seambay/seambay-ejb/src/test/java/org/jboss/seam/example/seambay/test/AuctionTest.java
   branches/enterprise/WFK-2_1/examples/seamdiscs/seamdiscs-ejb/src/test/java/org/jboss/seam/example/seamdiscs/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/seampay/seampay-ejb/src/test/java/org/jboss/seam/example/seampay/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/seamspace/seamspace-ejb/src/test/java/org/jboss/seam/example/seamspace/test/Deployments.java
   branches/enterprise/WFK-2_1/examples/tasks/tasks-ejb/src/test/java/org/jboss/seam/example/tasks/test/Deployments.java
Log:
Cleanup deployment methods

Modified: branches/enterprise/WFK-2_1/examples/blog/blog-ejb/src/test/java/org/jboss/seam/example/blog/test/BlogTest.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/blog/blog-ejb/src/test/java/org/jboss/seam/example/blog/test/BlogTest.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/blog/blog-ejb/src/test/java/org/jboss/seam/example/blog/test/BlogTest.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -47,24 +47,24 @@
         WebArchive war = ShrinkWrap.create(WebArchive.class, "seam-blog.war")
                 .addPackages(true, "actions", "domain")
                 // already in EJB module
-                .addAsWebInfResource("import.sql", "classes/import.sql")
-                .addAsWebInfResource("seam.properties", "classes/seam.properties")
-                .addAsWebInfResource("META-INF/persistence.xml", "classes/META-INF/persistence.xml")
+                .addAsResource("import.sql")
+                .addAsResource("seam.properties")
+                .addAsResource("META-INF/persistence.xml")
                 
                 // manually copied from Web module
-                .addAsWebInfResource("pages.xml", "pages.xml")
-                .addAsWebInfResource("accessible.properties", "classes/accessible.properties")
-                .addAsWebInfResource("default.properties", "classes/default.properties")
-                .addAsWebInfResource("printable.properties", "classes/printable.properties")
-                .addAsWebInfResource("infinispan.xml", "classes/infinispan.xml")
-                .addAsWebInfResource("jgroupsConfig.xml", "classes/jgroupsConfig.xml")
+                .addAsWebInfResource("pages.xml")
+                .addAsResource("accessible.properties")
+                .addAsResource("default.properties")
+                .addAsResource("printable.properties")
+                .addAsResource("infinispan.xml")
+                .addAsResource("jgroupsConfig.xml")
                 
                 // manually copied from Web module, modified
-                .addAsWebInfResource("web.xml", "web.xml") // only contains MockSeamListener definition
-                .addAsWebInfResource("components.xml", "components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-blog
+                .addAsWebInfResource("web.xml") // only contains MockSeamListener definition
+                .addAsWebInfResource("components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-blog
 
                 // manually copied from EAR module
-                .addAsWebInfResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
+                .addAsWebInfResource("jboss-deployment-structure.xml")
                 .addAsLibraries(libs);
 
         return war;

Modified: branches/enterprise/WFK-2_1/examples/booking/booking-ejb/src/test/java/org/jboss/seam/example/booking/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/booking/booking-ejb/src/test/java/org/jboss/seam/example/booking/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/booking/booking-ejb/src/test/java/org/jboss/seam/example/booking/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -19,12 +19,12 @@
         return ShrinkWrap.create(WebArchive.class, "seam-booking.war")
                 .addPackage(Booking.class.getPackage())
                 .addAsWebInfResource("META-INF/ejb-jar.xml", "ejb-jar.xml")
-                .addAsWebInfResource("import.sql", "classes/import.sql")
-                .addAsWebInfResource("persistence.xml", "classes/META-INF/persistence.xml")
-                .addAsWebInfResource("components.xml", "components.xml")
-                .addAsWebInfResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
-                .addAsWebInfResource("seam.properties", "classes/seam.properties")
-                .addAsWebInfResource("web.xml", "web.xml")
+                .addAsResource("import.sql")
+                .addAsResource("persistence.xml", "META-INF/persistence.xml")
+                .addAsWebInfResource("components.xml")
+                .addAsWebInfResource("jboss-deployment-structure.xml")
+                .addAsResource("seam.properties")
+                .addAsWebInfResource("web.xml")
                 .addAsLibraries(libs);
     }
 }

Modified: branches/enterprise/WFK-2_1/examples/contactlist/contactlist-ejb/src/test/java/org/jboss/seam/example/contactlist/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/contactlist/contactlist-ejb/src/test/java/org/jboss/seam/example/contactlist/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/contactlist/contactlist-ejb/src/test/java/org/jboss/seam/example/contactlist/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -10,14 +10,10 @@
 public class Deployments {
    public static WebArchive contactListDeployment() {
     
-      // use profiles defined in 'maven.profiles' property in pom.xml
-      String profilesString = System.getProperty("maven.profiles");
-      String[] profiles = profilesString != null ? profilesString.split(", ?") : new String[0];
-      File[] libs = Maven.resolver().loadPomFromFile("pom.xml", profiles)
+      File[] libs = Maven.resolver().loadPomFromFile("pom.xml")
               .importCompileAndRuntimeDependencies()
               // force resolve jboss-seam, because it is provided-scoped in the pom, but we need it bundled in the WAR
               .resolve("org.jboss.seam:jboss-seam").withTransitivity().asFile();
-      
 
       return ShrinkWrap.create(WebArchive.class, "seam-contactlist.war")
               .addPackage(Contact.class.getPackage())
@@ -29,7 +25,5 @@
               .addAsWebInfResource("seam.properties", "classes/seam.properties")
               .addAsWebInfResource("web.xml", "web.xml")
               .addAsLibraries(libs);
-      
-      
    }
 }
\ No newline at end of file

Modified: branches/enterprise/WFK-2_1/examples/excel/excel-ejb/src/test/java/org/jboss/seam/example/excel/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/excel/excel-ejb/src/test/java/org/jboss/seam/example/excel/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/excel/excel-ejb/src/test/java/org/jboss/seam/example/excel/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -12,15 +12,10 @@
 {
    public static WebArchive excelDeployment() {
       
-      // use profiles defined in 'maven.profiles' property in pom.xml
-      String profilesString = System.getProperty("maven.profiles");
-      String[] profiles = profilesString != null ? profilesString.split(", ?") : new String[0];
-      File[] libs = Maven.resolver().loadPomFromFile("pom.xml", profiles)
+      File[] libs = Maven.resolver().loadPomFromFile("pom.xml")
             .importCompileAndRuntimeDependencies()
             // force resolve jboss-seam, because it is provided-scoped in the pom, but we need it bundled in the WAR
             .resolve("org.jboss.seam:jboss-seam").withTransitivity().asFile();
-              
-      
 
       return ShrinkWrap.create(WebArchive.class, "seam-excel.war")
               .addPackage(ExcelTest.class.getPackage())
@@ -33,7 +28,6 @@
               .addAsWebInfResource("web.xml", "web.xml")
               .addAsWebResource("simple.xhtml")
               .addAsLibraries(libs);
-      
    }
 
 }

Modified: branches/enterprise/WFK-2_1/examples/hibernate/hibernate-web/src/test/java/org/jboss/seam/example/hibernate/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/hibernate/hibernate-web/src/test/java/org/jboss/seam/example/hibernate/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/hibernate/hibernate-web/src/test/java/org/jboss/seam/example/hibernate/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -15,7 +15,6 @@
                 .resolve().withTransitivity().asFile();
 
         // Get File reference to src/main/webapp/WEB-INF, to avoid duplication of resources for the test archive
-        // Depends on shrinkwrap-resolver-maven-plugin to set the property
         File webInf = new File(new File("pom.xml").getParentFile(), "src/main/webapp/WEB-INF");
 
         return ShrinkWrap.create(WebArchive.class, "hibernate-web.war")

Modified: branches/enterprise/WFK-2_1/examples/itext/itext-ejb/src/test/java/org/jboss/seam/example/itext/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/itext/itext-ejb/src/test/java/org/jboss/seam/example/itext/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/itext/itext-ejb/src/test/java/org/jboss/seam/example/itext/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -11,16 +11,11 @@
 public class Deployments
 {
 public static WebArchive itextDeployment() {
-      
-      // use profiles defined in 'maven.profiles' property in pom.xml
-      String profilesString = System.getProperty("maven.profiles");
-      String[] profiles = profilesString != null ? profilesString.split(", ?") : new String[0];
-      File[] libs = Maven.resolver().loadPomFromFile("pom.xml", profiles)
+
+      File[] libs = Maven.resolver().loadPomFromFile("pom.xml")
             .importCompileAndRuntimeDependencies()
             // force resolve jboss-seam, because it is provided-scoped in the pom, but we need it bundled in the WAR
             .resolve("org.jboss.seam:jboss-seam").withTransitivity().asFile();
-              
-      
 
       return ShrinkWrap.create(WebArchive.class, "seam-itext.war")
               .addPackage(JFreeData.class.getPackage())
@@ -32,9 +27,6 @@
               .addAsWebInfResource("seam.properties", "classes/seam.properties")
               .addAsWebInfResource("web.xml", "web.xml")
               .addAsWebResource("whyseam.xhtml")
-              .addAsLibraries(libs);
-      
+              .addAsLibraries(libs);  
    }
-
-
 }

Modified: branches/enterprise/WFK-2_1/examples/jee6/jee6-web/src/test/java/org/jboss/seam/example/booking/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/jee6/jee6-web/src/test/java/org/jboss/seam/example/booking/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/jee6/jee6-web/src/test/java/org/jboss/seam/example/booking/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -16,7 +16,6 @@
                 .resolve().withTransitivity().asFile();
 
         // Get File reference to src/main/webapp/WEB-INF, to avoid duplication of resources for the test archive
-        // Depends on shrinkwrap-resolver-maven-plugin to set the property
         File webInf = new File(new File("pom.xml").getParentFile(), "src/main/webapp/WEB-INF");
 
         return ShrinkWrap.create(WebArchive.class, "jee6-web.war")

Modified: branches/enterprise/WFK-2_1/examples/jpa/jpa-web/src/test/java/org/jboss/seam/example/jpa/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/jpa/jpa-web/src/test/java/org/jboss/seam/example/jpa/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/jpa/jpa-web/src/test/java/org/jboss/seam/example/jpa/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -16,7 +16,6 @@
                 .resolve().withTransitivity().asFile();
 
         // Get File reference to src/main/webapp/WEB-INF, to avoid duplication of resources for the test archive
-        // Depends on shrinkwrap-resolver-maven-plugin to set the property
         File webInf = new File(new File("pom.xml").getParentFile(), "src/main/webapp/WEB-INF");
 
         return ShrinkWrap.create(WebArchive.class, "jpa-web.war")

Modified: branches/enterprise/WFK-2_1/examples/mail/mail-ejb/src/test/java/org/jboss/seam/example/mail/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/mail/mail-ejb/src/test/java/org/jboss/seam/example/mail/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/mail/mail-ejb/src/test/java/org/jboss/seam/example/mail/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -12,16 +12,10 @@
    
    public static WebArchive mailDeployment() {
    
-      // use profiles defined in 'maven.profiles' property in pom.xml
-      String profilesString = System.getProperty("maven.profiles");
-      String[] profiles = profilesString != null ? profilesString.split(", ?") : new String[0];
-      
-      File[] libs = Maven.resolver().loadPomFromFile("pom.xml", profiles)
+      File[] libs = Maven.resolver().loadPomFromFile("pom.xml")
             .importCompileAndRuntimeDependencies()
             // force resolve jboss-seam, because it is provided-scoped in the pom, but we need it bundled in the WAR
             .resolve("org.jboss.seam:jboss-seam").withTransitivity().asFile();
-              
-      
 
       return ShrinkWrap.create(WebArchive.class, "seam-mail.war")
               .addPackage(MailExample.class.getPackage())
@@ -41,7 +35,6 @@
               .addAsWebResource("templating.xhtml")
               .addAsWebResource("template.xhtml")
               .addAsLibraries(libs);
-      
    }
 
 }

Modified: branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/seam/example/messages/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/seam/example/messages/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/seam/example/messages/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -8,20 +8,13 @@
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
 
 public class Deployments
-{
-   
+{ 
    public static WebArchive messagesDeployment() {
-      
-      // use profiles defined in 'maven.profiles' property in pom.xml
-      String profilesString = System.getProperty("maven.profiles");
-      String[] profiles = profilesString != null ? profilesString.split(", ?") : new String[0];
-      
-      File[] libs = Maven.resolver().loadPomFromFile("pom.xml", profiles)
+
+      File[] libs = Maven.resolver().loadPomFromFile("pom.xml")
             .importCompileAndRuntimeDependencies()
             // force resolve jboss-seam, because it is provided-scoped in the pom, but we need it bundled in the WAR
             .resolve("org.jboss.seam:jboss-seam").withTransitivity().asFile();
-              
-      
 
       return ShrinkWrap.create(WebArchive.class, "seam-messages.war")
               .addPackage(Message.class.getPackage())
@@ -32,8 +25,7 @@
               .addAsWebInfResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
               .addAsWebInfResource("seam.properties", "classes/seam.properties")
               .addAsWebInfResource("web.xml", "web.xml")
-              .addAsLibraries(libs);
-      
+              .addAsLibraries(libs);      
    }
 
 }

Modified: branches/enterprise/WFK-2_1/examples/nestedbooking/nestedbooking-ejb/src/test/java/org/jboss/seam/example/nestedbooking/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/nestedbooking/nestedbooking-ejb/src/test/java/org/jboss/seam/example/nestedbooking/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/nestedbooking/nestedbooking-ejb/src/test/java/org/jboss/seam/example/nestedbooking/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -21,16 +21,16 @@
                 
                 // from main and test resources
                 .addAsWebInfResource("META-INF/ejb-jar.xml", "ejb-jar.xml")
-                .addAsResource("import.sql", "import.sql")
-                .addAsResource("seam.properties", "seam.properties")
-                .addAsWebInfResource("web.xml", "web.xml")
+                .addAsResource("import.sql")
+                .addAsResource("seam.properties")
+                .addAsWebInfResource("web.xml")
                 
                 // manually copied from EAR, persistence modified
                 .addAsResource("persistence.xml", "META-INF/persistence.xml")
-                .addAsWebInfResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
+                .addAsWebInfResource("jboss-deployment-structure.xml")
                 
                 // manually copied from WAR
-                .addAsWebInfResource("components.xml", "components.xml")
+                .addAsWebInfResource("components.xml")
                 .addAsLibraries(libs);
     }
 }

Modified: branches/enterprise/WFK-2_1/examples/quartz/quartz-ejb/src/test/java/org/jboss/seam/example/quartz/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/quartz/quartz-ejb/src/test/java/org/jboss/seam/example/quartz/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/quartz/quartz-ejb/src/test/java/org/jboss/seam/example/quartz/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -9,38 +9,10 @@
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
 
 public class Deployments {
-   /* public static EnterpriseArchive quartzDeployment() {
-        EnterpriseArchive ear = ShrinkWrap.create(ZipImporter.class, "seam-quartz.ear").importFrom(new File("../quartz-ear/target/seam-quartz.ear"))
-              .as(EnterpriseArchive.class);
-
-        // Install org.jboss.seam.mock.MockSeamListener
-        WebArchive web = ear.getAsType(WebArchive.class, "quartz-web.war");
-        web.delete("/WEB-INF/web.xml");
-        web.addAsWebInfResource("web.xml");
-        
-        web.addAsResource("BaseData.xml", "BaseData.xml");
-        
-        web.delete("/WEB-INF/components.xml");
-        web.addAsWebInfResource("WEB-INF/components.xml", "components.xml");
-        
-        JavaArchive ejb =  ear.getAsType(JavaArchive.class, "quartz-ejb.jar");
-        ejb.addClasses(TestPaymentController.class, TestPaymentProcessor.class, TransactionStatus.class);
-        
-        ear.addAsLibraries(DependencyResolvers.use(MavenDependencyResolver.class)
-              .configureFrom("pom.xml")
-              .artifact("org.dbunit:dbunit:jar:2.2")
-              .resolveAsFiles());
-
-        return ear;
-    }*/
     
     public static WebArchive quartzDeployment() {
        
-       // use profiles defined in 'maven.profiles' property in pom.xml
-       String profilesString = System.getProperty("maven.profiles");
-       String[] profiles = profilesString != null ? profilesString.split(", ?") : new String[0];
-       
-       File[] libs = Maven.resolver().loadPomFromFile("pom.xml", profiles)
+       File[] libs = Maven.resolver().loadPomFromFile("pom.xml")
              .importCompileAndRuntimeDependencies()
              // force resolve jboss-seam, because it is provided-scoped in the pom, but we need it bundled in the WAR
              .resolve("org.jboss.seam:jboss-seam").withTransitivity().asFile();
@@ -56,19 +28,19 @@
                .addPackage(AsynchronousTest.class.getPackage())
                .addPackage(PaymentProcessor.class.getPackage())
                .addAsWebInfResource("META-INF/ejb-jar.xml", "ejb-jar.xml")
-               .addAsWebInfResource("components.xml", "components.xml")
-               .addAsWebInfResource("persistence.xml", "classes/META-INF/persistence.xml")
-               .addAsWebInfResource("import.sql", "classes/import.sql")
-               .addAsWebInfResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
-               .addAsWebInfResource("seam.properties", "classes/seam.properties")
-               .addAsWebInfResource("seam.quartz.properties", "classes/seam.quartz.properties")
-               .addAsWebInfResource("web.xml", "web.xml")
-               .addAsWebInfResource("pages.xml", "pages.xml")
-               .addAsResource("BaseData.xml", "BaseData.xml")
+               .addAsWebInfResource("components.xml")
+               .addAsResource("persistence.xml", "META-INF/persistence.xml")
+               .addAsResource("import.sql")
+               .addAsWebInfResource("jboss-deployment-structure.xml")
+               .addAsResource("seam.properties")
+               .addAsResource("seam.quartz.properties", "seam.quartz.properties")
+               .addAsWebInfResource("web.xml")
+               .addAsWebInfResource("pages.xml")
+               .addAsResource("BaseData.xml")
                .addAsWebResource("index.html")
                .addAsWebResource("search.xhtml")
                .addAsLibraries(libs)
                .addAsLibraries(dbunitLibs);
-       
+
     }
 }

Modified: branches/enterprise/WFK-2_1/examples/registration/registration-ejb/src/test/java/org/jboss/seam/example/registration/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/registration/registration-ejb/src/test/java/org/jboss/seam/example/registration/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/registration/registration-ejb/src/test/java/org/jboss/seam/example/registration/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -11,26 +11,20 @@
 {
    
    public static WebArchive registrationDeployment() {
-      
-      // use profiles defined in 'maven.profiles' property in pom.xml
-      String profilesString = System.getProperty("maven.profiles");
-      String[] profiles = profilesString != null ? profilesString.split(", ?") : new String[0];
-      
-      File[] libs = Maven.resolver().loadPomFromFile("pom.xml", profiles)
+
+      File[] libs = Maven.resolver().loadPomFromFile("pom.xml")
             .importCompileAndRuntimeDependencies()
             // force resolve jboss-seam, because it is provided-scoped in the pom, but we need it bundled in the WAR
             .resolve("org.jboss.seam:jboss-seam").withTransitivity().asFile();
-              
-      
 
       return ShrinkWrap.create(WebArchive.class, "seam-registration.war")
               .addPackage(RegisterAction.class.getPackage())
               .addAsWebInfResource("META-INF/ejb-jar.xml", "ejb-jar.xml")
-              .addAsWebInfResource("components.xml", "components.xml")
-              .addAsWebInfResource("persistence.xml", "classes/META-INF/persistence.xml")
-              .addAsWebInfResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
-              .addAsWebInfResource("seam.properties", "classes/seam.properties")
-              .addAsWebInfResource("web.xml", "web.xml")
+              .addAsWebInfResource("components.xml")
+              .addAsResource("persistence.xml", "META-INF/persistence.xml")
+              .addAsWebInfResource("jboss-deployment-structure.xml")
+              .addAsResource("seam.properties")
+              .addAsWebInfResource("web.xml")
               .addAsWebResource("index.html")
               .addAsWebResource("register.xhtml")
               .addAsWebResource("registered.xhtml")

Modified: branches/enterprise/WFK-2_1/examples/restbay/restbay-ejb/src/test/java/org/jboss/seam/example/restbay/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/restbay/restbay-ejb/src/test/java/org/jboss/seam/example/restbay/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/restbay/restbay-ejb/src/test/java/org/jboss/seam/example/restbay/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -21,22 +21,22 @@
                 .addPackages(true,  "org.jboss.seam.example.restbay.resteasy")
 
                 // already in EJB module
-                .addAsWebInfResource("import.sql", "classes/import.sql")
-                .addAsWebInfResource("seam.properties", "classes/seam.properties")
+                .addAsResource("import.sql")
+                .addAsResource("seam.properties")
                 .addAsWebInfResource("META-INF/ejb-jar.xml", "ejb-jar.xml")
 
                 // test specific persistence.xml
-                .addAsWebInfResource("persistence.xml", "classes/META-INF/persistence.xml")
+                .addAsResource("persistence.xml", "META-INF/persistence.xml")
 
                 // manually copied from Web module
-                .addAsWebInfResource("pages.xml", "pages.xml")
+                .addAsWebInfResource("pages.xml")
 
                 // manually copied from Web module, modified
-                .addAsWebInfResource("web.xml", "web.xml") // only contains MockSeamListener definition
-                .addAsWebInfResource("components.xml", "components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-restbay
+                .addAsWebInfResource("web.xml") // only contains MockSeamListener definition
+                .addAsWebInfResource("components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-restbay
 
                 // manually copied from EAR module
-                .addAsWebInfResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
+                .addAsWebInfResource("jboss-deployment-structure.xml")
                 .addAsLibraries(libs);
 
         return war;

Modified: branches/enterprise/WFK-2_1/examples/seambay/seambay-ejb/src/test/java/org/jboss/seam/example/seambay/test/AuctionTest.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/seambay/seambay-ejb/src/test/java/org/jboss/seam/example/seambay/test/AuctionTest.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/seambay/seambay-ejb/src/test/java/org/jboss/seam/example/seambay/test/AuctionTest.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -41,24 +41,24 @@
                 .addAsWebInfResource("org/jboss/seam/example/seambay/soap-handlers.xml", "classes/org/jboss/seam/example/seambay/soap-handlers.xml")
 
                 // already in EJB module
-                .addAsWebInfResource("import.sql", "classes/import.sql")
-                .addAsWebInfResource("seam.properties", "classes/seam.properties")
+                .addAsResource("import.sql")
+                .addAsResource("seam.properties")
 
                 .addAsWebInfResource("META-INF/ejb-jar.xml", "ejb-jar.xml")
                 .addAsWebInfResource("META-INF/security-rules.drl", "security-rules.drl")
 
                 // Test specific persistence.xml
-                .addAsWebInfResource("persistence.xml", "classes/META-INF/persistence.xml")
+                .addAsResource("persistence.xml", "META-INF/persistence.xml")
 
                 // manually copied from Web module
-                .addAsWebInfResource("pages.xml", "pages.xml")
+                .addAsWebInfResource("pages.xml")
 
                 // manually copied from Web module, modified
-                .addAsWebInfResource("web.xml", "web.xml") // only contains MockSeamListener definition
-                .addAsWebInfResource("components.xml", "components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-blog
+                .addAsWebInfResource("web.xml") // only contains MockSeamListener definition
+                .addAsWebInfResource("components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-blog
 
                 // manually copied from EAR module
-                .addAsWebInfResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
+                .addAsWebInfResource("jboss-deployment-structure.xml")
                 .addAsLibraries(libs);
 
       return war;

Modified: branches/enterprise/WFK-2_1/examples/seamdiscs/seamdiscs-ejb/src/test/java/org/jboss/seam/example/seamdiscs/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/seamdiscs/seamdiscs-ejb/src/test/java/org/jboss/seam/example/seamdiscs/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/seamdiscs/seamdiscs-ejb/src/test/java/org/jboss/seam/example/seamdiscs/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -19,63 +19,39 @@
                 .resolve("org.dbunit:dbunit:jar:2.2")
                 .withoutTransitivity().asFile();
 
-        WebArchive war = ShrinkWrap.create(WebArchive.class, "seam-seamdiscs.war")
+        return ShrinkWrap.create(WebArchive.class, "seam-seamdiscs.war")
                 .addPackages(true, "org.jboss.seam.example.seamdiscs")
                 .addPackages(true, "org.jboss.seam.trinidad")
                 .addClasses(TestStrings.class)
 
                 // already in EJB module
-                .addAsResource("import.sql", "import.sql")
-                .addAsResource("seam.properties", "seam.properties")
+                .addAsResource("import.sql")
+                .addAsResource("seam.properties")
                 .addAsWebInfResource("META-INF/ejb-jar.xml", "ejb-jar.xml")
 
                 // test specific persistence.xml
                 .addAsResource("persistence.xml", "META-INF/persistence.xml")
 
                 // manually copied from Web module
-                .addAsWebInfResource("pages.xml", "pages.xml")
-                .addAsWebResource("login.page.xml", "login.page.xml")
-                .addAsWebResource("artist.page.xml", "artist.page.xml")
-                .addAsWebResource("artists.page.xml", "artists.page.xml")
-                .addAsWebResource("disc.page.xml", "disc.page.xml")
-                .addAsWebResource("discs.page.xml", "discs.page.xml")
+                .addAsWebInfResource("pages.xml")
+                .addAsWebResource("login.page.xml")
+                .addAsWebResource("artist.page.xml")
+                .addAsWebResource("artists.page.xml")
+                .addAsWebResource("disc.page.xml")
+                .addAsWebResource("discs.page.xml")
 
                 // manually copied from Web module, modified
-                .addAsWebInfResource("web.xml", "web.xml") // only contains MockSeamListener definition
-                .addAsWebInfResource("components.xml", "components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-restbay
+                .addAsWebInfResource("web.xml") // only contains MockSeamListener definition
+                .addAsWebInfResource("components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-restbay
 
                 // manually copied from EAR module
-                .addAsWebInfResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
+                .addAsWebInfResource("jboss-deployment-structure.xml")
 
                 // 
-                .addAsResource("org/jboss/seam/example/seamdiscs/test/BaseData.xml", "org/jboss/seam/example/seamdiscs/test/BaseData.xml")
+                .addAsResource("org/jboss/seam/example/seamdiscs/test/BaseData.xml")
 
                 .addAsLibraries(libs)
                 .addAsLibraries(dbunitLibs);
 
-        return war;
-
-/*
-        EnterpriseArchive ear = ShrinkWrap.create(ZipImporter.class, "seam-seamdiscs.ear").importFrom(new File("../seamdiscs-ear/target/seam-seamdiscs.ear"))
-              .as(EnterpriseArchive.class);
-
-        // Install org.jboss.seam.mock.MockSeamListener
-        WebArchive web = ear.getAsType(WebArchive.class, "seamdiscs-web.war");
-        web.delete("/WEB-INF/web.xml");
-        web.addAsWebInfResource("web.xml");
-        
-        web.delete("/WEB-INF/faces-config.xml");
-        
-        web.addAsResource("org/jboss/seam/example/seamdiscs/test/BaseData.xml", "org/jboss/seam/example/seamdiscs/test/BaseData.xml");
-        
-        JavaArchive ejb =  ear.getAsType(JavaArchive.class, "seamdiscs-ejb.jar");
-        ejb.addClasses(TestStrings.class);
-        
-        ear.addAsLibraries(DependencyResolvers.use(MavenDependencyResolver.class)
-              .configureFrom("pom.xml")
-              .artifact("org.dbunit:dbunit:jar:2.2")
-              .resolveAsFiles());
-
-        return ear;*/
     }
 }

Modified: branches/enterprise/WFK-2_1/examples/seampay/seampay-ejb/src/test/java/org/jboss/seam/example/seampay/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/seampay/seampay-ejb/src/test/java/org/jboss/seam/example/seampay/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/seampay/seampay-ejb/src/test/java/org/jboss/seam/example/seampay/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -15,27 +15,26 @@
                 .resolve("org.jboss.seam:jboss-seam")
                 .withTransitivity().asFile();
 
-      WebArchive war = ShrinkWrap.create(WebArchive.class, "seam-seampay.war")
+      return ShrinkWrap.create(WebArchive.class, "seam-seampay.war")
                 .addPackages(true, "org.jboss.seam.example.seampay")
 
                 // already in EJB module
-                .addAsResource("import.sql", "import.sql")
-                .addAsResource("seam.properties", "seam.properties")
+                .addAsResource("import.sql")
+                .addAsResource("seam.properties")
                 .addAsResource("META-INF/persistence.xml", "META-INF/persistence.xml")
 
                 .addAsWebInfResource("META-INF/ejb-jar.xml", "ejb-jar.xml")
 
                 // manually copied from Web module
-                .addAsWebInfResource("pages.xml", "pages.xml")
+                .addAsWebInfResource("pages.xml")
 
                 // manually copied from Web module, modified
-                .addAsWebInfResource("web.xml", "web.xml") // only contains MockSeamListener definition
-                .addAsWebInfResource("components.xml", "components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-seampay
+                .addAsWebInfResource("web.xml") // only contains MockSeamListener definition
+                .addAsWebInfResource("components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-seampay
 
                 // manually copied from EAR module
-                .addAsWebInfResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
+                .addAsWebInfResource("jboss-deployment-structure.xml")
                 .addAsLibraries(libs);
 
-      return war;
    }
 }

Modified: branches/enterprise/WFK-2_1/examples/seamspace/seamspace-ejb/src/test/java/org/jboss/seam/example/seamspace/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/seamspace/seamspace-ejb/src/test/java/org/jboss/seam/example/seamspace/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/seamspace/seamspace-ejb/src/test/java/org/jboss/seam/example/seamspace/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -15,30 +15,29 @@
                 .resolve("org.jboss.seam:jboss-seam")
                 .withTransitivity().asFile();
 
-      WebArchive war = ShrinkWrap.create(WebArchive.class, "seam-seamspace.war")
+      return ShrinkWrap.create(WebArchive.class, "seam-seamspace.war")
                 .addPackages(true, "org.jboss.seam.example.seamspace")
 
                 // already in EJB module
-                .addAsResource("import.sql", "import.sql")
-                .addAsResource("seam.properties", "seam.properties")
+                .addAsResource("import.sql")
+                .addAsResource("seam.properties")
                 .addAsWebInfResource("META-INF/ejb-jar.xml", "ejb-jar.xml")
-                .addAsResource("META-INF/orm.xml", "META-INF/orm.xml")
-                .addAsResource("META-INF/security-rules.drl", "META-INF/security-rules.drl")
+                .addAsResource("META-INF/orm.xml")
+                .addAsResource("META-INF/security-rules.drl")
 
                 // test-specific persistence.xml
                 .addAsResource("persistence.xml", "META-INF/persistence.xml")
 
                 // manually copied from Web module
-                .addAsWebInfResource("pages.xml", "pages.xml")
+                .addAsWebInfResource("pages.xml")
 
                 // manually copied from Web module, modified
-                .addAsWebInfResource("web.xml", "web.xml") // only contains MockSeamListener definition
-                .addAsWebInfResource("components.xml", "components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-seampay
+                .addAsWebInfResource("web.xml") // only contains MockSeamListener definition
+                .addAsWebInfResource("components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-seampay
 
                 // manually copied from EAR module
-                .addAsWebInfResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
+                .addAsWebInfResource("jboss-deployment-structure.xml")
                 .addAsLibraries(libs);
 
-      return war;
    }
 }

Modified: branches/enterprise/WFK-2_1/examples/tasks/tasks-ejb/src/test/java/org/jboss/seam/example/tasks/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/tasks/tasks-ejb/src/test/java/org/jboss/seam/example/tasks/test/Deployments.java	2013-06-12 14:46:27 UTC (rev 15561)
+++ branches/enterprise/WFK-2_1/examples/tasks/tasks-ejb/src/test/java/org/jboss/seam/example/tasks/test/Deployments.java	2013-06-13 12:49:09 UTC (rev 15562)
@@ -19,22 +19,22 @@
                 .addPackages(true, "org.jboss.seam.example.tasks")
 
                 // already in EJB module
-                .addAsResource("import.sql", "import.sql")
-                .addAsResource("seam.properties", "seam.properties")
+                .addAsResource("import.sql")
+                .addAsResource("seam.properties")
                 .addAsWebInfResource("META-INF/ejb-jar.xml", "ejb-jar.xml")
 
                 // test-specific persistence.xml
                 .addAsResource("persistence.xml", "META-INF/persistence.xml")
 
                 // manually copied from Web module
-                .addAsWebInfResource("pages.xml", "pages.xml")
+                .addAsWebInfResource("pages.xml")
 
                 // manually copied from Web module, modified
-                .addAsWebInfResource("web.xml", "web.xml") // only contains MockSeamListener definition
-                .addAsWebInfResource("components.xml", "components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-tasks
+                .addAsWebInfResource("web.xml") // only contains MockSeamListener definition
+                .addAsWebInfResource("components.xml") // corrected ejb component jndi-name references from java:app/jboss-seam to java:app/seam-tasks
 
                 // manually copied from EAR module
-                .addAsWebInfResource("jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
+                .addAsWebInfResource("jboss-deployment-structure.xml")
                 .addAsLibraries(libs);
 
       return war;



More information about the seam-commits mailing list