[seam-commits] Seam SVN: r15539 - in branches/enterprise/WFK-2_1/examples/messages: messages-ear and 17 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Jun 4 03:01:40 EDT 2013


Author: tremes
Date: 2013-06-04 03:01:40 -0400 (Tue, 04 Jun 2013)
New Revision: 15539

Added:
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/seam/
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/seam/example/
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/seam/example/messages/
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/seam/example/messages/test/
   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/MessageListTest.java
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/arquillian.xml
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/components.xml
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/ejb-jar.xml
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/import.sql
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/jboss-deployment-structure.xml
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/persistence.xml
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/seam.properties
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/web.xml
Removed:
   branches/enterprise/WFK-2_1/examples/messages/messages-tests/pom.xml
   branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java
   branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java
   branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-ftest/testng.xml
   branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-integration/arquillian.xml
   branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-integration/web.xml
Modified:
   branches/enterprise/WFK-2_1/examples/messages/messages-ear/pom.xml
   branches/enterprise/WFK-2_1/examples/messages/messages-ejb/pom.xml
   branches/enterprise/WFK-2_1/examples/messages/messages-web/pom.xml
   branches/enterprise/WFK-2_1/examples/messages/pom.xml
Log:
Messages example migrated

Modified: branches/enterprise/WFK-2_1/examples/messages/messages-ear/pom.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-ear/pom.xml	2013-06-04 06:41:09 UTC (rev 15538)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ear/pom.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -52,6 +52,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-ear-plugin</artifactId>
+                <version>${version.ear.plugin}</version>
                 <configuration>
                     <version>6</version>
                     <defaultLibBundleDir>lib</defaultLibBundleDir>

Modified: branches/enterprise/WFK-2_1/examples/messages/messages-ejb/pom.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-ejb/pom.xml	2013-06-04 06:41:09 UTC (rev 15538)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ejb/pom.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -46,5 +46,116 @@
                 </exclusions>
                 <scope>provided</scope>
         </dependency>
+        
+        <!-- Test dependencies -->
+		<dependency>
+			<groupId>org.jboss.shrinkwrap.resolver</groupId>
+			<artifactId>shrinkwrap-resolver-depchain</artifactId>
+			<type>pom</type>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.jboss.arquillian.junit</groupId>
+			<artifactId>arquillian-junit-container</artifactId>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.jboss.arquillian.protocol</groupId>
+			<artifactId>arquillian-protocol-servlet</artifactId>
+			<scope>test</scope>
+		</dependency>
+		
+		<dependency>
+            <groupId>org.jboss.spec.javax.faces</groupId>
+            <artifactId>jboss-jsf-api_2.1_spec</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
+    
+    <profiles>
+		<profile>
+			<id>integration-tests</id>
+			<activation>
+				<property>
+					<name>arquillian</name>
+				</property>
+			</activation>
+			<properties>
+				<jndiPattern>java:app/seam-messages/#{ejbName}</jndiPattern>
+				<distributable>false</distributable>
+			</properties>
+			<build>
+				<testResources>
+					<testResource>
+						<directory>src/test/resources</directory>
+						<filtering>true</filtering>
+					</testResource>
+				</testResources>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-surefire-plugin</artifactId>
+						<configuration>
+							<skip>false</skip>
+						</configuration>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+
+		<profile>
+			<id>arq-jbossas-7-managed</id>
+			<activation>
+				<property>
+					<name>arquillian</name>
+					<value>jbossas-managed-7</value>
+				</property>
+			</activation>
+			<dependencies>
+				<dependency>
+					<groupId>org.jboss.as</groupId>
+					<artifactId>jboss-as-arquillian-container-managed</artifactId>
+					<scope>test</scope>
+				</dependency>
+			</dependencies>
+		</profile>
+
+		<profile>
+			<id>arq-jbossas-7-remote</id>
+			<activation>
+				<property>
+					<name>arquillian</name>
+					<value>jbossas-remote-7</value>
+				</property>
+			</activation>
+			<dependencies>
+				<dependency>
+					<groupId>org.jboss.as</groupId>
+					<artifactId>jboss-as-arquillian-container-remote</artifactId>
+					<scope>test</scope>
+				</dependency>
+			</dependencies>
+		</profile>
+	</profiles>
+
+	<build>
+		<plugins>
+			<!-- Skip tests by default -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<configuration>
+					<skip>true</skip>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
 </project>

