Seam SVN: r14883 - in branches/enterprise/WFK-2_0: examples-ee6/guice and 15 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-06-09 14:48:05 -0400 (Sat, 09 Jun 2012)
New Revision: 14883
Removed:
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ear/pom.xml
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ear/src/main/application/META-INF/jboss-deployment-structure.xml
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/pom.xml
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/AppleJuice.java
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/Juice.java
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/JuiceBar.java
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/JuiceBarModule.java
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/Orange.java
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/OrangeJuice.java
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/resources/seam.properties
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/pom.xml
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/java/org/jboss/seam/example/guice/test/GuiceTest.java
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/java/org/jboss/seam/example/guice/test/JuiceTestBar.java
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/java/org/jboss/seam/example/guice/test/selenium/GuiceTest.java
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/resources-ftest/testng.xml
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/resources-integration/arquillian.xml
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/resources-integration/web.xml
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/pom.xml
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/WEB-INF/components.xml
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/WEB-INF/faces-config.xml
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/WEB-INF/web.xml
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/bar.xhtml
branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/index.html
branches/enterprise/WFK-2_0/examples-ee6/guice/pom.xml
branches/enterprise/WFK-2_0/examples-ee6/guice/readme.txt
branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/Guice.java
branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/GuiceInit.java
branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/GuiceInterceptor.java
branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/Injector.java
branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/package-info.java
Modified:
branches/enterprise/WFK-2_0/examples-ee6/pom.xml
branches/enterprise/WFK-2_0/jboss-seam-ioc/pom.xml
Log:
bz #830142 removed guice example and guice from ioc module
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ear/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ear/pom.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ear/pom.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,76 +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>guice</artifactId>
- <groupId>org.jboss.seam.examples-ee6</groupId>
- <version>2.3.0.Beta2-redhat-1</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-ear</artifactId>
- <packaging>ear</packaging>
- <name>Guice EAR Module (EE6)</name>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-web</artifactId>
- <type>war</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-ejb</artifactId>
- <type>ejb</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <type>ejb</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-ioc</artifactId>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>seam-guice</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-ear-plugin</artifactId>
- <configuration>
- <version>6</version>
- <defaultLibBundleDir>lib</defaultLibBundleDir>
- <!-- Exclude eclipse generated application.xml and manually modified jboss-app.xml during mvn build -->
- <earSourceExcludes>**/application.xml, **/jboss-app.xml</earSourceExcludes>
- <!-- use maven generated application.xml instead -->
- <generateApplicationXml>true</generateApplicationXml>
- <modules>
- <webModule>
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-web</artifactId>
- <contextRoot>/seam-guice</contextRoot>
- <bundleFileName>guice-web.war</bundleFileName>
- </webModule>
- <ejbModule>
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-ejb</artifactId>
- <bundleFileName>guice-ejb.jar</bundleFileName>
- </ejbModule>
- <ejbModule>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <bundleFileName>jboss-seam.jar</bundleFileName>
- </ejbModule>
- </modules>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ear/src/main/application/META-INF/jboss-deployment-structure.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ear/src/main/application/META-INF/jboss-deployment-structure.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ear/src/main/application/META-INF/jboss-deployment-structure.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,13 +0,0 @@
-<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
- <deployment>
- <dependencies>
- <module name="org.javassist" export="true"/>
- <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>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/pom.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/pom.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,45 +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>guice</artifactId>
- <groupId>org.jboss.seam.examples-ee6</groupId>
- <version>2.3.0.Beta2-redhat-1</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-ejb</artifactId>
- <packaging>ejb</packaging>
- <name>Guice EJB Module (EE6)</name>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <type>ejb</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-ioc</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec.javax.ejb</groupId>
- <artifactId>jboss-ejb-api_3.1_spec</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.guice</groupId>
- <artifactId>guice</artifactId>
- </dependency>
- </dependencies>
-</project>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/AppleJuice.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/AppleJuice.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/AppleJuice.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,28 +0,0 @@
-package org.jboss.seam.example.guice;
-
-/**
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- */
-public class AppleJuice implements Juice
-{
- private static final String name = "Apple Juice";
- private static final int price = 10;
-
- public AppleJuice() {}
-
- public String getName()
- {
- return name;
- }
-
- public int getPrice()
- {
- return price;
- }
-
- @Override
- public String toString()
- {
- return name;
- }
-}
\ No newline at end of file
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/Juice.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/Juice.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/Juice.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,11 +0,0 @@
-package org.jboss.seam.example.guice;
-
-/**
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- */
-public interface Juice
-{
- public String getName();
-
- public int getPrice();
-}
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/JuiceBar.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/JuiceBar.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/JuiceBar.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,26 +0,0 @@
-package org.jboss.seam.example.guice;
-
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.ioc.guice.Guice;
-import com.google.inject.Inject;
-
-/**
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- */
-@Name("juiceBar")
-@Guice // Activates @Inject on a Seam component
-public class JuiceBar
-{
- @Inject protected Juice juiceOfTheDay; // Guice looks at the variable type, not name
- @Inject @Orange protected Juice anotherJuice;
-
- public Juice getJuiceOfTheDay()
- {
- return juiceOfTheDay;
- }
-
- public Juice getAnotherJuice()
- {
- return anotherJuice;
- }
-}
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/JuiceBarModule.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/JuiceBarModule.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/JuiceBarModule.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,18 +0,0 @@
-package org.jboss.seam.example.guice;
-
-import com.google.inject.Module;
-import com.google.inject.Binder;
-import com.google.inject.Scopes;
-
-/**
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- */
-public class JuiceBarModule implements Module
-{
- public void configure(Binder binder)
- {
- binder.bind(Juice.class).to(AppleJuice.class); // Create a new instance every time.
-
- binder.bind(Juice.class).annotatedWith(Orange.class).to(OrangeJuice.class).in(Scopes.SINGLETON);
- }
-}
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/Orange.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/Orange.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/Orange.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,20 +0,0 @@
-package org.jboss.seam.example.guice;
-
-import com.google.inject.BindingAnnotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.ElementType;
-
-/**
- * Indicates we want the orange version of a binding.
- *
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- */
-(a)Retention(RetentionPolicy.RUNTIME)
-(a)Target({ElementType.FIELD, ElementType.PARAMETER})
-@BindingAnnotation
-public @interface Orange
-{
-}
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/OrangeJuice.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/OrangeJuice.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/java/org/jboss/seam/example/guice/OrangeJuice.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,28 +0,0 @@
-package org.jboss.seam.example.guice;
-
-/**
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- */
-public class OrangeJuice implements Juice
-{
- private static final String name = "Orange Juice";
- private static final int price = 12;
-
- public OrangeJuice() {}
-
- public String getName()
- {
- return name;
- }
-
- public int getPrice()
- {
- return price;
- }
-
- @Override
- public String toString()
- {
- return name + " (" + price + " cents)";
- }
-}
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-ejb/src/main/resources/seam.properties
===================================================================
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/pom.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/pom.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,156 +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>guice</artifactId>
- <groupId>org.jboss.seam.examples-ee6</groupId>
- <version>2.3.0.Beta2-redhat-1</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-tests</artifactId>
- <name>Guice Integration Tests Module (EE6)</name>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-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>
- </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-guice</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_0/examples-ee6/guice/guice-tests/src/test/java/org/jboss/seam/example/guice/test/GuiceTest.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/java/org/jboss/seam/example/guice/test/GuiceTest.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/java/org/jboss/seam/example/guice/test/GuiceTest.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,116 +0,0 @@
-package org.jboss.seam.example.guice.test;
-
-import java.io.File;
-
-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.example.guice.JuiceBar;
-import org.jboss.seam.example.guice.Juice;
-import org.jboss.seam.example.guice.AppleJuice;
-import org.jboss.seam.example.guice.Orange;
-import org.jboss.seam.example.guice.OrangeJuice;
-import org.jboss.seam.mock.JUnitSeamTest;
-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.JavaArchive;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import com.google.inject.Injector;
-import com.google.inject.Key;
-
-/**
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- */
-(a)RunWith(Arquillian.class)
-public class GuiceTest extends JUnitSeamTest
-{
- @Deployment(name="GuiceTest")
- @OverProtocol("Servlet 3.0")
- public static Archive<?> createDeployment()
- {
- EnterpriseArchive ear = ShrinkWrap.create(ZipImporter.class, "seam-guice.ear").importFrom(new File("../guice-ear/target/seam-guice.ear"))
- .as(EnterpriseArchive.class);
-
- // Install org.jboss.seam.mock.MockSeamListener
- WebArchive web = ear.getAsType(WebArchive.class, "guice-web.war");
- web.delete("/WEB-INF/web.xml");
- web.addAsWebInfResource("web.xml");
-
- web.addClasses(GuiceTest.class);
-
- JavaArchive ejb = ear.getAsType(JavaArchive.class, "guice-ejb.jar");
- ejb.addClasses(JuiceTestBar.class);
-
- return ear;
- }
-
- @Test
- public void testGuiceInjector() throws Exception
- {
- new ComponentTest()
- {
- @Override
- protected void testComponents() throws Exception
- {
- Injector injector = (Injector) getInstance("guiceExampleInjector");
-
- Object juiceInstance = injector.getInstance(Juice.class);
- assert juiceInstance instanceof AppleJuice : juiceInstance;
-
- Object orangeInstance = injector.getInstance(Key.get(Juice.class, Orange.class));
- assert orangeInstance instanceof OrangeJuice : orangeInstance;
- }
- }.run();
- }
-
- @Test
- public void testGuiceIntegration() throws Exception
- {
- new ComponentTest()
- {
- @Override
- protected void testComponents() throws Exception
- {
- JuiceBar juiceBar = (JuiceBar) getInstance("juiceBar");
-
- Juice juiceOfTheDay = juiceBar.getJuiceOfTheDay();
- assert "Apple Juice".equals(juiceOfTheDay.getName()) : juiceOfTheDay.getName();
- Juice anotherJuice = juiceBar.getAnotherJuice();
- assert "Orange Juice".equals(anotherJuice.getName()) : anotherJuice.getName();
-
- Juice juiceOfTheDay2 = juiceBar.getJuiceOfTheDay();
- assert juiceOfTheDay != juiceOfTheDay2 : "A new instance should be created by Guice.";
- Juice anotherJuice2 = juiceBar.getAnotherJuice();
- assert anotherJuice == anotherJuice2 : "Different instances returned for the singleton object.";
- }
- }.run();
- }
-
- @Test
- public void testGuiceDisinjection() throws Exception
- {
- new ComponentTest()
- {
- @Override
- protected void testComponents() throws Exception
- {
- JuiceTestBar juiceBar = (JuiceTestBar) getInstance("juiceTestBar");
- juiceBar.getJuiceOfTheDay(); // Call a method to trigger Guice injection
-
- assert juiceBar.getJuiceOfTheDay() != null;
- assert juiceBar.getAnotherJuice() != null;
-
- // Reflection to obtain the field value would not work here due to the proxy
- assert juiceBar.getJuiceOfTheDayBypassInterceptors() == null
- : "Value injected by Guice was not cleared after the call";
- assert juiceBar.getAnotherJuiceBypassInterceptors() == null
- : "Value injected by Guice was not cleared after the call";
- }
- }.run();
- }
-}
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/java/org/jboss/seam/example/guice/test/JuiceTestBar.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/java/org/jboss/seam/example/guice/test/JuiceTestBar.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/java/org/jboss/seam/example/guice/test/JuiceTestBar.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,29 +0,0 @@
-package org.jboss.seam.example.guice.test;
-
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.example.guice.JuiceBar;
-import org.jboss.seam.example.guice.Juice;
-import org.jboss.seam.ioc.guice.Guice;
-
-/**
- * A component used by the disinjection test to obtain the values of the fields after the proxied call.
- *
- * @author Pawel Wrzeszcz (pawel . wrzeszcz [at] gmail . com)
- */
-@Name("juiceTestBar")
-@Guice
-public class JuiceTestBar extends JuiceBar
-{
- @BypassInterceptors
- public Juice getJuiceOfTheDayBypassInterceptors()
- {
- return juiceOfTheDay;
- }
-
- @BypassInterceptors
- public Juice getAnotherJuiceBypassInterceptors()
- {
- return anotherJuice;
- }
-}
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/java/org/jboss/seam/example/guice/test/selenium/GuiceTest.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/java/org/jboss/seam/example/guice/test/selenium/GuiceTest.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/java/org/jboss/seam/example/guice/test/selenium/GuiceTest.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,58 +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.guice.test.selenium;
-
-import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import static org.testng.AssertJUnit.assertTrue;
-
- /*
- * @author Martin Gencur
- *
- */
-public class GuiceTest extends SeamSeleniumTest
-{
- protected static final String BAR_URL = "/bar.seam";
- protected static final String JUICE_OF_THE_DAY = "Apple Juice* - 10 cents";
- protected static final String ANOTHER_JUICE = "Orange Juice - 12 cents";
- protected static final String GUICE_TITLE = "Juice Bar";
-
- @Override
- @BeforeMethod
- public void setUp()
- {
- super.setUp();
- browser.open(CONTEXT_PATH + BAR_URL);
- }
-
- @Test
- public void simplePageContentTest()
- {
- assertTrue("Home page of Guice Example expected", browser.getLocation().contains(BAR_URL));
- assertTrue("Different page title expected",browser.getTitle().contains(GUICE_TITLE));
- assertTrue("Juice of the day should contain its name and price", browser.isTextPresent(JUICE_OF_THE_DAY));
- assertTrue("Another juice should contain its name and price", browser.isTextPresent(ANOTHER_JUICE));
- }
-
-}
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/resources-ftest/testng.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/resources-ftest/testng.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/resources-ftest/testng.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,27 +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="Guice example" verbose="2" parallel="false">
- <test name="guice_jboss5">
- <parameter name="PROPERTY_FILE" value="" />
- <classes>
- <class
- name="org.jboss.seam.example.guice.test.selenium.GuiceTest" />
- </classes>
- </test>
-</suite>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/resources-integration/arquillian.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/resources-integration/arquillian.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/resources-integration/arquillian.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,17 +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</property>
- <property name="jbossHome">target/jboss-as-${version.jbossas7}</property>
- </configuration>
- </container>
-
-</arquillian>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/resources-integration/web.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/resources-integration/web.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-tests/src/test/resources-integration/web.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -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>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/pom.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/pom.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,78 +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>guice</artifactId>
- <groupId>org.jboss.seam.examples-ee6</groupId>
- <version>2.3.0.Beta2-redhat-1</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-web</artifactId>
- <packaging>war</packaging>
- <name>Guice Web Module (EE6)</name>
-
- <properties>
- <!-- filtering property for components.xml -->
- <jndiPattern>java:app/guice-ejb/#{ejbName}</jndiPattern>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-ejb</artifactId>
- <type>ejb</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <type>ejb</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-debug</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-ui</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-jul</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <exclusions>
- <exclusion>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <webResources>
- <resource>
- <directory>src/main/webapp</directory>
- <filtering>true</filtering>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/WEB-INF/components.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/WEB-INF/components.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/WEB-INF/components.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://jboss.org/schema/seam/components"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:core="http://jboss.org/schema/seam/core"
- xmlns:guice="http://jboss.org/schema/seam/guice"
- xsi:schemaLocation="
- http://jboss.org/schema/seam/core http://jboss.org/schema/seam/core-2.3.xsd
- http://jboss.org/schema/seam/guice http://jboss.org/schema/seam/guice-2.3.xsd
- http://jboss.org/schema/seam/components http://jboss.org/schema/seam/components-2.3.xsd">
-
- <core:init debug="true"/>
-
- <guice:injector name="guiceExampleInjector">
- <guice:modules>
- <value>org.jboss.seam.example.guice.JuiceBarModule</value>
- </guice:modules>
- </guice:injector>
-
- <guice:init injector="#{guiceExampleInjector}"/>
-
-</components>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/WEB-INF/faces-config.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/WEB-INF/faces-config.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,6 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<faces-config version="2.1"
- 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-facesconfig_2_1.xsd">
-</faces-config>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/WEB-INF/web.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/WEB-INF/web.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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">
-
- <display-name>Seam Guice Example</display-name>
-
- <listener>
- <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
- </listener>
-
- <filter>
- <filter-name>Seam Filter</filter-name>
- <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>Seam Filter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
-
- <context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
- </context-param>
-
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.seam</url-pattern>
- </servlet-mapping>
-
- <session-config>
- <session-timeout>10</session-timeout>
- </session-config>
-
-</web-app>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/bar.xhtml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/bar.xhtml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/bar.xhtml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,23 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
- <head>
- <title>Juice Bar</title>
- </head>
- <body>
- <h1>Juice Bar</h1>
- <h:form id="main">
- <div>
- Which juice do you prefer?
- <ul>
- <li>#{juiceBar.juiceOfTheDay.name}* - #{juiceBar.juiceOfTheDay.price} cents</li>
- <li>#{juiceBar.anotherJuice.name} - #{juiceBar.anotherJuice.price} cents</li>
- </ul>
- <p><em>* Juice of the day</em></p>
- </div>
- <p><small>This page is intentionally static (no form action).</small></p>
- </h:form>
- </body>
-</html>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/index.html
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/index.html 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/guice-web/src/main/webapp/index.html 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,5 +0,0 @@
-<html>
-<head>
- <meta http-equiv="Refresh" content="0; URL=bar.seam">
-</head>
-</html>
\ No newline at end of file
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/pom.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/pom.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,47 +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">
- <parent>
- <artifactId>examples-ee6</artifactId>
- <groupId>org.jboss.seam</groupId>
- <version>2.3.0.Beta2-redhat-1</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.seam.examples-ee6</groupId>
- <artifactId>guice</artifactId>
- <packaging>pom</packaging>
- <name>Guice Example (EE6)</name>
-
- <modules>
- <module>guice-ejb</module>
- <module>guice-web</module>
- <module>guice-ear</module>
- <module>guice-tests</module>
- </modules>
-
- <properties>
- <example.name>guice</example.name>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-ejb</artifactId>
- <version>${project.version}</version>
- <type>ejb</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-web</artifactId>
- <version>${project.version}</version>
- <type>war</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.examples-ee6.guice</groupId>
- <artifactId>guice-ear</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-</project>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/guice/readme.txt
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/guice/readme.txt 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/guice/readme.txt 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,25 +0,0 @@
-Seam Guice Example
-======================
-This is a simple example demonstrating the use of Google Guice with Seam.
-
-example.name=guice
-
-To deploy the example to JBossAS, follow these steps:
-
-* In the example root directory run:
-
- mvn clean package
-
-* Set JBOSS_HOME environment property.
-
-* In the guice-ear directory run:
-
- mvn jboss:hard-deploy
-
-To deploy the example to Tomcat with Embedded JBoss, follow these steps:
-
-* In the example root directory run:
-
- mvn clean package -Ptomcat
-
-* Deploy the resulting WAR from guice-web/target directory to Tomcat manually.
Modified: branches/enterprise/WFK-2_0/examples-ee6/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/pom.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/examples-ee6/pom.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -55,7 +55,6 @@
<!-- <module>dvdstore</module> -->
<module>excel</module>
<module>groovybooking</module>
- <module>guice</module>
<module>hibernate</module>
<module>itext</module>
<module>jpa</module>
Modified: branches/enterprise/WFK-2_0/jboss-seam-ioc/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/jboss-seam-ioc/pom.xml 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/jboss-seam-ioc/pom.xml 2012-06-09 18:48:05 UTC (rev 14883)
@@ -66,12 +66,6 @@
</dependency>
<dependency>
- <groupId>com.google.code.guice</groupId>
- <artifactId>guice</artifactId>
- <optional>true</optional>
- </dependency>
-
- <dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<optional>true</optional>
Deleted: branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/Guice.java
===================================================================
--- branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/Guice.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/Guice.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,25 +0,0 @@
-package org.jboss.seam.ioc.guice;
-
-import org.jboss.seam.annotations.intercept.Interceptors;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Google Guice support. Allows use of Guice injection inside Seam component.
- *
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- */
-@Target(TYPE)
-@Retention(RUNTIME)
-(a)Interceptors(GuiceInterceptor.class)
-public @interface Guice
-{
- /**
- * Name of the Guice injector component.
- * By default the injector specified in the components.xml file is used.
- */
- String value() default "";
-}
Deleted: branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/GuiceInit.java
===================================================================
--- branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/GuiceInit.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/GuiceInit.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,48 +0,0 @@
-package org.jboss.seam.ioc.guice;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import java.io.Serializable;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-import com.google.inject.Injector;
-
-/**
- * Guice support configuration component. Holds reference to the default
- * injector.
- *
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- */
-@Name("org.jboss.seam.ioc.guice.init")
-(a)Scope(ScopeType.APPLICATION)
-@Startup
-@Install(precedence = FRAMEWORK, classDependencies = "com.google.inject.Injector")
-@BypassInterceptors
-public class GuiceInit implements Serializable
-{
- private static final long serialVersionUID = -1517814449129434488L;
-
- private Injector injector;
-
- public Injector getInjector()
- {
- return injector;
- }
-
- public void setInjector(Injector injector)
- {
- this.injector = injector;
- }
-
- @Override
- public String toString()
- {
- return "org.jboss.seam.ioc.guice.init(" + injector + ")";
- }
-}
Deleted: branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/GuiceInterceptor.java
===================================================================
--- branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/GuiceInterceptor.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/GuiceInterceptor.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,166 +0,0 @@
-package org.jboss.seam.ioc.guice;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.util.Reflections;
-import org.jboss.seam.util.Strings;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.log.Logging;
-
-import com.google.inject.Injector;
-import com.google.inject.Inject;
-
-import java.lang.reflect.Field;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Triggers Guice injection on a Seam component.
- *
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- * @author Tomasz Szymanski (tszymanski [at] jboss.org)
- */
-@Interceptor
-public class GuiceInterceptor extends AbstractInterceptor
-{
- private static final Log log = Logging.getLog(GuiceInterceptor.class);
-
- private static final long serialVersionUID = -6716553117162905303L;
-
- private static final String GUICE_COMPONENT_FIELDS_MAP = "org.jboss.seam.GuiceComponentFieldsMap";
-
- private transient Injector defaultInjector = null;
-
- @AroundInvoke
- public Object aroundInvoke(InvocationContext invocationContext) throws Exception
- {
- inject(invocationContext.getTarget());
-
- Object result = invocationContext.proceed();
-
- disinject(invocationContext.getTarget());
-
- return result;
- }
-
- private void inject(Object target)
- {
- if (log.isTraceEnabled())
- {
- log.trace("Injecting members of component '#0'", getComponent().getName());
- }
-
- getGuiceInjector().injectMembers(target);
- }
-
- private void disinject(Object target) throws Exception
- {
- for (Field guiceField : getGuiceAnnotatedFields())
- {
- if (!guiceField.isAccessible())
- {
- guiceField.setAccessible(true);
- }
- Reflections.set(guiceField, target, null);
- }
- }
-
- /**
- * @return a Guice injector for the current component
- */
- private Injector getGuiceInjector()
- {
- final String expr;
- Guice guice = getComponent().getBeanClass().getAnnotation(Guice.class);
- if (guice != null) {
- expr = guice.value();
- }
- else {
- expr = null;
- }
-
- // Optimize lookups for default injector
- return Strings.isEmpty(expr)
- ? getCachedDefaultInjector() : getInjectorByName(expr);
- }
-
- private Injector getCachedDefaultInjector()
- {
- if (defaultInjector == null)
- {
- GuiceInit init = (GuiceInit) Component.getInstance(GuiceInit.class);
-
- if (init != null)
- {
- defaultInjector = init.getInjector();
- }
-
- if (defaultInjector == null)
- {
- throw new IllegalStateException("Default Guice injector not specified.");
- }
- }
-
- return defaultInjector;
- }
-
- private static Injector getInjectorByName(final String expr)
- {
- Object result;
-
- if (expr.startsWith("#"))
- {
- result = Expressions.instance().createValueExpression(expr).getValue();
- }
- else
- {
- result = Component.getInstance(expr);
- }
-
- if (!(result instanceof Injector))
- {
- throw new IllegalArgumentException("Expression '" + expr + "' does not evaluate to a Guice injector.");
- }
-
- return (Injector) result;
- }
-
- /**
- * @return a collection of all component fields injected by Guice (annotated with the @Inject annotation)
- */
- private Collection<Field> getGuiceAnnotatedFields()
- {
- final Map<Class,Collection<Field>> fieldsMap = getGuiceComponentFieldsMap();
- Collection<Field> annotatedFields = fieldsMap.get(getComponent().getBeanClass());
- if (annotatedFields == null)
- {
- annotatedFields = Reflections.getFields(getComponent().getBeanClass(), Inject.class);
- fieldsMap.put(getComponent().getBeanClass(), annotatedFields);
- }
- return annotatedFields;
- }
-
- /**
- * @return a cache that stores fields annotated with the @Inject annotation for the Guice component classes
- */
- @SuppressWarnings("unchecked")
- private Map<Class,Collection<Field>> getGuiceComponentFieldsMap()
- {
- if (Contexts.getApplicationContext().get(GUICE_COMPONENT_FIELDS_MAP) == null)
- {
- Contexts.getApplicationContext().set(GUICE_COMPONENT_FIELDS_MAP, new HashMap<Class, Collection<Field>>());
- }
- return (Map<Class, Collection<Field>>) Contexts.getApplicationContext().get(GUICE_COMPONENT_FIELDS_MAP);
- }
-
- public boolean isInterceptorEnabled()
- {
- return true;
- }
-}
Deleted: branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/Injector.java
===================================================================
--- branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/Injector.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/Injector.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,93 +0,0 @@
-package org.jboss.seam.ioc.guice;
-
-import com.google.inject.Guice;
-import com.google.inject.Module;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.*;
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Creates Guice injector from a list of modules.
- *
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- */
-@Name("org.jboss.seam.ioc.guice.injector")
-(a)Scope(ScopeType.APPLICATION)
-@Startup
-@Install(value=false, precedence = FRAMEWORK)
-public class Injector implements Serializable
-{
- private static final long serialVersionUID = 8935525407647910950L;
-
- private static final LogProvider log = Logging.getLogProvider(Injector.class);
-
- private String[] modules;
-
- private com.google.inject.Injector injector = null;
-
- @Unwrap
- public com.google.inject.Injector getInjector()
- {
- return injector;
- }
-
- @Create
- public void createInjector() throws IllegalAccessException, InstantiationException, ClassNotFoundException
- {
- if ((modules == null) || (modules.length == 0))
- {
- throw new IllegalArgumentException("No Guice module specified.");
- }
-
- log.debug("Creating injector '" +
- "'from modules: " + Arrays.toString(modules));
-
- final List<Module> moduleList = getModuleList(modules);
-
- injector = Guice.createInjector(moduleList);
- }
-
- private static List<Module> getModuleList(String[] modules) throws IllegalAccessException, InstantiationException, ClassNotFoundException
- {
- List<Module> moduleList = new ArrayList<Module>();
-
- for (String m : modules)
- {
- Module module = getModule(m);
- moduleList.add(module);
- }
-
- return moduleList;
- }
-
- private static Module getModule(String className)
- {
- try
- {
- final Class<?> clazz = Class.forName(className, true, Thread.currentThread().getContextClassLoader());
-
- return (Module) clazz.newInstance();
- }
- catch (Exception e)
- {
- throw new IllegalArgumentException("Unable to create guice module: " + className, e);
- }
- }
-
- public String[] getModules()
- {
- return modules;
- }
-
- public void setModules(String[] modules)
- {
- this.modules = modules;
- }
-}
Deleted: branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/package-info.java
===================================================================
--- branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/package-info.java 2012-06-09 18:13:25 UTC (rev 14882)
+++ branches/enterprise/WFK-2_0/jboss-seam-ioc/src/main/java/org/jboss/seam/ioc/guice/package-info.java 2012-06-09 18:48:05 UTC (rev 14883)
@@ -1,6 +0,0 @@
-@Namespace(value="http://jboss.org/schema/seam/guice", prefix = "org.jboss.seam.ioc.guice")
-@AutoCreate
-package org.jboss.seam.ioc.guice;
-
-import org.jboss.seam.annotations.Namespace;
-import org.jboss.seam.annotations.AutoCreate;
11 years, 11 months
Seam SVN: r14882 - branches/enterprise/WFK-2_0/jboss-seam/src/main/java/org/jboss/seam/mock.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-06-09 14:13:25 -0400 (Sat, 09 Jun 2012)
New Revision: 14882
Modified:
branches/enterprise/WFK-2_0/jboss-seam/src/main/java/org/jboss/seam/mock/MockRequestDispatcher.java
branches/enterprise/WFK-2_0/jboss-seam/src/main/java/org/jboss/seam/mock/MockViewHandler.java
Log:
fixed wrong usage of
commons-logging
instead of Seam log
layer - https://bugzilla.redhat.com/show_bug.cgi?id=830233
Modified: branches/enterprise/WFK-2_0/jboss-seam/src/main/java/org/jboss/seam/mock/MockRequestDispatcher.java
===================================================================
--- branches/enterprise/WFK-2_0/jboss-seam/src/main/java/org/jboss/seam/mock/MockRequestDispatcher.java 2012-06-09 18:11:00 UTC (rev 14881)
+++ branches/enterprise/WFK-2_0/jboss-seam/src/main/java/org/jboss/seam/mock/MockRequestDispatcher.java 2012-06-09 18:13:25 UTC (rev 14882)
@@ -16,14 +16,14 @@
package org.jboss.seam.mock;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
+
/**
* Mock implementation of the {@link javax.servlet.RequestDispatcher} interface.
* <p/>
@@ -37,8 +37,8 @@
public class MockRequestDispatcher implements RequestDispatcher
{
- private final Log logger = LogFactory.getLog(getClass());
-
+ private static final LogProvider logger = Logging.getLogProvider(MockRequestDispatcher.class);
+
private final String url;
Modified: branches/enterprise/WFK-2_0/jboss-seam/src/main/java/org/jboss/seam/mock/MockViewHandler.java
===================================================================
--- branches/enterprise/WFK-2_0/jboss-seam/src/main/java/org/jboss/seam/mock/MockViewHandler.java 2012-06-09 18:11:00 UTC (rev 14881)
+++ branches/enterprise/WFK-2_0/jboss-seam/src/main/java/org/jboss/seam/mock/MockViewHandler.java 2012-06-09 18:13:25 UTC (rev 14882)
@@ -8,13 +8,13 @@
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
import org.jboss.seam.util.Strings;
public class MockViewHandler extends ViewHandler {
- private final Log logger = LogFactory.getLog(getClass());
+ private static final LogProvider logger = Logging.getLogProvider(MockViewHandler.class);
@Override
public Locale calculateLocale(FacesContext ctx) {
11 years, 11 months
Seam SVN: r14881 - branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-06-09 14:11:00 -0400 (Sat, 09 Jun 2012)
New Revision: 14881
Modified:
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockRequestDispatcher.java
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockViewHandler.java
Log:
JBSEAM-4990 fixed usage of proper logger
Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockRequestDispatcher.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockRequestDispatcher.java 2012-06-08 08:42:42 UTC (rev 14880)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockRequestDispatcher.java 2012-06-09 18:11:00 UTC (rev 14881)
@@ -16,14 +16,14 @@
package org.jboss.seam.mock;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
+
/**
* Mock implementation of the {@link javax.servlet.RequestDispatcher} interface.
* <p/>
@@ -37,8 +37,8 @@
public class MockRequestDispatcher implements RequestDispatcher
{
- private final Log logger = LogFactory.getLog(getClass());
-
+ private static final LogProvider logger = Logging.getLogProvider(MockRequestDispatcher.class);
+
private final String url;
Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockViewHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockViewHandler.java 2012-06-08 08:42:42 UTC (rev 14880)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockViewHandler.java 2012-06-09 18:11:00 UTC (rev 14881)
@@ -8,13 +8,13 @@
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
import org.jboss.seam.util.Strings;
public class MockViewHandler extends ViewHandler {
- private final Log logger = LogFactory.getLog(getClass());
+ private static final LogProvider logger = Logging.getLogProvider(MockViewHandler.class);
@Override
public Locale calculateLocale(FacesContext ctx) {
11 years, 11 months
Seam SVN: r14880 - branches/community/Seam_2_3/jboss-seam-gen/dist/resources.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-06-08 04:42:42 -0400 (Fri, 08 Jun 2012)
New Revision: 14880
Modified:
branches/community/Seam_2_3/jboss-seam-gen/dist/resources/datasource-ds.xml
Log:
JBSEAM-4959 driver file for copy is now in driver element of DS file
Modified: branches/community/Seam_2_3/jboss-seam-gen/dist/resources/datasource-ds.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-gen/dist/resources/datasource-ds.xml 2012-06-07 12:00:09 UTC (rev 14879)
+++ branches/community/Seam_2_3/jboss-seam-gen/dist/resources/datasource-ds.xml 2012-06-08 08:42:42 UTC (rev 14880)
@@ -5,7 +5,7 @@
enabled="true"
use-java-context="true" pool-name="@projectName@Datasource_pool">
<connection-url>@jdbcUrl@</connection-url>
- <driver>@database.type@</driver>
+ <driver>@driverJar@</driver>
<security>
<user-name>@username@</user-name>
<password>@password@</password>
11 years, 11 months
Seam SVN: r14879 - branches/enterprise/WFK-2_0/examples-ee6.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-06-07 08:00:09 -0400 (Thu, 07 Jun 2012)
New Revision: 14879
Modified:
branches/enterprise/WFK-2_0/examples-ee6/pom.xml
Log:
comment out numberguess example for its jbpm dependency
Modified: branches/enterprise/WFK-2_0/examples-ee6/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/pom.xml 2012-06-07 11:43:43 UTC (rev 14878)
+++ branches/enterprise/WFK-2_0/examples-ee6/pom.xml 2012-06-07 12:00:09 UTC (rev 14879)
@@ -62,7 +62,7 @@
<module>mail</module>
<module>messages</module>
<module>nestedbooking</module>
- <module>numberguess</module>
+<!-- <module>numberguess</module> -->
<module>openid</module>
<module>quartz</module>
<module>registration</module>
11 years, 11 months
Seam SVN: r14878 - branches/community/Seam_2_3/examples-ee6/jpa/jpa-tests.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-06-07 07:43:43 -0400 (Thu, 07 Jun 2012)
New Revision: 14878
Modified:
branches/community/Seam_2_3/examples-ee6/jpa/jpa-tests/pom.xml
Log:
jpa example cleanup
Modified: branches/community/Seam_2_3/examples-ee6/jpa/jpa-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/jpa/jpa-tests/pom.xml 2012-06-07 11:41:16 UTC (rev 14877)
+++ branches/community/Seam_2_3/examples-ee6/jpa/jpa-tests/pom.xml 2012-06-07 11:43:43 UTC (rev 14878)
@@ -70,17 +70,6 @@
</dependency>
<dependency>
- <groupId>org.jboss.shrinkwrap.resolver</groupId>
- <artifactId>shrinkwrap-resolver-api-maven</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.shrinkwrap.resolver</groupId>
- <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.jboss.spec.javax.el</groupId>
<artifactId>jboss-el-api_2.2_spec</artifactId>
</dependency>
11 years, 11 months
Seam SVN: r14877 - branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-06-07 07:41:16 -0400 (Thu, 07 Jun 2012)
New Revision: 14877
Modified:
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/pom.xml
Log:
bz828209 fix shrinkwrap-resolver-api|impl-maven dependency in the seamdiscs example
Modified: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/pom.xml 2012-06-07 11:18:50 UTC (rev 14876)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/pom.xml 2012-06-07 11:41:16 UTC (rev 14877)
@@ -77,15 +77,18 @@
<scope>test</scope>
</dependency>
+ <!-- NOTE: ShrinkWrap Maven Resolver is not supported, it is used here only as part of the Seam testsuite. -->
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-api-maven</artifactId>
+ <version>1.0.0-beta-7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
+ <version>1.0.0-beta-7</version>
<scope>test</scope>
</dependency>
11 years, 11 months
Seam SVN: r14876 - in branches/enterprise/WFK-2_0/examples-ee6: restbay/restbay-tests and 1 other directory.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-06-07 07:18:50 -0400 (Thu, 07 Jun 2012)
New Revision: 14876
Modified:
branches/enterprise/WFK-2_0/examples-ee6/quartz/quartz-tests/pom.xml
branches/enterprise/WFK-2_0/examples-ee6/restbay/restbay-tests/pom.xml
Log:
bz828209 Use explicit community versions for shrinkwrap-resolver-api|impl-maven
Modified: branches/enterprise/WFK-2_0/examples-ee6/quartz/quartz-tests/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/quartz/quartz-tests/pom.xml 2012-06-07 11:06:27 UTC (rev 14875)
+++ branches/enterprise/WFK-2_0/examples-ee6/quartz/quartz-tests/pom.xml 2012-06-07 11:18:50 UTC (rev 14876)
@@ -69,15 +69,18 @@
<scope>test</scope>
</dependency>
+ <!-- NOTE: ShrinkWrap Maven Resolver is not supported, it is used here only as part of the Seam testsuite. -->
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-api-maven</artifactId>
+ <version>1.0.0-beta-7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
+ <version>1.0.0-beta-7</version>
<scope>test</scope>
</dependency>
Modified: branches/enterprise/WFK-2_0/examples-ee6/restbay/restbay-tests/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/restbay/restbay-tests/pom.xml 2012-06-07 11:06:27 UTC (rev 14875)
+++ branches/enterprise/WFK-2_0/examples-ee6/restbay/restbay-tests/pom.xml 2012-06-07 11:18:50 UTC (rev 14876)
@@ -63,15 +63,18 @@
<scope>test</scope>
</dependency>
+ <!-- NOTE: ShrinkWrap Maven Resolver is not supported, it is used here only as part of the Seam testsuite. -->
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-api-maven</artifactId>
+ <version>1.0.0-beta-7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
+ <version>1.0.0-beta-7</version>
<scope>test</scope>
</dependency>
11 years, 11 months
Seam SVN: r14875 - branches/enterprise/WFK-2_0/examples-ee6/jpa/jpa-tests.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-06-07 07:06:27 -0400 (Thu, 07 Jun 2012)
New Revision: 14875
Modified:
branches/enterprise/WFK-2_0/examples-ee6/jpa/jpa-tests/pom.xml
Log:
bz828209 remove shrinkwrap-resolver-api|impl-maven from jpa example
Modified: branches/enterprise/WFK-2_0/examples-ee6/jpa/jpa-tests/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/jpa/jpa-tests/pom.xml 2012-06-07 11:00:18 UTC (rev 14874)
+++ branches/enterprise/WFK-2_0/examples-ee6/jpa/jpa-tests/pom.xml 2012-06-07 11:06:27 UTC (rev 14875)
@@ -70,17 +70,6 @@
</dependency>
<dependency>
- <groupId>org.jboss.shrinkwrap.resolver</groupId>
- <artifactId>shrinkwrap-resolver-api-maven</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.shrinkwrap.resolver</groupId>
- <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.jboss.spec.javax.el</groupId>
<artifactId>jboss-el-api_2.2_spec</artifactId>
</dependency>
@@ -92,7 +81,6 @@
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
</dependency>
-
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
11 years, 11 months
Seam SVN: r14874 - in branches/enterprise/WFK-2_0/examples-ee6/seamdiscs: seamdiscs-ear and 7 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-06-07 07:00:18 -0400 (Thu, 07 Jun 2012)
New Revision: 14874
Added:
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seamdiscs-ds.xml
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/Deployments.java
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/arquillian.xml
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/web.xml
Removed:
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seambay-ds.xml
Modified:
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/pom.xml
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/pom.xml
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ejb/pom.xml
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/BandMemberFinder.java
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/pom.xml
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayArtistTest.java
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayDiscTest.java
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditArtistTest.java
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditDiscTest.java
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/LoginTest.java
branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-web/pom.xml
Log:
enabled seamdiscs integration tests
Modified: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/pom.xml 2012-06-07 10:59:45 UTC (rev 14873)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/pom.xml 2012-06-07 11:00:18 UTC (rev 14874)
@@ -19,7 +19,7 @@
<module>seamdiscs-ear</module>
<module>seamdiscs-ejb</module>
<module>seamdiscs-web</module>
-<!-- <module>seamdiscs-tests</module> -->
+ <module>seamdiscs-tests</module>
</modules>
<dependencyManagement>
Modified: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/pom.xml 2012-06-07 10:59:45 UTC (rev 14873)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/pom.xml 2012-06-07 11:00:18 UTC (rev 14874)
@@ -30,10 +30,6 @@
<type>ejb</type>
<scope>compile</scope>
</dependency>
- <dependency>
- <groupId>org.apache.myfaces.trinidad</groupId>
- <artifactId>trinidad-api</artifactId>
- </dependency>
</dependencies>
<build>
Deleted: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seambay-ds.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seambay-ds.xml 2012-06-07 10:59:45 UTC (rev 14873)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seambay-ds.xml 2012-06-07 11:00:18 UTC (rev 14874)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<datasources xmlns="http://www.jboss.org/ironjacamar/schema">
- <datasource
- jndi-name="java:/jboss/seamdiscsDatasource"
- enabled="true"
- use-java-context="true" pool-name="seamdiscs">
- <connection-url>jdbc:h2:mem:seambaydb;DB_CLOSE_DELAY=-1</connection-url>
- <driver>h2</driver>
- <security>
- <user-name>sa</user-name>
- <password>sa</password>
- </security>
- </datasource>
-</datasources>
Copied: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seamdiscs-ds.xml (from rev 14873, branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seambay-ds.xml)
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seamdiscs-ds.xml (rev 0)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seamdiscs-ds.xml 2012-06-07 11:00:18 UTC (rev 14874)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources xmlns="http://www.jboss.org/ironjacamar/schema">
+ <datasource
+ jndi-name="java:/jboss/seamdiscsDatasource"
+ enabled="true"
+ use-java-context="true" pool-name="seamdiscs">
+ <connection-url>jdbc:h2:mem:seamdiscsdb;DB_CLOSE_DELAY=-1</connection-url>
+ <driver>h2</driver>
+ <security>
+ <user-name>sa</user-name>
+ <password>sa</password>
+ </security>
+ </datasource>
+</datasources>
Modified: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ejb/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ejb/pom.xml 2012-06-07 10:59:45 UTC (rev 14873)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ejb/pom.xml 2012-06-07 11:00:18 UTC (rev 14874)
@@ -48,7 +48,6 @@
<dependency>
<groupId>org.apache.myfaces.trinidad</groupId>
<artifactId>trinidad-api</artifactId>
- <scope>provided</scope>
</dependency>
</dependencies>
Modified: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/BandMemberFinder.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/BandMemberFinder.java 2012-06-07 10:59:45 UTC (rev 14873)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/BandMemberFinder.java 2012-06-07 11:00:18 UTC (rev 14874)
@@ -14,7 +14,7 @@
@Transactional
public List<BandMember> getBandMembers(Object name)
{
- return getEntityManager().createQuery("select bm from BandMember bm where lower(bm.name) like lower(:name + '%')").setParameter("name", name).getResultList();
+ return getEntityManager().createQuery("select bm from BandMember bm where lower(bm.name) like lower(:name || '%')").setParameter("name", name).getResultList();
}
}
Modified: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/pom.xml 2012-06-07 10:59:45 UTC (rev 14873)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/pom.xml 2012-06-07 11:00:18 UTC (rev 14874)
@@ -24,14 +24,8 @@
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
<scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <type>ejb</type>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
@@ -41,13 +35,16 @@
<artifactId>jboss-jsf-api_2.1_spec</artifactId>
</dependency>
<dependency>
- <groupId>org.seleniumhq.selenium.server</groupId>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
- <classifier>standalone</classifier>
</dependency>
<dependency>
- <groupId>org.seleniumhq.selenium.client-drivers</groupId>
- <artifactId>selenium-java-client-driver</artifactId>
+ <groupId>org.seleniumhq.selenium</groupId>
+ <artifactId>selenium-java</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
@@ -61,15 +58,37 @@
<dependency>
<groupId>org.apache.myfaces.trinidad</groupId>
<artifactId>trinidad-api</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
- <groupId>org.apache.myfaces.trinidad</groupId>
- <artifactId>trinidad-impl</artifactId>
- </dependency>
- <dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
</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.shrinkwrap.resolver</groupId>
+ <artifactId>shrinkwrap-resolver-api-maven</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.shrinkwrap.resolver</groupId>
+ <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
<build>
@@ -79,68 +98,60 @@
<filtering>true</filtering>
</testResource>
<testResource>
- <directory>src/test/bootstrap</directory>
- <filtering>false</filtering>
+ <directory>src/test/resources-integration</directory>
</testResource>
- <testResource>
- <directory>${basedir}/../seamdiscs-ear/src/main/application</directory>
- <filtering>true</filtering>
- </testResource>
- <testResource>
- <directory>${basedir}/../seamdiscs-ear/src/main/resources</directory>
- <filtering>true</filtering>
- </testResource>
- <testResource>
- <directory>${basedir}/../seamdiscs-web/src/main/resources</directory>
- <filtering>true</filtering>
- </testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <skipTests>false</skipTests>
- <argLine>-Dsun.lang.ClassLoader.allowArraySyntax=true -Xms512m -Xmx512m</argLine>
- <additionalClasspathElements>
- <additionalClasspathElement>${basedir}/../seamdiscs-web/src/main/webapp</additionalClasspathElement>
- <additionalClasspathElement>${project.build.directory}/dependency/bootstrap</additionalClasspathElement>
- </additionalClasspathElements>
- <suiteXmlFiles>
- <suiteXmlFile>src/test/resources-integration/testng.xml</suiteXmlFile>
- </suiteXmlFiles>
+ <skip>true</skip>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <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>
- </execution>
- </executions>
- </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-seamdiscs</example.context.path>
@@ -149,18 +160,6 @@
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-maven-plugin</artifactId>
- <configuration>
- <jbossHome>${jboss.home}</jbossHome>
- <serverName>${jboss.domain}</serverName>
- <fileNames>
- <param>${basedir}/../seamdiscs-ear/src/main/resources/jboss-seam-seamdiscs-ds.xml</param>
- <param>${basedir}/../seamdiscs-ear/target/seam-seamdiscs.ear</param>
- </fileNames>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
</plugin>
<plugin>
Added: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/Deployments.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/Deployments.java (rev 0)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/Deployments.java 2012-06-07 11:00:18 UTC (rev 14874)
@@ -0,0 +1,37 @@
+package org.jboss.seam.example.seamdiscs.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.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.resolver.api.DependencyResolvers;
+import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver;
+
+import java.io.File;
+
+public class Deployments {
+ public static EnterpriseArchive seamdiscsDeployment() {
+ 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_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayArtistTest.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayArtistTest.java 2012-06-07 10:59:45 UTC (rev 14873)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayArtistTest.java 2012-06-07 11:00:18 UTC (rev 14874)
@@ -14,17 +14,39 @@
import org.apache.myfaces.trinidad.model.CollectionModel;
import org.apache.myfaces.trinidad.model.SortCriterion;
+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.example.seamdiscs.model.Artist;
import org.jboss.seam.example.seamdiscs.model.Band;
-import org.jboss.seam.mock.DBUnitSeamTest;
-import org.testng.annotations.Test;
+import org.jboss.seam.mock.DBJUnitSeamTest;
+import org.jboss.seam.trinidad.SeamCollectionModel;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.runner.RunWith;
+import org.junit.Test;
+(a)RunWith(Arquillian.class)
+public class DisplayArtistTest extends DBJUnitSeamTest
+{
+ @Deployment(name="DisplayArtistTest")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ EnterpriseArchive er = Deployments.seamdiscsDeployment();
+ WebArchive web = er.getAsType(WebArchive.class, "seamdiscs-web.war");
+ web.addClasses(DisplayArtistTest.class);
-public class DisplayArtistTest extends DBUnitSeamTest
-{
+ return er;
+ }
@Override
protected void prepareDBUnitOperations() {
+
+ setDatabase("HSQL");
+ setDatasourceJndiName("java:/jboss/seamdiscsDatasource");
+
beforeTestOperations.add(
new DataSetOperation("org/jboss/seam/example/seamdiscs/test/BaseData.xml")
);
@@ -123,6 +145,7 @@
protected void renderResponse() throws Exception
{
Object artists = getValue("#{artists.dataModel}");
+
assert artists instanceof CollectionModel;
CollectionModel collectionModel = (CollectionModel) artists;
Modified: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayDiscTest.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayDiscTest.java 2012-06-07 10:59:45 UTC (rev 14873)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayDiscTest.java 2012-06-07 11:00:18 UTC (rev 14874)
@@ -15,16 +15,35 @@
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.example.seamdiscs.model.Disc;
-import org.jboss.seam.mock.DBUnitSeamTest;
-import org.testng.annotations.Test;
+import org.jboss.seam.mock.DBJUnitSeamTest;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.runner.RunWith;
+import org.junit.Test;
-
-public class DisplayDiscTest extends DBUnitSeamTest
+(a)RunWith(Arquillian.class)
+public class DisplayDiscTest extends DBJUnitSeamTest
{
+ @Deployment(name="DisplayDiscTest")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ EnterpriseArchive er = Deployments.seamdiscsDeployment();
+ WebArchive web = er.getAsType(WebArchive.class, "seamdiscs-web.war");
+ web.addClasses(DisplayDiscTest.class);
+ return er;
+ }
@Override
protected void prepareDBUnitOperations() {
+ setDatabase("HSQL");
+ setDatasourceJndiName("java:/jboss/seamdiscsDatasource");
+
beforeTestOperations.add(
new DataSetOperation("org/jboss/seam/example/seamdiscs/test/BaseData.xml")
);
Modified: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditArtistTest.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditArtistTest.java 2012-06-07 10:59:45 UTC (rev 14873)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditArtistTest.java 2012-06-07 11:00:18 UTC (rev 14874)
@@ -19,22 +19,40 @@
import javax.el.PropertyNotFoundException;
+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.example.seamdiscs.model.BandMember;
-import org.jboss.seam.mock.DBUnitSeamTest;
-import org.testng.annotations.Test;
+import org.jboss.seam.mock.DBJUnitSeamTest;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.runner.RunWith;
+import org.junit.Test;
/**
* @author Pete Muir
*
*/
-public class EditArtistTest extends DBUnitSeamTest
+(a)RunWith(Arquillian.class)
+public class EditArtistTest extends DBJUnitSeamTest
{
-
-
+ @Deployment(name="EditArtistTest")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ EnterpriseArchive er = Deployments.seamdiscsDeployment();
+ WebArchive web = er.getAsType(WebArchive.class, "seamdiscs-web.war");
+ web.addClasses(EditArtistTest.class);
+ return er;
+ }
@Override
protected void prepareDBUnitOperations()
{
+ setDatabase("HSQL");
+ setDatasourceJndiName("java:/jboss/seamdiscsDatasource");
+
beforeTestOperations.add(
new DataSetOperation("org/jboss/seam/example/seamdiscs/test/BaseData.xml")
);
Modified: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditDiscTest.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditDiscTest.java 2012-06-07 10:59:45 UTC (rev 14873)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditDiscTest.java 2012-06-07 11:00:18 UTC (rev 14874)
@@ -13,19 +13,40 @@
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.example.seamdiscs.model.Artist;
import org.jboss.seam.example.seamdiscs.model.Disc;
-import org.jboss.seam.mock.DBUnitSeamTest;
-import org.testng.annotations.Test;
+import org.jboss.seam.mock.DBJUnitSeamTest;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.runner.RunWith;
+import org.junit.Test;
/**
* @author Pete Muir
*
*/
-public class EditDiscTest extends DBUnitSeamTest{
-
+(a)RunWith(Arquillian.class)
+public class EditDiscTest extends DBJUnitSeamTest{
+
+ @Deployment(name="EditDiscTest")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ EnterpriseArchive er = Deployments.seamdiscsDeployment();
+ WebArchive web = er.getAsType(WebArchive.class, "seamdiscs-web.war");
+ web.addClasses(EditDiscTest.class);
+ return er;
+ }
+
@Override
protected void prepareDBUnitOperations() {
+ setDatabase("HSQL");
+ setDatasourceJndiName("java:/jboss/seamdiscsDatasource");
+
beforeTestOperations.add(
new DataSetOperation("org/jboss/seam/example/seamdiscs/test/BaseData.xml")
);
Modified: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/LoginTest.java
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/LoginTest.java 2012-06-07 10:59:45 UTC (rev 14873)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/LoginTest.java 2012-06-07 11:00:18 UTC (rev 14874)
@@ -5,17 +5,38 @@
import static org.jboss.seam.example.seamdiscs.test.TestStrings.WRONG_PASSWORD;
import static org.jboss.seam.example.seamdiscs.test.TestStrings.WRONG_USERNAME;
-import org.jboss.seam.mock.DBUnitSeamTest;
-import org.testng.annotations.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.mock.DBJUnitSeamTest;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.runner.RunWith;
+import org.junit.Test;
/**
* @author Pete Muir
*
*/
-public class LoginTest extends DBUnitSeamTest {
-
+(a)RunWith(Arquillian.class)
+public class LoginTest extends DBJUnitSeamTest {
+
+ @Deployment(name="LoginTest")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ EnterpriseArchive er = Deployments.seamdiscsDeployment();
+ WebArchive web = er.getAsType(WebArchive.class, "seamdiscs-web.war");
+ web.addClasses(LoginTest.class);
+ return er;
+ }
+
@Override
protected void prepareDBUnitOperations() {
+ setDatabase("HSQL");
+ setDatasourceJndiName("java:/jboss/seamdiscsDatasource");
+
beforeTestOperations.add(
new DataSetOperation("org/jboss/seam/example/seamdiscs/test/BaseData.xml")
);
Added: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/arquillian.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/arquillian.xml (rev 0)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/arquillian.xml 2012-06-07 11:00:18 UTC (rev 14874)
@@ -0,0 +1,17 @@
+<?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>
Added: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/web.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/web.xml (rev 0)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/web.xml 2012-06-07 11:00:18 UTC (rev 14874)
@@ -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>
Modified: branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-web/pom.xml
===================================================================
--- branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-web/pom.xml 2012-06-07 10:59:45 UTC (rev 14873)
+++ branches/enterprise/WFK-2_0/examples-ee6/seamdiscs/seamdiscs-web/pom.xml 2012-06-07 11:00:18 UTC (rev 14874)
@@ -72,6 +72,7 @@
<dependency>
<groupId>org.apache.myfaces.trinidad</groupId>
<artifactId>trinidad-api</artifactId>
+ <scope>provided</scope>
</dependency>
</dependencies>
11 years, 11 months