[seam-commits] Seam SVN: r14604 - in branches/community/Seam_2_3/examples-ee6: numberguess and 9 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Apr 18 06:42:40 EDT 2012
Author: dhinojosa
Date: 2012-04-18 06:42:39 -0400 (Wed, 18 Apr 2012)
New Revision: 14604
Added:
branches/community/Seam_2_3/examples-ee6/numberguess/
branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-ear/src/main/application/META-INF/
branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-ear/src/main/application/META-INF/jboss-deployment-structure.xml
branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/src/test/java/org/jboss/seam/example/numberguess/test/Deployments.java
branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/src/test/resources-integration/arquillian.xml
Modified:
branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-ear/pom.xml
branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-ejb/pom.xml
branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/src/test/java/org/jboss/seam/example/numberguess/test/NumberGuessTest.java
branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-web/pom.xml
branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-web/src/main/webapp/WEB-INF/web.xml
branches/community/Seam_2_3/examples-ee6/numberguess/pom.xml
branches/community/Seam_2_3/examples-ee6/pom.xml
Log:
added numberguess and migrated most items to ee6/arquillian
Modified: branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples/numberguess/numberguess-ear/pom.xml 2012-04-17 15:20:21 UTC (rev 14602)
+++ branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-ear/pom.xml 2012-04-18 10:42:39 UTC (rev 14604)
@@ -1,31 +1,32 @@
<?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">
+<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>numberguess</artifactId>
- <groupId>org.jboss.seam.examples</groupId>
- <version>2.3.0-SNAPSHOT</version>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
-
- <groupId>org.jboss.seam.examples</groupId>
+
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-ear</artifactId>
<packaging>ear</packaging>
- <name>Numberguess EAR Module</name>
-
+ <name>Numberguess EAR Module (EE6)</name>
+
<properties>
<jboss.home>${env.JBOSS_HOME}</jboss.home>
<jboss.domain>default</jboss.domain>
</properties>
-
+
<dependencies>
<dependency>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-web</artifactId>
<type>war</type>
</dependency>
<dependency>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-ejb</artifactId>
<type>ejb</type>
</dependency>
@@ -33,26 +34,16 @@
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xpp3</groupId>
- <artifactId>xpp3_min</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-jpdl</artifactId>
+ <version>3.2.3</version>
<exclusions>
- <exclusion>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
@@ -72,22 +63,23 @@
<!-- use maven generated application.xml instead -->
<generateApplicationXml>true</generateApplicationXml>
<filtering>true</filtering>
- <jboss>
- <version>4.2</version>
- <loader-repository>seam.jboss.org:loader=seam-numberguess</loader-repository>
- </jboss>
<modules>
<webModule>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-web</artifactId>
<contextRoot>/seam-numberguess</contextRoot>
<bundleFileName>numberguess-web.war</bundleFileName>
</webModule>
<ejbModule>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-ejb</artifactId>
<bundleFileName>numberguess-ejb.jar</bundleFileName>
</ejbModule>
+ <ejbModule>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <bundleFileName>jboss-seam.jar</bundleFileName>
+ </ejbModule>
</modules>
</configuration>
</plugin>
@@ -130,21 +122,27 @@
<artifactId>numberguess-ear</artifactId>
<type>ear</type>
<overWrite>true</overWrite>
- <outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear</outputDirectory>
+ <outputDirectory>
+ ${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear
+ </outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.jboss.seam.examples</groupId>
<artifactId>numberguess-web</artifactId>
<type>war</type>
<overWrite>true</overWrite>
- <outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear/${example.name}-web.war</outputDirectory>
+ <outputDirectory>
+ ${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear/${example.name}-web.war
+ </outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.jboss.seam.examples</groupId>
<artifactId>numberguess-ejb</artifactId>
<type>jar</type>
<overWrite>true</overWrite>
- <outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear/${example.name}-ejb.jar</outputDirectory>
+ <outputDirectory>
+ ${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear/${example.name}-ejb.jar
+ </outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
@@ -158,7 +156,9 @@
<jbossHome>${jboss.home}</jbossHome>
<serverName>${jboss.domain}</serverName>
<fileNames>
- <directory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear</directory>
+ <directory>
+ ${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear
+ </directory>
</fileNames>
</configuration>
</plugin>
Added: branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-ear/src/main/application/META-INF/jboss-deployment-structure.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-ear/src/main/application/META-INF/jboss-deployment-structure.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-ear/src/main/application/META-INF/jboss-deployment-structure.xml 2012-04-18 10:42:39 UTC (rev 14604)
@@ -0,0 +1,15 @@
+<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="org.slf4j" export="true"/>
+ <module name="org.hibernate" export="true"/>
+ <module name="org.hibernate.validator" export="true"/>
+ <module name="javax.faces.api" export="true"/>
+ <module name="com.sun.jsf-impl" export="true"/>
+ </dependencies>
+ </deployment>
+</jboss-deployment-structure>
Modified: branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples/numberguess/numberguess-ejb/pom.xml 2012-04-17 15:20:21 UTC (rev 14602)
+++ branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-ejb/pom.xml 2012-04-18 10:42:39 UTC (rev 14604)
@@ -1,18 +1,19 @@
<?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">
+<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>numberguess</artifactId>
- <groupId>org.jboss.seam.examples</groupId>
- <version>2.3.0-SNAPSHOT</version>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
-
- <groupId>org.jboss.seam.examples</groupId>
+
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-ejb</artifactId>
<packaging>ejb</packaging>
- <name>Numberguess EJB Module</name>
-
+ <name>Numberguess EJB Module (EE6)</name>
+
<build>
<plugins>
<plugin>
@@ -42,42 +43,37 @@
</plugin>
</plugins>
</build>
-
+
<dependencies>
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
- <type>ejb</type>
+ <version>${project.version}</version>
</dependency>
<dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- </dependency>
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-annotations</artifactId>
+ <groupId>org.jboss.spec.javax.servlet</groupId>
+ <artifactId>jboss-servlet-api_3.0_spec</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
+ <groupId>org.jboss.spec.javax.ejb</groupId>
+ <artifactId>jboss-ejb-api_3.1_spec</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
+ <groupId>org.jboss.spec.javax.faces</groupId>
+ <artifactId>jboss-jsf-api_2.0_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>javax.ejb</groupId>
- <artifactId>ejb-api</artifactId>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <scope>provided</scope>
</dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </dependency>
</dependencies>
-
</project>
Modified: branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples/numberguess/numberguess-tests/pom.xml 2012-04-17 15:20:21 UTC (rev 14602)
+++ branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/pom.xml 2012-04-18 10:42:39 UTC (rev 14604)
@@ -1,67 +1,52 @@
<?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">
+<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>numberguess</artifactId>
- <groupId>org.jboss.seam.examples</groupId>
- <version>2.3.0-SNAPSHOT</version>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
-
- <groupId>org.jboss.seam.examples</groupId>
+
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-tests</artifactId>
- <name>Numberguess Integration Tests Module</name>
-
+ <name>Numberguess Integration Tests Module (EE6)</name>
+
<dependencies>
<dependency>
- <groupId>org.jboss.embedded</groupId>
- <artifactId>jboss-embedded-all</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-deployers-client-spi</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-deployers-core-spi</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.embedded</groupId>
- <artifactId>thirdparty-all</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.embedded</groupId>
- <artifactId>hibernate-all</artifactId>
- </dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <classifier>jdk15</classifier>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-ejb</artifactId>
+ <version>${project.version}</version>
<type>ejb</type>
<scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
+ <version>${project.version}</version>
<type>ejb</type>
<scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
</dependency>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.faces</groupId>
+ <artifactId>jboss-jsf-api_2.0_spec</artifactId>
+ </dependency>
+ <dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</dependency>
@@ -74,24 +59,67 @@
<groupId>org.seleniumhq.selenium.client-drivers</groupId>
<artifactId>selenium-java-client-driver</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.seam</groupId>
<artifactId>functional-tests</artifactId>
- <scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.spec.javax.el</groupId>
+ <artifactId>jboss-el-api_2.2_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-jpdl</artifactId>
+ <version>3.2.3</version>
<scope>test</scope>
<exclusions>
- <exclusion>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
-
+
<build>
<testResources>
<testResource>
@@ -107,8 +135,8 @@
<filtering>true</filtering>
</testResource>
<testResource> <!-- this takes themes aka *.properties -->
- <directory>${basedir}/../numberguess-web/src/main/resources</directory>
- <filtering>true</filtering>
+ <directory>${basedir}/../numberguess-web/src/main/resources</directory>
+ <filtering>true</filtering>
</testResource>
</testResources>
<plugins>
@@ -117,14 +145,16 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>false</skipTests>
- <argLine>-Dsun.lang.ClassLoader.allowArraySyntax=true -Xms512m -Xmx512m</argLine>
+ <argLine>-Dsun.lang.ClassLoader.allowArraySyntax=true -Xms512m -Xmx512m</argLine>
<additionalClasspathElements>
- <additionalClasspathElement>${basedir}/../numberguess-web/src/main/webapp</additionalClasspathElement>
- <additionalClasspathElement>${project.build.directory}/dependency/bootstrap</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/../numberguess-web/src/main/webapp
+ </additionalClasspathElement>
+ <additionalClasspathElement>${project.build.directory}/dependency/bootstrap
+ </additionalClasspathElement>
</additionalClasspathElements>
- <suiteXmlFiles>
- <suiteXmlFile>src/test/resources-integration/testng.xml</suiteXmlFile>
- </suiteXmlFiles>
+ <!--<suiteXmlFiles>-->
+ <!--<suiteXmlFile>src/test/resources-integration/testng.xml</suiteXmlFile>-->
+ <!--</suiteXmlFiles>-->
</configuration>
</plugin>
<plugin>
@@ -132,28 +162,28 @@
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
- <id>copy-seam-bootstrap</id>
- <phase>process-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <includes>bootstrap/**</includes>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-embedded-bootstrap</artifactId>
- <version>${project.version}</version>
- <type>jar</type>
- <overWrite>false</overWrite>
- </artifactItem>
- </artifactItems>
- </configuration>
+ <id>copy-seam-bootstrap</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <includes>bootstrap/**</includes>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-embedded-bootstrap</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ <overWrite>false</overWrite>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
</execution>
</executions>
</plugin>
- </plugins>
- </build>
+ </plugins>
+ </build>
<profiles>
<profile>
@@ -212,5 +242,5 @@
</build>
</profile>
</profiles>
-
+
</project>
Added: branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/src/test/java/org/jboss/seam/example/numberguess/test/Deployments.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/src/test/java/org/jboss/seam/example/numberguess/test/Deployments.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/src/test/java/org/jboss/seam/example/numberguess/test/Deployments.java 2012-04-18 10:42:39 UTC (rev 14604)
@@ -0,0 +1,22 @@
+package org.jboss.seam.example.numberguess.test;
+
+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 java.io.File;
+
+public class Deployments {
+ public static EnterpriseArchive numberGuessDeployment() {
+ EnterpriseArchive ear = ShrinkWrap.create(ZipImporter.class, "seam-numberguess.ear").importFrom(new File("../icefaces-ear/target/seam-icefaces.ear"))
+ .as(EnterpriseArchive.class);
+
+ // Install org.jboss.seam.mock.MockSeamListener
+ WebArchive web = ear.getAsType(WebArchive.class, "numberguess-web.war");
+ web.delete("/WEB-INF/web.xml");
+ web.addAsWebInfResource("web.xml");
+
+ return ear;
+ }
+}
Modified: branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/src/test/java/org/jboss/seam/example/numberguess/test/NumberGuessTest.java
===================================================================
--- branches/community/Seam_2_3/examples/numberguess/numberguess-tests/src/test/java/org/jboss/seam/example/numberguess/test/NumberGuessTest.java 2012-04-17 15:20:21 UTC (rev 14602)
+++ branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/src/test/java/org/jboss/seam/example/numberguess/test/NumberGuessTest.java 2012-04-18 10:42:39 UTC (rev 14604)
@@ -1,251 +1,253 @@
//$Id: NumberGuessTest.java 5335 2007-06-20 09:07:34Z gavin $
package org.jboss.seam.example.numberguess.test;
+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.core.Manager;
+import org.jboss.seam.example.numberguess.NumberGuess;
+import org.jboss.seam.mock.JUnitSeamTest;
import org.jboss.seam.pageflow.Pageflow;
-import org.jboss.seam.example.numberguess.NumberGuess;
-import org.jboss.seam.mock.SeamTest;
-import org.testng.annotations.Test;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
-public class NumberGuessTest extends SeamTest
-{
-
- private int guess;
-
- @Test
- public void testNumberGuessWin() throws Exception
- {
- String id = new NonFacesRequest("/numberGuess.jspx")
- {
+ at RunWith(Arquillian.class)
+public class NumberGuessTest extends JUnitSeamTest {
- @Override
- protected void renderResponse() throws Exception {
- NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
- assert ng.getMaxGuesses()==10;
- assert ng.getBiggest()==100;
- assert ng.getSmallest()==1;
- assert ng.getCurrentGuess()==null;
- assert ng.getGuessCount()==0;
- assert Manager.instance().isLongRunningConversation();
- assert Pageflow.instance().getProcessInstance().getRootToken()
- .getNode().getName().equals("displayGuess");
- }
-
- }.run();
+ private int guess;
- String id2 = new FacesRequest("/numberGuess.jspx", id)
- {
+ @Deployment(name = "NumberGuessTest")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment() {
+ EnterpriseArchive er = Deployments.numberGuessDeployment();
+ WebArchive web = er.getAsType(WebArchive.class, "<project>-web.war");
- @Override
- protected void applyRequestValues() throws Exception {
- NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
- guess = ng.getRandomNumber() > 50 ? 25 : 75;
- ng.setCurrentGuess(guess);
- }
+ web.addClasses(NumberGuessTest.class);
- @Override
- protected void invokeApplication() throws Exception {
- setOutcome("guess");
- //ng.guess();
- }
-
- @Override
- protected void afterRequest() {
- assert !isRenderResponseBegun();
- assert getViewId().equals("/numberGuess.jspx");
- }
-
- }.run();
-
- assert id2.equals(id);
-
- new NonFacesRequest("/numberGuess.jspx", id)
- {
-
- @Override
- protected void renderResponse() throws Exception {
- NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
- assert ng.getMaxGuesses()==10;
- assert ( guess > ng.getRandomNumber() && ng.getBiggest()==guess-1 )
- || ( guess < ng.getRandomNumber() && ng.getSmallest()==guess+1 );
- assert !ng.isCorrectGuess();
- assert !ng.isLastGuess();
- assert ng.getCurrentGuess()==guess;
- assert ng.getGuessCount()==1;
- assert ng.getRemainingGuesses()==9;
- assert Manager.instance().isLongRunningConversation();
- assert Pageflow.instance().getProcessInstance().getRootToken()
- .getNode().getName().equals("displayGuess");
- }
-
- }.run();
+ return er;
+ }
- id2 = new FacesRequest("/numberGuess.jspx", id)
- {
+ @Test
+ public void testNumberGuessWin() throws Exception {
+ String id = new NonFacesRequest("/numberGuess.jspx") {
- @Override
- protected void applyRequestValues() throws Exception {
- NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
- ng.setCurrentGuess( ng.getRandomNumber() );
- }
+ @Override
+ protected void renderResponse() throws Exception {
+ NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
+ assert ng.getMaxGuesses() == 10;
+ assert ng.getBiggest() == 100;
+ assert ng.getSmallest() == 1;
+ assert ng.getCurrentGuess() == null;
+ assert ng.getGuessCount() == 0;
+ assert Manager.instance().isLongRunningConversation();
+ assert Pageflow.instance().getProcessInstance().getRootToken()
+ .getNode().getName().equals("displayGuess");
+ }
- @Override
- protected void invokeApplication() throws Exception {
- setOutcome("guess");
- //ng.guess();
- }
-
- @Override
- protected void afterRequest()
- {
- assert !isRenderResponseBegun();
- assert getViewId().equals("/win.jspx");
- }
-
- }.run();
-
- assert id2.equals(id);
-
- new NonFacesRequest("/win.jspx", id)
- {
- @Override
- protected void renderResponse() throws Exception {
- NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
- assert ng.getMaxGuesses()==10;
- assert ng.isCorrectGuess();
- assert ng.getCurrentGuess()==ng.getRandomNumber();
- assert ng.getGuessCount()==2;
- assert !Manager.instance().isLongRunningConversation();
- assert Pageflow.instance().getProcessInstance().getRootToken()
- .getNode().getName().equals("win");
- }
-
- }.run();
+ }.run();
- }
-
- @Test
- public void testNumberGuessLose() throws Exception
- {
- String id = new NonFacesRequest("/numberGuess.jspx")
- {
+ String id2 = new FacesRequest("/numberGuess.jspx", id) {
- @Override
- protected void renderResponse() throws Exception {
- NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
- assert ng.getMaxGuesses()==10;
- assert ng.getBiggest()==100;
- assert ng.getSmallest()==1;
- assert ng.getCurrentGuess()==null;
- assert ng.getGuessCount()==0;
- assert Manager.instance().isLongRunningConversation();
- }
-
- }.run();
-
- for (int i=1; i<=9; i++)
- {
-
- final int count = i;
+ @Override
+ protected void applyRequestValues() throws Exception {
+ NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
+ guess = ng.getRandomNumber() > 50 ? 25 : 75;
+ ng.setCurrentGuess(guess);
+ }
- new FacesRequest("/numberGuess.jspx", id)
- {
-
@Override
+ protected void invokeApplication() throws Exception {
+ setOutcome("guess");
+ //ng.guess();
+ }
+
+ @Override
+ protected void afterRequest() {
+ assert !isRenderResponseBegun();
+ assert getViewId().equals("/numberGuess.jspx");
+ }
+
+ }.run();
+
+ assert id2.equals(id);
+
+ new NonFacesRequest("/numberGuess.jspx", id) {
+
+ @Override
+ protected void renderResponse() throws Exception {
+ NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
+ assert ng.getMaxGuesses() == 10;
+ assert (guess > ng.getRandomNumber() && ng.getBiggest() == guess - 1)
+ || (guess < ng.getRandomNumber() && ng.getSmallest() == guess + 1);
+ assert !ng.isCorrectGuess();
+ assert !ng.isLastGuess();
+ assert ng.getCurrentGuess() == guess;
+ assert ng.getGuessCount() == 1;
+ assert ng.getRemainingGuesses() == 9;
+ assert Manager.instance().isLongRunningConversation();
+ assert Pageflow.instance().getProcessInstance().getRootToken()
+ .getNode().getName().equals("displayGuess");
+ }
+
+ }.run();
+
+ id2 = new FacesRequest("/numberGuess.jspx", id) {
+
+ @Override
protected void applyRequestValues() throws Exception {
- NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
- guess = ng.getRandomNumber() > 50 ? 25+count : 75-count;
- ng.setCurrentGuess(guess);
+ NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
+ ng.setCurrentGuess(ng.getRandomNumber());
}
-
+
@Override
protected void invokeApplication() throws Exception {
- setOutcome("guess");
- //ng.guess();
- //assert Pageflow.instance().getProcessInstance().getRootToken()
-// .getNode().getName().equals("displayGuess");
+ setOutcome("guess");
+ //ng.guess();
}
-
+
@Override
- protected void afterRequest()
- {
- assert !isRenderResponseBegun();
- assert getViewId().equals("/numberGuess.jspx");
+ protected void afterRequest() {
+ assert !isRenderResponseBegun();
+ assert getViewId().equals("/win.jspx");
}
-
- }.run();
-
- new NonFacesRequest("/numberGuess.jspx", id)
- {
-
+
+ }.run();
+
+ assert id2.equals(id);
+
+ new NonFacesRequest("/win.jspx", id) {
@Override
protected void renderResponse() throws Exception {
- NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
- assert ng.getMaxGuesses()==10;
- assert ( guess > ng.getRandomNumber() && ng.getBiggest()==guess-1 )
- || ( guess < ng.getRandomNumber() && ng.getSmallest()==guess+1 );
- assert !ng.isCorrectGuess();
- assert !ng.isLastGuess();
- assert ng.getCurrentGuess()==guess;
- assert ng.getGuessCount()==count;
- assert ng.getRemainingGuesses()==10-count;
- assert Manager.instance().isLongRunningConversation();
- assert Pageflow.instance().getProcessInstance().getRootToken()
- .getNode().getName().equals("displayGuess");
+ NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
+ assert ng.getMaxGuesses() == 10;
+ assert ng.isCorrectGuess();
+ assert ng.getCurrentGuess() == ng.getRandomNumber();
+ assert ng.getGuessCount() == 2;
+ assert !Manager.instance().isLongRunningConversation();
+ assert Pageflow.instance().getProcessInstance().getRootToken()
+ .getNode().getName().equals("win");
}
-
- }.run();
-
- }
- new FacesRequest("/numberGuess.jspx", id)
- {
+ }.run();
- @Override
- protected void applyRequestValues() throws Exception {
- NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
- guess = ng.getRandomNumber() > 50 ? 49 : 51;
- ng.setCurrentGuess(guess);
- }
+ }
- @Override
- protected void invokeApplication() throws Exception {
- setOutcome("guess");
- //ng.guess();
- assert Pageflow.instance().getProcessInstance().getRootToken()
- .getNode().getName().equals("displayGuess");
- }
+ @Test
+ public void testNumberGuessLose() throws Exception {
+ String id = new NonFacesRequest("/numberGuess.jspx") {
- @Override
- protected void afterRequest()
- {
- assert !isRenderResponseBegun();
- assert getViewId().equals("/lose.jspx");
- }
-
- }.run();
+ @Override
+ protected void renderResponse() throws Exception {
+ NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
+ assert ng.getMaxGuesses() == 10;
+ assert ng.getBiggest() == 100;
+ assert ng.getSmallest() == 1;
+ assert ng.getCurrentGuess() == null;
+ assert ng.getGuessCount() == 0;
+ assert Manager.instance().isLongRunningConversation();
+ }
- new NonFacesRequest("/lose.jspx", id)
- {
+ }.run();
- @Override
- protected void renderResponse() throws Exception {
- NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
- assert ng.getMaxGuesses()==10;
- assert ( guess > ng.getRandomNumber() && ng.getBiggest()==guess-1 )
- || ( guess < ng.getRandomNumber() && ng.getSmallest()==guess+1 );
- assert !ng.isCorrectGuess();
- assert ng.isLastGuess();
- assert ng.getCurrentGuess()==guess;
- assert ng.getGuessCount()==10;
- assert ng.getRemainingGuesses()==0;
- assert !Manager.instance().isLongRunningConversation();
- assert Pageflow.instance().getProcessInstance().getRootToken()
- .getNode().getName().equals("lose");
- }
-
- }.run();
+ for (int i = 1; i <= 9; i++) {
- }
-
+ final int count = i;
+
+ new FacesRequest("/numberGuess.jspx", id) {
+
+ @Override
+ protected void applyRequestValues() throws Exception {
+ NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
+ guess = ng.getRandomNumber() > 50 ? 25 + count : 75 - count;
+ ng.setCurrentGuess(guess);
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception {
+ setOutcome("guess");
+ //ng.guess();
+ //assert Pageflow.instance().getProcessInstance().getRootToken()
+// .getNode().getName().equals("displayGuess");
+ }
+
+ @Override
+ protected void afterRequest() {
+ assert !isRenderResponseBegun();
+ assert getViewId().equals("/numberGuess.jspx");
+ }
+
+ }.run();
+
+ new NonFacesRequest("/numberGuess.jspx", id) {
+
+ @Override
+ protected void renderResponse() throws Exception {
+ NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
+ assert ng.getMaxGuesses() == 10;
+ assert (guess > ng.getRandomNumber() && ng.getBiggest() == guess - 1)
+ || (guess < ng.getRandomNumber() && ng.getSmallest() == guess + 1);
+ assert !ng.isCorrectGuess();
+ assert !ng.isLastGuess();
+ assert ng.getCurrentGuess() == guess;
+ assert ng.getGuessCount() == count;
+ assert ng.getRemainingGuesses() == 10 - count;
+ assert Manager.instance().isLongRunningConversation();
+ assert Pageflow.instance().getProcessInstance().getRootToken()
+ .getNode().getName().equals("displayGuess");
+ }
+
+ }.run();
+
+ }
+
+ new FacesRequest("/numberGuess.jspx", id) {
+
+ @Override
+ protected void applyRequestValues() throws Exception {
+ NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
+ guess = ng.getRandomNumber() > 50 ? 49 : 51;
+ ng.setCurrentGuess(guess);
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception {
+ setOutcome("guess");
+ //ng.guess();
+ assert Pageflow.instance().getProcessInstance().getRootToken()
+ .getNode().getName().equals("displayGuess");
+ }
+
+ @Override
+ protected void afterRequest() {
+ assert !isRenderResponseBegun();
+ assert getViewId().equals("/lose.jspx");
+ }
+
+ }.run();
+
+ new NonFacesRequest("/lose.jspx", id) {
+
+ @Override
+ protected void renderResponse() throws Exception {
+ NumberGuess ng = (NumberGuess) getInstance(NumberGuess.class);
+ assert ng.getMaxGuesses() == 10;
+ assert (guess > ng.getRandomNumber() && ng.getBiggest() == guess - 1)
+ || (guess < ng.getRandomNumber() && ng.getSmallest() == guess + 1);
+ assert !ng.isCorrectGuess();
+ assert ng.isLastGuess();
+ assert ng.getCurrentGuess() == guess;
+ assert ng.getGuessCount() == 10;
+ assert ng.getRemainingGuesses() == 0;
+ assert !Manager.instance().isLongRunningConversation();
+ assert Pageflow.instance().getProcessInstance().getRootToken()
+ .getNode().getName().equals("lose");
+ }
+
+ }.run();
+
+ }
+
}
Added: branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/src/test/resources-integration/arquillian.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/src/test/resources-integration/arquillian.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-tests/src/test/resources-integration/arquillian.xml 2012-04-18 10:42:39 UTC (rev 14604)
@@ -0,0 +1,16 @@
+<?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</property>
+ <property name="jbossHome">target/jboss-as-${version.jbossas7}</property>
+ </configuration>
+ </container>
+</arquillian>
\ No newline at end of file
Modified: branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples/numberguess/numberguess-web/pom.xml 2012-04-17 15:20:21 UTC (rev 14602)
+++ branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-web/pom.xml 2012-04-18 10:42:39 UTC (rev 14604)
@@ -3,19 +3,19 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>numberguess</artifactId>
- <groupId>org.jboss.seam.examples</groupId>
- <version>2.3.0-SNAPSHOT</version>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-web</artifactId>
<packaging>war</packaging>
- <name>Numberguess Web Module</name>
+ <name>Numberguess Web Module (EE6)</name>
<dependencies>
<dependency>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-ejb</artifactId>
<type>ejb</type>
<scope>provided</scope>
@@ -83,16 +83,6 @@
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
<scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xpp3</groupId>
- <artifactId>xpp3_min</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
Modified: branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/Seam_2_3/examples/numberguess/numberguess-web/src/main/webapp/WEB-INF/web.xml 2012-04-17 15:20:21 UTC (rev 14602)
+++ branches/community/Seam_2_3/examples-ee6/numberguess/numberguess-web/src/main/webapp/WEB-INF/web.xml 2012-04-18 10:42:39 UTC (rev 14604)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app version="2.5"
+<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_2_5.xsd">
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<!-- Seam -->
Modified: branches/community/Seam_2_3/examples-ee6/numberguess/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples/numberguess/pom.xml 2012-04-17 15:20:21 UTC (rev 14602)
+++ branches/community/Seam_2_3/examples-ee6/numberguess/pom.xml 2012-04-18 10:42:39 UTC (rev 14604)
@@ -1,15 +1,15 @@
<?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>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess</artifactId>
<parent>
<groupId>org.jboss.seam</groupId>
- <artifactId>examples</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <artifactId>examples-ee6</artifactId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
</parent>
<packaging>pom</packaging>
- <name>Numberguess Example</name>
+ <name>Numberguess Example (EE6)</name>
<properties>
<example.name>numberguess</example.name>
@@ -25,19 +25,19 @@
<dependencyManagement>
<dependencies>
<dependency>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-ejb</artifactId>
<version>${project.version}</version>
<type>ejb</type>
</dependency>
<dependency>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-web</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>numberguess-ear</artifactId>
<version>${project.version}</version>
</dependency>
Modified: branches/community/Seam_2_3/examples-ee6/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/pom.xml 2012-04-18 08:48:30 UTC (rev 14603)
+++ branches/community/Seam_2_3/examples-ee6/pom.xml 2012-04-18 10:42:39 UTC (rev 14604)
@@ -102,8 +102,8 @@
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
+ <version>${project.version}</version>
<type>ejb</type>
- <version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
More information about the seam-commits
mailing list