Added: 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	                        (rev 0)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/seam/example/messages/test/Deployments.java	2013-06-04 07:01:40 UTC (rev 15539)
@@ -0,0 +1,39 @@
+package org.jboss.seam.example.messages.test;
+
+import java.io.File;
+
+import org.jboss.seam.example.messages.Message;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+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)
+            .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())
+              .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("web.xml", "web.xml")
+              .addAsLibraries(libs);
+      
+   }
+
+}

Copied: branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java (from rev 15538, branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java)
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java	                        (rev 0)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java	2013-06-04 07:01:40 UTC (rev 15539)
@@ -0,0 +1,103 @@
+//$Id: MessageListTest.java 2383 2006-10-26 18:53:00Z gavin $
+package org.jboss.seam.example.messages.test;
+import javax.faces.model.DataModel;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OverProtocol;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.mock.JUnitSeamTest;
+import org.jboss.shrinkwrap.api.Archive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+ at RunWith(Arquillian.class)
+public class MessageListTest extends JUnitSeamTest
+{
+	@Deployment(name="MessageListTest")
+	@OverProtocol("Servlet 3.0") 
+	public static Archive<?> createDeployment()
+	{
+
+      return Deployments.messagesDeployment();
+   }
+	
+   @Test
+   public void testMessageList() throws Exception 
+   {
+      new NonFacesRequest()
+      {
+
+         @Override
+         protected void renderResponse() throws Exception {
+            DataModel list = (DataModel) getInstance("messageList");
+            assert list.getRowCount()==2;
+         }
+         
+      }.run();
+
+      new FacesRequest()
+      {
+
+         @Override
+         protected void updateModelValues() throws Exception {
+            DataModel list = (DataModel) getInstance("messageList");
+            assert list.getRowCount()==2;
+            list.setRowIndex(1);
+         }
+         
+         
+         @Override
+         protected void invokeApplication() throws Exception {
+            invokeMethod("#{messageManager.select}");
+         }
+
+
+         @Override
+         protected void renderResponse() throws Exception {
+            DataModel list = (DataModel) getInstance("messageList");
+            assert list.getRowCount()==2;
+            assert getValue("#{message.title}").equals("Hello World");
+            assert getValue("#{message.read}").equals(true);
+         }
+         
+      }.run();
+
+      new FacesRequest()
+      {
+
+         @Override
+         protected void updateModelValues() throws Exception {
+            DataModel list = (DataModel) getInstance("messageList");
+            assert list.getRowCount()==2;
+            list.setRowIndex(0);
+         }
+         
+         
+         @Override
+         protected void invokeApplication() throws Exception {
+            invokeMethod("#{messageManager.delete}");
+         }
+
+
+         @Override
+         protected void renderResponse() throws Exception {
+            DataModel list = (DataModel) getInstance("messageList");
+            assert list.getRowCount()==1;
+         }
+         
+      }.run();
+
+      new NonFacesRequest()
+      {
+
+         @Override
+         protected void renderResponse() throws Exception {
+            DataModel list = (DataModel) getInstance("messageList");
+            assert list.getRowCount()==1;
+         }
+         
+      }.run();
+
+   }
+   
+}

Added: branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/arquillian.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/arquillian.xml	                        (rev 0)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/arquillian.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns="http://jboss.org/schema/arquillian"
+	xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+	<engine>
+		<property name="deploymentExportPath">target/</property>
+	</engine>
+
+	<container qualifier="jboss" default="true">
+		<configuration>
+			<!-- These properties are only valid for arquillian managed container, 
+				but don't cause a problem for the remote container, so they can be left in. -->
+			<!-- To use jacoco, set jacoco.agent system property to something like 
+				-javaagent:/path/to/jacocoagent.jar=append=true,destfile=/path/to/output/jacoco.exec -->
+			<property name="javaVmArguments">-Xmx1024m -XX:MaxPermSize=1024m ${jacoco.agent}</property>
+			<property name="serverConfig">standalone.xml</property>
+			<!-- If jbossHome property is not set, the JBOSS_HOME environment variable 
+				is used -->
+			<!--<property name="jbossHome">/path/to/jboss/as</property> -->
+		</configuration>
+	</container>
+
+</arquillian>

Added: branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/components.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/components.xml	                        (rev 0)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/components.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.org/schema/seam/components"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="http://jboss.org/schema/seam/components http://jboss.org/schema/seam/components-2.3.xsd">
+            
+    <component name="org.jboss.seam.core.init">
+        <property name="jndiPattern">${jndiPattern}</property>
+    </component>
+    
+    <!-- This is required for JBoss AS7 due these EJB components are bound to jboss-seam module  -->
+    <component class="org.jboss.seam.transaction.EjbSynchronizations" jndi-name="java:app/jboss-seam/EjbSynchronizations"/>
+    <component class="org.jboss.seam.async.TimerServiceDispatcher" jndi-name="java:app/jboss-seam/TimerServiceDispatcher"/>
+
+</components>

Added: branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/ejb-jar.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/ejb-jar.xml	                        (rev 0)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/ejb-jar.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" 
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+         version="3.0">
+         
+   <interceptors>
+     <interceptor>
+       <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+     </interceptor>
+   </interceptors>
+   
+   <assembly-descriptor>
+      <interceptor-binding>
+         <ejb-name>*</ejb-name>
+         <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+      </interceptor-binding>
+   </assembly-descriptor>
+   
+</ejb-jar>

Added: branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/import.sql
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/import.sql	                        (rev 0)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/import.sql	2013-06-04 07:01:40 UTC (rev 15539)
@@ -0,0 +1,2 @@
+insert into Message (title, text, read, datetime) values ('Hello World', 'This is an example of a message.', 0, '2006-01-01 11:12:00')
+insert into Message (title, text, read, datetime) values ('Greetings Earthling', 'This is another example of a message.', 0, '2006-02-04 03:04:00')

Added: branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/jboss-deployment-structure.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/jboss-deployment-structure.xml	                        (rev 0)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/jboss-deployment-structure.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -0,0 +1,12 @@
+<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
+  <deployment>
+      <dependencies>
+<!--           <module name="org.apache.log4j" export="true"/> -->
+          <module name="org.dom4j" export="true"/>
+<!--           <module name="org.apache.commons.logging" export="true"/> -->
+<!--           <module name="org.apache.commons.collections" export="true"/> -->
+          <module name="javax.faces.api" export="true"/>
+          <module name="com.sun.jsf-impl" export="true"/>
+        </dependencies>
+  </deployment>  
+</jboss-deployment-structure> 
\ No newline at end of file

Added: branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/persistence.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/persistence.xml	                        (rev 0)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/persistence.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" 
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" 
+             version="2.0">
+	<persistence-unit name="messageDatabase">
+      <provider>org.hibernate.ejb.HibernatePersistence</provider>
+      <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
+      <properties>
+         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+      </properties>
+	</persistence-unit>
+</persistence>

Added: branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/seam.properties
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/seam.properties	                        (rev 0)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/seam.properties	2013-06-04 07:01:40 UTC (rev 15539)
@@ -0,0 +1 @@
+

Copied: branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/web.xml (from rev 15538, branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-integration/web.xml)
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/web.xml	                        (rev 0)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-ejb/src/test/resources/web.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -0,0 +1,12 @@
+<?xml version="1.0" ?>
+
+<web-app version="3.0"
+         xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+         
+    <listener>
+        <listener-class>org.jboss.seam.mock.MockSeamListener</listener-class>
+    </listener>
+
+</web-app>

Deleted: branches/enterprise/WFK-2_1/examples/messages/messages-tests/pom.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-tests/pom.xml	2013-06-04 06:41:09 UTC (rev 15538)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-tests/pom.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <artifactId>messages</artifactId>
-        <groupId>org.jboss.seam.examples</groupId>
-        <version>2.3.1.Final-redhat-2</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    
-    <groupId>org.jboss.seam.examples.messages</groupId>
-    <artifactId>messages-tests</artifactId>
-    <name>Messages Integration Tests Module (EE6)</name>
-    
-    <dependencies>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-        </dependency>   
-        <dependency>
-            <groupId>org.jboss.seam.examples.messages</groupId>
-            <artifactId>messages-ejb</artifactId>
-            <type>ejb</type>
-            <scope>test</scope>
-        </dependency>        
-        <dependency>
-            <groupId>org.jboss.seam</groupId>
-            <artifactId>jboss-seam</artifactId>
-            <type>ejb</type>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.jboss.spec.javax.faces</groupId>
-            <artifactId>jboss-jsf-api_2.1_spec</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.seleniumhq.selenium</groupId>
-            <artifactId>selenium-server</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.seleniumhq.selenium</groupId>
-            <artifactId>selenium-java</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.jboss.seam</groupId>
-            <artifactId>functional-tests</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.jboss.arquillian.junit</groupId>
-            <artifactId>arquillian-junit-container</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.jboss.arquillian.protocol</groupId>
-            <artifactId>arquillian-protocol-servlet</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-        	<groupId>org.jboss.spec.javax.el</groupId>
-        	<artifactId>jboss-el-api_2.2_spec</artifactId>
-        	<scope>provided</scope>
-        </dependency>
-    </dependencies>
-    
-    <build>
-        <testResources>
-            <testResource>
-                <directory>src/test/resources</directory>
-                <filtering>true</filtering>
-            </testResource>
-            <testResource>
-                <directory>src/test/resources-integration</directory>
-            </testResource>
-        </testResources>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-        </plugins>     
-    </build>    
-
-    <profiles>
-        <profile>
-            <id>integration-tests</id>
-            <activation>
-                <property>
-                    <name>arquillian</name>
-                </property>
-            </activation>
-        </profile>
-
-        <profile>
-            <id>arq-jbossas-7-managed</id>
-            <activation>
-                <property>
-                    <name>arquillian</name>
-                    <value>jbossas-managed-7</value>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-dependency-plugin</artifactId>
-                    </plugin>
-                </plugins>
-            </build>            
-        </profile>
-
-        <profile>
-            <id>arq-jbossas-7-remote</id>
-            <activation>
-                <property>
-                    <name>arquillian</name>
-                    <value>jbossas-remote-7</value>
-                </property>
-            </activation>
-        </profile>
-        
-        <profile>
-            <id>ftest-jbossas</id>
-            <properties>
-                <example.context.path>seam-messages</example.context.path>
-            </properties>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>selenium-maven-plugin</artifactId>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>failsafe-maven-plugin</artifactId>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-antrun-plugin</artifactId>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-    
-</project>

Deleted: branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java	2013-06-04 06:41:09 UTC (rev 15538)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java	2013-06-04 07:01:40 UTC (rev 15539)
@@ -1,119 +0,0 @@
-//$Id: MessageListTest.java 2383 2006-10-26 18:53:00Z gavin $
-package org.jboss.seam.example.messages.test;
-import javax.faces.model.DataModel;
-
-import java.io.File;
-
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.importer.ZipImporter;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.container.test.api.OverProtocol;
-import org.jboss.arquillian.junit.Arquillian;
-
-import org.jboss.seam.mock.JUnitSeamTest;
-
-import org.junit.runner.RunWith;
-import org.junit.Test;
-
- at RunWith(Arquillian.class)
-public class MessageListTest extends JUnitSeamTest
-{
-	@Deployment(name="MessageListTest")
-	@OverProtocol("Servlet 3.0") 
-	public static Archive<?> createDeployment()
-	{
-      EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-messages.ear").importFrom(new File("../messages-ear/target/seam-messages.ear"))
-				.as(EnterpriseArchive.class);
-      WebArchive web = er.getAsType(WebArchive.class, "messages-web.war");
-      web.addClasses(MessageListTest.class);
-      
-      // Install org.jboss.seam.mock.MockSeamListener
-      web.delete("/WEB-INF/web.xml");
-      web.addAsWebInfResource("web.xml");
-
-      return er;
-   }
-	
-   @Test
-   public void testMessageList() throws Exception 
-   {
-      new NonFacesRequest()
-      {
-
-         @Override
-         protected void renderResponse() throws Exception {
-            DataModel list = (DataModel) getInstance("messageList");
-            assert list.getRowCount()==2;
-         }
-         
-      }.run();
-
-      new FacesRequest()
-      {
-
-         @Override
-         protected void updateModelValues() throws Exception {
-            DataModel list = (DataModel) getInstance("messageList");
-            assert list.getRowCount()==2;
-            list.setRowIndex(1);
-         }
-         
-         
-         @Override
-         protected void invokeApplication() throws Exception {
-            invokeMethod("#{messageManager.select}");
-         }
-
-
-         @Override
-         protected void renderResponse() throws Exception {
-            DataModel list = (DataModel) getInstance("messageList");
-            assert list.getRowCount()==2;
-            assert getValue("#{message.title}").equals("Hello World");
-            assert getValue("#{message.read}").equals(true);
-         }
-         
-      }.run();
-
-      new FacesRequest()
-      {
-
-         @Override
-         protected void updateModelValues() throws Exception {
-            DataModel list = (DataModel) getInstance("messageList");
-            assert list.getRowCount()==2;
-            list.setRowIndex(0);
-         }
-         
-         
-         @Override
-         protected void invokeApplication() throws Exception {
-            invokeMethod("#{messageManager.delete}");
-         }
-
-
-         @Override
-         protected void renderResponse() throws Exception {
-            DataModel list = (DataModel) getInstance("messageList");
-            assert list.getRowCount()==1;
-         }
-         
-      }.run();
-
-      new NonFacesRequest()
-      {
-
-         @Override
-         protected void renderResponse() throws Exception {
-            DataModel list = (DataModel) getInstance("messageList");
-            assert list.getRowCount()==1;
-         }
-         
-      }.run();
-
-   }
-   
-}

Deleted: branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java	2013-06-04 06:41:09 UTC (rev 15538)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java	2013-06-04 07:01:40 UTC (rev 15539)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.example.messages.test.selenium;
-
-import java.text.MessageFormat;
-
-import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-import static org.testng.AssertJUnit.assertTrue;
-import static org.testng.AssertJUnit.assertFalse;
-import static org.testng.AssertJUnit.assertEquals;
-
-/**
- * Test for messages example
- * @author Jozef Hartinger
- *
- */
-public class MessageTest extends SeamSeleniumTest
-{
-
-   public static final String MESSAGES_URL = "/messages.seam";
-   public static final String MESSAGES_LINK = "messages:{0}:link";
-   public static final String MESSAGES_DELETE = "messages:{0}:delete";
-   public static final String MESSAGES_CHECKBOX = "messages:{0}:read";
-   public static final String MESSAGES_COUNT = "//table[@id='messages']/tbody/tr";
-   public static final String MESSAGE_TITLE = "title";
-   public static final String MESSAGE_TEXT = "text";
-
-   @Override
-   @BeforeMethod
-   public void setUp()
-   {
-      super.setUp();
-      browser.open(CONTEXT_PATH + MESSAGES_URL);
-   }
-
-   @Test(dataProvider = "messages")
-   public void readMessageTest(int i, String title, String text)
-   {
-      browser.clickAndWait(MessageFormat.format(MESSAGES_LINK, i));
-      assertEquals("Unexpected message title displayed.", title, browser.getText(MESSAGE_TITLE));
-      assertEquals("Unexpected message text displayed.", text, browser.getText(MESSAGE_TEXT));
-      assertTrue("Checkbox should be checked after message is read.", browser.isChecked(MessageFormat.format(MESSAGES_CHECKBOX, i)));
-   }
-
-   @Test(dependsOnMethods = {"readMessageTest"}, dataProvider = "messages")
-   public void deleteMessageTest(int i, String title, String name)
-   {
-      int messageCount = browser.getXpathCount(MESSAGES_COUNT).intValue();
-      // delete first message in a table
-      browser.clickAndWait(MessageFormat.format(MESSAGES_DELETE, 0));
-      assertEquals("Unexpected count of messages.", --messageCount, browser.getXpathCount(MESSAGES_COUNT));
-      assertFalse("Message title still present.", browser.isTextPresent(title));
-   }
-
-   @DataProvider(name = "messages")
-   public Object[][] getMessages()
-   {
-      Object[][] messages = { { 0, "Greetings Earthling", "This is another example of a message." }, { 1, "Hello World", "This is an example of a message." } };
-      return messages;
-   }
-}

Deleted: branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-ftest/testng.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-ftest/testng.xml	2013-06-04 06:41:09 UTC (rev 15538)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-ftest/testng.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -1,26 +0,0 @@
-
-	<!--
-		JBoss, Home of Professional Open Source Copyright 2008, Red Hat
-		Middleware LLC, and individual contributors by the @authors tag. See
-		the copyright.txt in the distribution for a full listing of individual
-		contributors. This is free software; you can redistribute it and/or
-		modify it under the terms of the GNU Lesser General Public License as
-		published by the Free Software Foundation; either version 2.1 of the
-		License, or (at your option) any later version. This software is
-		distributed in the hope that it will be useful, but WITHOUT ANY
-		WARRANTY; without even the implied warranty of MERCHANTABILITY or
-		FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-		License for more details. You should have received a copy of the GNU
-		Lesser General Public License along with this software; if not, write
-		to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-		Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-	--> 
-<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
-<suite name="Messages example" verbose="2" parallel="false">
-	<test name="messages_tests">
-		<parameter name="PROPERTY_FILE" value="" />
-		<classes>
-			<class name="org.jboss.seam.example.messages.test.selenium.MessageTest" />
-		</classes>
-	</test>
-</suite>

Deleted: branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-integration/arquillian.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-integration/arquillian.xml	2013-06-04 06:41:09 UTC (rev 15538)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-integration/arquillian.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns="http://jboss.org/schema/arquillian"
-    xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
-
-    <engine>
-        <property name="deploymentExportPath">target/</property>
-    </engine>
-
-    <container qualifier="jboss" default="true">
-        <configuration>
-            <property name="javaVmArguments">-Xmx1024m -XX:MaxPermSize=512m ${jacoco.agent}</property>
-        </configuration>
-    </container>
-
-</arquillian>

Deleted: branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-integration/web.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-integration/web.xml	2013-06-04 06:41:09 UTC (rev 15538)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-tests/src/test/resources-integration/web.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -1,12 +0,0 @@
-<?xml version="1.0" ?>
-
-<web-app version="3.0"
-         xmlns="http://java.sun.com/xml/ns/javaee"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
-         
-    <listener>
-        <listener-class>org.jboss.seam.mock.MockSeamListener</listener-class>
-    </listener>
-
-</web-app>

Modified: branches/enterprise/WFK-2_1/examples/messages/messages-web/pom.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/messages-web/pom.xml	2013-06-04 06:41:09 UTC (rev 15538)
+++ branches/enterprise/WFK-2_1/examples/messages/messages-web/pom.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -62,6 +62,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-war-plugin</artifactId>
+                <version>${version.war.plugin}</version>
                 <configuration>
                     <webResources>
                         <resource>

Modified: branches/enterprise/WFK-2_1/examples/messages/pom.xml
===================================================================
--- branches/enterprise/WFK-2_1/examples/messages/pom.xml	2013-06-04 06:41:09 UTC (rev 15538)
+++ branches/enterprise/WFK-2_1/examples/messages/pom.xml	2013-06-04 07:01:40 UTC (rev 15539)
@@ -1,14 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <parent>
-        <artifactId>examples</artifactId>
-        <groupId>org.jboss.seam</groupId>
-        <version>2.3.1.Final-redhat-2</version>
-    </parent>
-    
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.jboss.seam.examples</groupId>
     <artifactId>messages</artifactId>
+    <version>2.3.1.Final-redhat-2</version>
     <packaging>pom</packaging>
     <name>Messages Example (EE6)</name>
   
@@ -16,12 +11,35 @@
         <module>messages-ejb</module>
         <module>messages-web</module>
         <module>messages-ear</module>
-        <module>messages-tests</module>
     </modules>
     
     <properties>
-        <example.name>messages</example.name>
-    </properties>
+		<example.name>messages</example.name>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<maven.compiler.target>1.6</maven.compiler.target>
+		<maven.compiler.source>1.6</maven.compiler.source>
+
+		<!-- To use jacoco, set jacoco.agent system property to something like 
+			-javaagent:/path/to/jacocoagent.jar=append=true,destfile=/path/to/output/jacoco.exec -->
+		<jacoco.agent />
+
+		<!-- To use custom Maven settings and profiles, uncomment and customize 
+			the following properties. This is necessary for the ShrinkWrap resolver to 
+			function properly. -->
+		<!--<maven.user.settings>/path/to/custom/settings.xml</maven.user.settings> -->
+		<!--<maven.profiles>custom,profile</maven.profiles> -->
+
+		<version.commons.logging>1.1.1</version.commons.logging>
+		<version.shrinkwrap.resolver>2.0.0-beta-4</version.shrinkwrap.resolver>
+
+		<!-- Plugin versions -->
+		<version.dependency.plugin>2.5.1</version.dependency.plugin>
+		<version.surefire.plugin>2.10</version.surefire.plugin>
+		<version.compiler.plugin>2.3.1</version.compiler.plugin>
+		<version.ear.plugin>2.6</version.ear.plugin>
+		<version.war.plugin>2.1.1</version.war.plugin>
+		<version.jboss.maven.plugin>7.4.Final</version.jboss.maven.plugin>
+	</properties>
     
     <dependencyManagement>
         <dependencies>
@@ -31,17 +49,79 @@
                 <version>${project.version}</version>
                 <type>ejb</type>
             </dependency>
+            
             <dependency>
                 <groupId>org.jboss.seam.examples.messages</groupId>
                 <artifactId>messages-web</artifactId>
                 <version>${project.version}</version>
                 <type>war</type>
             </dependency>
+            
             <dependency>
                 <groupId>org.jboss.seam.examples.messages</groupId>
                 <artifactId>messages-ear</artifactId>
                 <version>${project.version}</version>
             </dependency>
+        	
+        	<!-- BOMs -->
+			<dependency>
+				<groupId>org.jboss.shrinkwrap.resolver</groupId>
+				<artifactId>shrinkwrap-resolver-bom</artifactId>
+				<version>${version.shrinkwrap.resolver}</version>
+				<scope>import</scope>
+				<type>pom</type>
+			</dependency>
+
+			<dependency>
+				<groupId>org.jboss.seam</groupId>
+				<artifactId>bom</artifactId>
+				<version>${project.version}</version>
+				<type>pom</type>
+				<scope>import</scope>
+			</dependency>
+
+			<dependency>
+				<groupId>org.jboss.seam</groupId>
+				<artifactId>jboss-seam</artifactId>
+				<version>${project.version}</version>
+				<exclusions>
+					<exclusion>
+						<groupId>org.testng</groupId>
+						<artifactId>testng</artifactId>
+					</exclusion>
+				</exclusions>
+			</dependency>
         </dependencies>
     </dependencyManagement>
+    
+    <build>
+		<pluginManagement>
+			<plugins>
+				<!-- Manage plugin versions for build stability -->
+				<plugin>
+					<artifactId>maven-surefire-plugin</artifactId>
+					<version>${version.surefire.plugin}</version>
+					<configuration>
+						<systemPropertyVariables>
+							<org.apache.maven.user-settings>${maven.user.settings}</org.apache.maven.user-settings>
+							<maven.profiles>${maven.profiles}</maven.profiles>
+						</systemPropertyVariables>
+					</configuration>
+				</plugin>
+				<plugin>
+					<artifactId>maven-dependency-plugin</artifactId>
+					<version>${version.dependency.plugin}</version>
+				</plugin>
+				<plugin>
+					<artifactId>maven-compiler-plugin</artifactId>
+					<version>${version.compiler.plugin}</version>
+					<configuration>
+						<source>${maven.compiler.source}</source>
+						<target>${maven.compiler.target}</target>
+					</configuration>
+				</plugin>
+			</plugins>
+		</pluginManagement>
+	</build>
+    
 </project>



More information about the seam-commits mailing list