Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

upgrade to Arquillian 1.0.0.CR1; add as7 container

  • Loading branch information...
commit 64ef854df3c820142c3a9f3432915eb2d2a77afd 1 parent 2e60e88
@mojavelinux mojavelinux authored
Showing with 736 additions and 851 deletions.
  1. +20 −85 cdi-ejb/pom.xml
  2. +3 −4 cdi-ejb/src/test/java/com/acme/cdiejb/async/FireAndForgetTestCase.java
  3. +24 −7 cdi-ejb/src/test/java/com/acme/cdiejb/mixedinterface/MixedInterfaceEjbTestCase.java
  4. +1 −1  cdi-ejb/src/test/java/com/acme/cdiejb/nointerface/NoInterfaceNamedEjbTestCase.java
  5. +25 −12 cdi/build.gradle
  6. +10 −5 cdi/build.properties
  7. +75 −8 cdi/build.xml
  8. BIN  cdi/gradle-wrapper/gradle-wrapper.jar
  9. +2 −2 cdi/gradle-wrapper/gradle-wrapper.properties
  10. +28 −5 cdi/gradlew
  11. +8 −52 cdi/gradlew.bat
  12. +24 −15 cdi/ivy.xml
  13. +1 −0  cdi/ivysettings.xml
  14. +45 −233 cdi/pom.xml
  15. +3 −3 cdi/src/test/java/com/acme/cdi/BeanManagerTestCase.java
  16. +1 −1  cdi/src/test/java/com/acme/cdi/GreeterManagedBeanTestCase.java
  17. +1 −1  cdi/src/test/java/com/acme/cdi/decorator/AnnouncerDecoratorTest.java
  18. +1 −1  cdi/src/test/java/com/acme/cdi/event/BeanManagerInitializedTestCase.java
  19. +1 −1  cdi/src/test/java/com/acme/cdi/event/DocumentEventTestCase.java
  20. +1 −1  cdi/src/test/java/com/acme/cdi/event/PacketSendReceiveTestCase.java
  21. +2 −2 cdi/src/test/java/com/acme/cdi/failure/AmbiguousDependencyTestCase.java
  22. +1 −1  cdi/src/test/java/com/acme/cdi/measurement/TemperatureConverterTestCase.java
  23. +15 −9 cdi/src/test/java/com/acme/cdi/payment/SynchronousPaymentProcessorTestCase.java
  24. +1 −1  cdi/src/test/java/com/acme/cdi/random/RandomTestCase.java
  25. +1 −1  cdi/src/test/java/com/acme/cdi/singleton/JavaxInjectSingletonTestCase.java
  26. +1 −1  cdi/src/test/java/com/acme/cdi/translate/TextTranslatorServiceTestCase.java
  27. +12 −0 cdi/src/test/resources/arquillian.xml
  28. +2 −2 cdi/src/test/resources/log4j.properties
  29. +20 −122 ejb/pom.xml
  30. +3 −2 ejb/src/test/java/com/acme/ejb/GreeterTestCase.java
  31. +2 −1  ejb/src/test/java/com/acme/ejb/TemperatureConverterTestCase.java
  32. +2 −1  ejb/src/test/java/com/acme/ejb/calc/MortgageCalculatorEnvEntryTestCase.java
  33. +3 −2 ejb/src/test/java/com/acme/ejb/calc/MortgageCalculatorTestCase.java
  34. +3 −2 ejb/src/test/java/com/acme/ejb/nointerface/NoInterfaceEJBTestCase.java
  35. +8 −2 ejb/src/test/resources/arquillian.xml
  36. +59 −62 jaxrs/pom.xml
  37. +6 −5 jaxrs/src/test/java/com/acme/jaxrs/CustomerResourceClientTest.java
  38. +4 −4 jaxrs/src/test/java/com/acme/jaxrs/CustomerResourceRESTEasyClientTest.java
  39. +67 −0 jaxrs/src/test/java/com/acme/jaxrs/EnterpriseCustomerResourceClientTest.java
  40. 0  jaxrs/src/test/{resources-jbossas → resources-jbossas-6}/test-persistence.xml
  41. +15 −0 jaxrs/src/test/resources-jbossas-7/test-persistence.xml
  42. +1 −0  jaxrs/src/test/resources/arquillian.launch
  43. +24 −4 jaxrs/src/test/resources/arquillian.xml
  44. +53 −9 jms/pom.xml
  45. +1 −1  jms/src/main/java/com/acme/jms/MessageEchoBean.java
  46. +4 −4 jms/src/test/java/com/acme/jms/MessageDrivenBeanEchoTestCase.java
  47. +2 −2 jpa-lite/src/test/resources/arquillian.xml
  48. +54 −96 jpa/pom.xml
  49. +2 −1  jpa/src/test/java/com/acme/jpa/GamePersistenceTestCase.java
  50. 0  jpa/src/test/{resources-jbossas → resources-jbossas-6}/test-persistence.xml
  51. +12 −0 jpa/src/test/resources-jbossas-7/test-persistence.xml
  52. +1 −0  jpa/src/test/resources/arquillian.launch
  53. +10 −7 jpa/src/test/resources/arquillian.xml
  54. +5 −28 multinode/pom.xml
  55. +13 −11 multinode/src/test/java/com/acme/multinode/grid/ClusteredCacheTestCase.java
  56. +4 −12 multinode/src/test/java/com/acme/multinode/grid/Deployments.java
  57. +21 −12 multinode/src/test/resources/arquillian.xml
  58. +1 −0  multinode/src/test/resources/grid/in-container-web.xml
  59. +1 −1  multinode/src/test/resources/grid/infinispan.xml
  60. +5 −4 multinode/src/test/resources/grid/jboss-repository.xml
  61. +21 −2 pom.xml
View
105 cdi-ejb/pom.xml
@@ -13,13 +13,13 @@
<artifactId>arquillian-showcase-cdi-ejb</artifactId>
<packaging>jar</packaging>
- <name>Arquillian Showcase: CDI + EJB</name>
+ <name>Arquillian Showcase: CDI-EJB Integration</name>
<description>Examples that use Arquillian to demonstrate the synergy between CDI and EJB 3.1</description>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian</groupId>
- <artifactId>arquillian-junit</artifactId>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -33,95 +33,48 @@
<profiles>
<profile>
- <id>arq-jbossas-remote-6</id>
+ <!-- all tests are failing -->
+ <id>arq-jbossas-managed-7</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-remote-6</artifactId>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-managed</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
- <type>pom</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-profileservice-client</artifactId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
<type>pom</type>
</dependency>
</dependencies>
</profile>
<profile>
- <id>arq-jbossas-managed-6</id>
+ <!-- all tests are failing -->
+ <id>arq-jbossas-remote-7</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-managed-6</artifactId>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-remote</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
<type>pom</type>
</dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-profileservice-client</artifactId>
- <type>pom</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-server-manager</artifactId>
- </dependency>
</dependencies>
</profile>
<profile>
- <id>arq-jbossas-remote-7</id>
- <dependencies>
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-remote-7</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-controller-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
- <type>pom</type>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkMode>never</forkMode>
- <excludes>
- <exclude>com/acme/cdiejb/mixedinterface/*</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
<id>arq-glassfish-embedded</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish.extras</groupId>
- <artifactId>glassfish-embedded-all</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>container-bom-glassfish-embedded-3.1</artifactId>
+ <type>pom</type>
+ <scope>test</scope>
</dependency>
</dependencies>
</profile>
@@ -130,32 +83,14 @@
<id>arq-glassfish-remote</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-glassfish-remote-3.1</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>container-bom-glassfish-remote-3.1</artifactId>
<type>pom</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-api</artifactId>
- <version>1.1.Final</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-bundle</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey.contribs</groupId>
- <artifactId>jersey-multipart</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
+
</profiles>
<!--
vi:ts=4:sw=4:expandtab:
View
7 cdi-ejb/src/test/java/com/acme/cdiejb/async/FireAndForgetTestCase.java
@@ -7,7 +7,7 @@
import javax.inject.Inject;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
@@ -34,7 +34,7 @@ public static JavaArchive createDeployment() {
// use on GlassFish because of a visibility bug
@Deployment
- public static WebArchive createDeploymentCompat() {
+ public static WebArchive createDeploymentForGlassFish() {
BeansDescriptor beansXml = Descriptors.create(BeansDescriptor.class);
return ShrinkWrap.create(WebArchive.class)
@@ -50,8 +50,7 @@ public static WebArchive createDeploymentCompat() {
@Test
public void shouldInvokeAsynchronously() throws Exception {
// use latch barrier or something to verify code is executing asynchronously
- System.out.println("Current thread [id=" + Thread.currentThread().getId() +
- "; name=" + Thread.currentThread().getName() + "]");
+ System.out.println("Current thread [id=" + Thread.currentThread().getId() + "; name=" + Thread.currentThread().getName() + "]");
asyncBean.fire(1000);
System.out.println("Async operation fired");
assertTrue(BlockingFireAndForgetBean.LATCH.await(30, TimeUnit.SECONDS));
View
31 cdi-ejb/src/test/java/com/acme/cdiejb/mixedinterface/MixedInterfaceEjbTestCase.java
@@ -16,9 +16,10 @@
*/
package com.acme.cdiejb.mixedinterface;
+import javax.ejb.EJB;
import javax.naming.InitialContext;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
@@ -55,16 +56,32 @@ public static EnterpriseArchive createDeployment() {
return ShrinkWrap.create(EnterpriseArchive.class, "test.ear").addAsModule(ejbClientJar).addAsModule(ejbServiceJar);
}
- // @EJB
- // @Inject
- // GreeterBean greeter;
- // GreeterRemote greeter;
- // @EJB GreeterDelegate greeter;
+// @Inject
+// GreeterRemote greeter;
+// GreeterDelegate greeter;
+// GreeterBean greeter;
+
+ @EJB
+ GreeterRemote greeter;
+// GreeterDelegate greeter;
+// GreeterBean greeter;
@Test
- public void shouldBeAbleToInjectEJBAndInvoke() throws Exception {
+ public void should_be_able_to_lookup_and_invoke_ejb() throws Exception {
String name = "Earthlings";
GreeterDelegate greeter = (GreeterDelegate) new InitialContext().lookup("java:global/test/service/GreeterDelegate");
Assert.assertEquals("Hello, " + name, greeter.greet(name));
}
+
+ @Test
+ public void should_be_able_to_at_inject_and_invoke_ejb(GreeterRemote greeter) {
+ String name = "Earthlings";
+ Assert.assertEquals("Hello, " + name, greeter.greet(name));
+ }
+
+ @Test
+ public void should_be_able_to_ejb_inject_and_invoke_ejb() {
+ String name = "Earthlings";
+ Assert.assertEquals("Hello, " + name, greeter.greet(name));
+ }
}
View
2  cdi-ejb/src/test/java/com/acme/cdiejb/nointerface/NoInterfaceNamedEjbTestCase.java
@@ -6,7 +6,7 @@
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
View
37 cdi/build.gradle
@@ -3,8 +3,9 @@ apply plugin: JavaPlugin
buildDir = 'target/gradle-build'
libraryVersions = [
- junit: '4.8.1', arquillian: '1.0.0.Alpha5', jbossJavaeeSpec: '1.0.0.Final', weld: '1.1.0.Final',
- slf4j: '1.5.10', log4j: '1.2.14', jbossas: '6.0.0.Final', glassfish: '3.1', cdi: '1.0-SP4'
+ junit: '4.8.1', arquillian: '1.0.0.CR1', jbossJavaeeSpec: '1.0.0.Final', weld: '1.1.1.Final',
+ slf4j: '1.5.10', log4j: '1.2.14', jbossas: '6.0.0.Final', glassfish: '3.1', cdi: '1.0-SP4',
+ hamcrest: '1.2', jbossAS7: '7.0.0.CR1'
]
repositories {
@@ -18,7 +19,9 @@ repositories {
configurations {
compileOnly
weldEmbeddedTestRuntime { extendsFrom testRuntime }
- jbossasRemoteTestRuntime { extendsFrom testRuntime, compileOnly }
+ jbossAS6RemoteTestRuntime { extendsFrom testRuntime, compileOnly }
+ jbossAS7ManagedTestRuntime { extendsFrom testRuntime, compileOnly }
+ jbossAS7RemoteTestRuntime { extendsFrom testRuntime, compileOnly }
glassfishEmbeddedTestRuntime { extendsFrom testRuntime }
}
@@ -27,8 +30,8 @@ dependencies {
compileOnly group: 'javax.enterprise', name: 'cdi-api', version: libraryVersions.cdi
testCompile group: 'junit', name: 'junit', version: libraryVersions.junit
- testCompile group: 'org.hamcrest', name: 'hamcrest-core', version: '1.2'
- testCompile group: 'org.jboss.arquillian', name: 'arquillian-junit', version: libraryVersions.arquillian
+ testCompile group: 'org.hamcrest', name: 'hamcrest-core', version: libraryVersions.hamcrest
+ testCompile group: 'org.jboss.arquillian.junit', name: 'arquillian-junit-container', version: libraryVersions.arquillian
weldEmbeddedTestRuntime group: 'org.jboss.arquillian.container', name: 'arquillian-weld-ee-embedded-1.1', version: libraryVersions.arquillian
weldEmbeddedTestRuntime group: 'org.jboss.spec', name: 'jboss-javaee-6.0', version: libraryVersions.jbossJavaeeSpec
@@ -36,11 +39,17 @@ dependencies {
weldEmbeddedTestRuntime group: 'org.slf4j', name: 'slf4j-log4j12', version: libraryVersions.slf4j
weldEmbeddedTestRuntime group: 'log4j', name: 'log4j', version: libraryVersions.log4j
- jbossasRemoteTestRuntime group: 'org.jboss.arquillian.container', name: 'arquillian-jbossas-remote-6', version: libraryVersions.arquillian
- jbossasRemoteTestRuntime group: 'org.jboss.spec', name: 'jboss-javaee-6.0', version: libraryVersions.jbossJavaeeSpec
- jbossasRemoteTestRuntime group: 'org.jboss.jbossas', name: 'jboss-as-profileservice-client', version: libraryVersions.jbossas
+ jbossAS6RemoteTestRuntime group: 'org.jboss.arquillian.container', name: 'arquillian-jbossas-remote-6', version: libraryVersions.arquillian
+ jbossAS6RemoteTestRuntime group: 'org.jboss.spec', name: 'jboss-javaee-6.0', version: libraryVersions.jbossJavaeeSpec
+ jbossAS6RemoteTestRuntime group: 'org.jboss.jbossas', name: 'jboss-as-profileservice-client', version: libraryVersions.jbossas
- glassfishEmbeddedTestRuntime group: 'org.jboss.arquillian.container', name: 'arquillian-glassfish-embedded-3.1', version: libraryVersions.arquillian
+ jbossAS7ManagedTestRuntime group: 'org.jboss.as', name: 'jboss-as-arquillian-container-managed', version: libraryVersions.jbossAS7
+ jbossAS7ManagedTestRuntime group: 'org.jboss.spec', name: 'jboss-javaee-6.0', version: libraryVersions.jbossJavaeeSpec
+
+ jbossAS7RemoteTestRuntime group: 'org.jboss.as', name: 'jboss-as-arquillian-container-remote', version: libraryVersions.jbossAS7
+ jbossAS7RemoteTestRuntime group: 'org.jboss.spec', name: 'jboss-javaee-6.0', version: libraryVersions.jbossJavaeeSpec
+
+ glassfishEmbeddedTestRuntime group: 'org.jboss.arquillian.container', name: 'arquillian-glassfish-embedded-3.1', version: '1.0.0.CR1-SNAPSHOT'
glassfishEmbeddedTestRuntime group: 'org.glassfish.extras', name: 'glassfish-embedded-all', version: libraryVersions.glassfish
}
@@ -55,7 +64,11 @@ sourceSets {
task weldEmbeddedTest(type: Test)
-task jbossasRemoteTest(type: Test)
+task jbossAS6RemoteTest(type: Test)
+
+task jbossAS7ManagedTest(type: Test)
+
+task jbossAS7RemoteTest(type: Test)
task glassfishEmbeddedTest(type: Test)
@@ -69,10 +82,10 @@ tasks.withType(Test).matching({ t-> t.name.endsWith('Test') } as Spec).each { t
test {
dependsOn { weldEmbeddedTest }
- setEnabled(false)
+ setEnabled(false) // FIXME: why is this disabled?
}
task generateWrapper(type: Wrapper) {
- gradleVersion = '0.9.2'
+ gradleVersion = '1.0-milestone-3'
jarFile = 'gradle-wrapper/gradle-wrapper.jar'
}
View
15 cdi/build.properties
@@ -2,9 +2,14 @@ maven.settings.offline=true
#maven.repo.local=${user.home}/.m2/repository
project.build.finalName=arquillian-showcase-cdi-1.0.0-SNAPSHOT
jboss.home=/home/dallen/opt/jboss-as
-version.arquillian=1.0.0.Alpha3
-version.jboss_ee6_spec=1.0.0.Beta7
-version.jbossas_60=6.0.0.20100721-M4
+version.arquillian=1.0.0.CR1
+version.cdi_spec=1.0.0.Final
+version.glassfish=3.1
+version.hamcrest=1.2
+version.jboss_javaee6_spec=1.0.0.Final
+version.jbossas_6=6.0.0.Final
+version.jbossas_7=7.0.0.CR1
version.junit=4.8.1
-version.org.apache.openejb_openejb.core=3.1.2
-version.weld_core=1.0.1-Final
+version.log4j=1.2.14
+version.slf4j=1.5.10
+version.weld_core=1.1.1.Final
View
83 cdi/build.xml
@@ -169,21 +169,84 @@
</junit>
</target>
- <target name="test-jbossas-remote"
+ <target name="test-jbossas6-remote"
depends="compile-tests"
- description="Run the test cases on a remote JBoss AS instance">
+ description="Run the test cases on a remote JBoss AS 6 instance">
<mkdir dir="${project.test.reportsOutputDirectory}"/>
- <ivy:resolve conf="test-jbossas-remote"/>
- <ivy:cachepath pathid="build.test.classpath.jbossas-remote" conf="test-jbossas-remote"/>
+ <ivy:resolve conf="test-jbossas6-remote"/>
+ <ivy:cachepath pathid="build.test.classpath.jbossas6-remote" conf="test-jbossas6-remote"/>
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" forkmode="perBatch" dir=".">
<sysproperty key="basedir" value="."/>
<formatter type="xml"/>
<formatter type="plain" usefile="${project.test.useFile}"/>
<classpath>
- <path refid="build.test.classpath.jbossas-remote"/>
+ <path refid="build.test.classpath.jbossas6-remote"/>
+ <pathelement location="${project.build.outputDirectory}"/>
+ <pathelement location="${project.build.testOutputDirectory}"/>
+ </classpath>
+ <batchtest todir="${project.test.reportsOutputDirectory}" unless="test">
+ <fileset dir="${project.testSource.directory}">
+ <include name="**/Test*.java"/>
+ <include name="**/*Test.java"/>
+ <include name="**/*TestCase.java"/>
+ <exclude name="**/*Abstract*Test.java"/>
+ </fileset>
+ </batchtest>
+ <batchtest todir="${project.test.reportsOutputDirectory}" if="test">
+ <fileset dir="${project.testSource.directory}">
+ <include name="**/${test}.java"/>
+ <exclude name="**/*Abstract*Test.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="test-jbossas7-managed"
+ depends="compile-tests"
+ description="Run the test cases on a managed JBoss AS 7 instance">
+ <mkdir dir="${project.test.reportsOutputDirectory}"/>
+ <ivy:resolve conf="test-jbossas7-managed"/>
+ <ivy:cachepath pathid="build.test.classpath.jbossas7-managed" conf="test-jbossas7-managed"/>
+ <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" forkmode="perBatch" dir=".">
+ <sysproperty key="basedir" value="."/>
+ <formatter type="xml"/>
+ <formatter type="plain" usefile="${project.test.useFile}"/>
+ <classpath>
+ <path refid="build.test.classpath.jbossas7-managed"/>
+ <pathelement location="${project.build.outputDirectory}"/>
+ <pathelement location="${project.build.testOutputDirectory}"/>
+ </classpath>
+ <batchtest todir="${project.test.reportsOutputDirectory}" unless="test">
+ <fileset dir="${project.testSource.directory}">
+ <include name="**/Test*.java"/>
+ <include name="**/*Test.java"/>
+ <include name="**/*TestCase.java"/>
+ <exclude name="**/*Abstract*Test.java"/>
+ </fileset>
+ </batchtest>
+ <batchtest todir="${project.test.reportsOutputDirectory}" if="test">
+ <fileset dir="${project.testSource.directory}">
+ <include name="**/${test}.java"/>
+ <exclude name="**/*Abstract*Test.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="test-jbossas7-remote"
+ depends="compile-tests"
+ description="Run the test cases on a remote JBoss AS 7 instance">
+ <mkdir dir="${project.test.reportsOutputDirectory}"/>
+ <ivy:resolve conf="test-jbossas7-remote"/>
+ <ivy:cachepath pathid="build.test.classpath.jbossas7-remote" conf="test-jbossas7-remote"/>
+ <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" forkmode="perBatch" dir=".">
+ <sysproperty key="basedir" value="."/>
+ <formatter type="xml"/>
+ <formatter type="plain" usefile="${project.test.useFile}"/>
+ <classpath>
+ <path refid="build.test.classpath.jbossas7-remote"/>
<pathelement location="${project.build.outputDirectory}"/>
<pathelement location="${project.build.testOutputDirectory}"/>
- <pathelement location="${basedir}/src/test/resources-jbossas"/>
</classpath>
<batchtest todir="${project.test.reportsOutputDirectory}" unless="test">
<fileset dir="${project.testSource.directory}">
@@ -259,10 +322,14 @@
<target name="dependency-report" depends="init">
<ivy:resolve conf="test-weld-embedded"/>
<ivy:report todir="${project.build.directory}/dependency-reports/test-weld-embedded" conf="test-weld-embedded"/>
+ <ivy:resolve conf="test-jbossas6-remote"/>
+ <ivy:report todir="${project.build.directory}/dependency-reports/test-jbossas6-remote" conf="test-jbossas6-remote"/>
+ <ivy:resolve conf="test-jbossas7-managed"/>
+ <ivy:report todir="${project.build.directory}/dependency-reports/test-jbossas7-managed" conf="test-jbossas7-managed"/>
+ <ivy:resolve conf="test-jbossas7-remote"/>
+ <ivy:report todir="${project.build.directory}/dependency-reports/test-jbossas7-remote" conf="test-jbossas7-remote"/>
<ivy:resolve conf="test-glassfish-embedded"/>
<ivy:report todir="${project.build.directory}/dependency-reports/test-glassfish-embedded" conf="test-glassfish-embedded"/>
- <ivy:resolve conf="test-jbossas-remote"/>
- <ivy:report todir="${project.build.directory}/dependency-reports/test-jbossas-remote" conf="test-jbossas-remote"/>
</target>
<!-- ====================================================================== -->
View
BIN  cdi/gradle-wrapper/gradle-wrapper.jar
Binary file not shown
View
4 cdi/gradle-wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sun Apr 03 19:09:51 EDT 2011
+#Sun Jul 10 15:36:09 EDT 2011
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://gradle.artifactoryonline.com/gradle/distributions/gradle-0.9.2-bin.zip
+distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-3-bin.zip
View
33 cdi/gradlew
@@ -12,16 +12,20 @@
GRADLE_APP_NAME=Gradle
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
warn ( ) {
- echo "${PROGNAME}: $*"
+ echo "$*"
}
die ( ) {
- warn "$*"
+ echo
+ echo "$*"
+ echo
exit 1
}
-
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
@@ -79,12 +83,31 @@ if [ -z "$JAVACMD" ] ; then
fi
fi
if [ ! -x "$JAVACMD" ] ; then
- die "JAVA_HOME is not defined correctly, can not execute: $JAVACMD"
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
fi
if [ -z "$JAVA_HOME" ] ; then
warn "JAVA_HOME environment variable is not set"
fi
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
# For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name
if $darwin; then
JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME"
@@ -137,7 +160,7 @@ fi
GRADLE_APP_BASE_NAME=`basename "$0"`
-"$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
+exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
-classpath "$CLASSPATH" \
-Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \
-Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
View
60 cdi/gradlew.bat
@@ -5,10 +5,6 @@
@rem ##
@rem ##########################################################################
-@rem
-@rem $Revision: 10602 $ $Date: 2008-01-25 02:49:54 +0100 (ven., 25 janv. 2008) $
-@rem
-
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@@ -19,69 +15,29 @@ if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.\
-@rem Determine the command interpreter to execute the "CD" later
-set COMMAND_COM="cmd.exe"
-if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
-if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"
+@rem Find java.exe
+set JAVA_EXE=java.exe
+if not defined JAVA_HOME goto init
-@rem Use explicit find.exe to prevent cygwin and others find.exe from being used
-set FIND_EXE="find.exe"
-if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
-if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-:check_JAVA_HOME
-@rem Make sure we have a valid JAVA_HOME
-if not "%JAVA_HOME%" == "" goto have_JAVA_HOME
+if exist "%JAVA_EXE%" goto init
echo.
-echo ERROR: Environment variable JAVA_HOME has not been set.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo.
goto end
-:have_JAVA_HOME
-@rem Validate JAVA_HOME
-%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
-if not errorlevel 1 goto init
-
-echo.
-echo ERROR: JAVA_HOME might be set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation if there are problems.
-echo.
-
:init
-@rem get name of script to launch with full path
@rem Get command-line arguments, handling Windowz variants
-SET _marker=%JAVA_HOME: =%
-@rem IF NOT "%_marker%" == "%JAVA_HOME%" ECHO JAVA_HOME "%JAVA_HOME%" contains spaces. Please change to a location without spaces if this causes problems.
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%eval[2+2]" == "4" goto 4NT_args
-IF "%_marker%" == "%JAVA_HOME%" goto :win9xME_args
-
-set _FIXPATH=
-call :fixpath "%JAVA_HOME%"
-set JAVA_HOME=%_FIXPATH:~1%
-
-goto win9xME_args
-
-:fixpath
-if not %1.==. (
-for /f "tokens=1* delims=;" %%a in (%1) do (
-call :shortfilename "%%a" & call :fixpath "%%b"
-)
-)
-goto :EOF
-:shortfilename
-for %%i in (%1) do set _FIXPATH=%_FIXPATH%;%%~fsi
-goto :EOF
-
-
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
@@ -103,10 +59,10 @@ set CMD_LINE_ARGS=%$
set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
set CLASSPATH=%DIRNAME%\gradle-wrapper\gradle-wrapper.jar
set WRAPPER_PROPERTIES=%DIRNAME%\gradle-wrapper\gradle-wrapper.properties
-set JAVA_EXE=%JAVA_HOME%\bin\java.exe
set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%"
+@rem Execute Gradle
"%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%
:end
View
39 cdi/ivy.xml
@@ -13,31 +13,40 @@
<conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
<conf name="test" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="runtime"/>
<conf name="test-weld-embedded" visibility="private" description="This scope is for executing Arquillian tests in Weld Embedded" extends="test"/>
- <conf name="test-jbossas-remote" visibility="private" description="This scope is for executing Arquillian tests on a remote JBoss AS instance" extends="test"/>
+ <conf name="test-jbossas6-remote" visibility="private" description="This scope is for executing Arquillian tests on a remote JBoss AS 6 instance" extends="test"/>
+ <conf name="test-jbossas7-managed" visibility="private" description="This scope is for executing Arquillian tests on a managed JBoss AS 7 instance" extends="test"/>
+ <conf name="test-jbossas7-remote" visibility="private" description="This scope is for executing Arquillian tests on a remote JBoss AS 7 instance" extends="test"/>
<conf name="test-glassfish-embedded" visibility="private" description="This scope is for executing Arquillian tests in Embedded GlassFish" extends="test"/>
</configurations>
<dependencies>
- <dependency org="org.jboss.spec" name="jboss-javaee-6.0" rev="1.0.0.Final" conf="compile-only->compile(*)">
+ <dependency org="org.jboss.spec" name="jboss-javaee-6.0" rev="${version.jboss_javaee6_spec}" conf="compile-only->compile(*)">
<artifact name="jboss-javaee-6.0" type="pom" ext="pom" conf=""/>
</dependency>
- <dependency org="org.jboss.arquillian" name="arquillian-junit" rev="1.0.0.Alpha5" conf="test->default(*)"/>
- <dependency org="junit" name="junit" rev="4.8.1" conf="test->default(*)"/>
+ <dependency org="org.jboss.arquillian.junit" name="arquillian-junit-container" rev="${version.arquillian}" conf="test->default(*)"/>
+ <dependency org="junit" name="junit" rev="${version.junit}" conf="test->default(*)"/>
+ <dependency org="org.hamcrest" name="hamcrest-core" rev="${version.hamcrest}" conf="test->default(*)"/>
- <dependency org="org.jboss.arquillian.container" name="arquillian-weld-ee-embedded-1.1" rev="1.0.0.Alpha5" conf="test-weld-embedded->default(*)"/>
- <dependency org="org.jboss.spec" name="jboss-javaee-6.0" rev="1.0.0.Final" conf="test-weld-embedded->compile(*)">
+ <dependency org="org.jboss.arquillian.container" name="arquillian-weld-ee-embedded-1.1" rev="${version.arquillian}" conf="test-weld-embedded->default(*)"/>
+ <dependency org="org.jboss.spec" name="jboss-javaee-6.0" rev="${version.jboss_javaee6_spec}" conf="test-weld-embedded->compile(*)">
<artifact name="jboss-javaee-6.0" type="pom" ext="pom" conf=""/>
</dependency>
- <dependency org="org.jboss.weld" name="weld-core" rev="1.1.0.Final" conf="test-weld-embedded->default(*)"/>
- <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.5.10" conf="test-weld-embedded->default(*)"/>
- <dependency org="log4j" name="log4j" rev="1.2.14" conf="test-weld-embedded->default(*)"/>
+ <dependency org="org.jboss.weld" name="weld-core" rev="${version.weld_core}" conf="test-weld-embedded->default(*)"/>
+ <dependency org="org.slf4j" name="slf4j-log4j12" rev="${version.slf4j}" conf="test-weld-embedded->default(*)"/>
+ <dependency org="log4j" name="log4j" rev="${version.log4j}" conf="test-weld-embedded->default(*)"/>
- <dependency org="org.jboss.arquillian.container" name="arquillian-jbossas-remote-6" rev="1.0.0.Alpha5" conf="test-jbossas-remote->default(*)"/>
- <dependency org="javax.enterprise" name="cdi-api" rev="1.0-SP4" conf="test-jbossas-remote->default(*)"/>
- <dependency org="org.jboss.jbossas" name="jboss-as-server" m:classifier="client" rev="6.0.0.Final" conf="test-jbossas-remote->default(*)" transitive="false"/>
- <dependency org="org.jboss.jbossas" name="jboss-as-profileservice" m:classifier="client" rev="6.0.0.Final" conf="test-jbossas-remote->default(*)"/>
+ <dependency org="org.jboss.arquillian.container" name="arquillian-jbossas-remote-6" rev="${version.arquillian}" conf="test-jbossas6-remote->default(*)"/>
+ <dependency org="javax.enterprise" name="cdi-api" rev="${version.cdi_spec}" conf="test-jbossas6-remote->default(*)"/>
+ <dependency org="org.jboss.jbossas" name="jboss-as-server" m:classifier="client" rev="${version.jbossas_6}" conf="test-jbossas6-remote->default(*)" transitive="false"/>
+ <dependency org="org.jboss.jbossas" name="jboss-as-profileservice" m:classifier="client" rev="${version.jbossas_6}" conf="test-jbossas6-remote->default(*)"/>
- <dependency org="org.jboss.arquillian.container" name="arquillian-glassfish-embedded-3" rev="1.0.0.Alpha5" conf="test-glassfish-embedded->default(*)"/>
- <dependency org="org.glassfish.extras" name="glassfish-embedded-all" rev="3.1" conf="test-glassfish-embedded->default(*)"/>
+ <dependency org="org.jboss.as" name="jboss-as-arquillian-container-managed" rev="${version.jbossas_7}" conf="test-jbossas7-managed->default(*)"/>
+ <dependency org="javax.enterprise" name="cdi-api" rev="${version.cdi_spec}" conf="test-jbossas7-managed->default(*)"/>
+
+ <dependency org="org.jboss.as" name="jboss-as-arquillian-container-remote" rev="${version.jbossas_7}" conf="test-jbossas7-remote->default(*)"/>
+ <dependency org="javax.enterprise" name="cdi-api" rev="${version.cdi_spec}" conf="test-jbossas7-remote->default(*)"/>
+
+ <dependency org="org.jboss.arquillian.container" name="arquillian-glassfish-embedded-3" rev="${version.arquillian}" conf="test-glassfish-embedded->default(*)"/>
+ <dependency org="org.glassfish.extras" name="glassfish-embedded-all" rev="${version.glassfish}" conf="test-glassfish-embedded->default(*)"/>
</dependencies>
</ivy-module>
View
1  cdi/ivysettings.xml
@@ -5,6 +5,7 @@
<chain name="default">
<ibiblio name="maven2" m2compatible="true"/>
<ibiblio name="jboss-public" m2compatible="true" checksums="" root="http://repository.jboss.org/nexus/content/groups/public"/>
+ <!-- QUESTION: do we need the legacy repo anymore? -->
<ibiblio name="jboss-legacy" m2compatible="true" root="http://repository.jboss.org/maven2"/>
</chain>
</resolvers>
View
278 cdi/pom.xml
@@ -18,8 +18,8 @@
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian</groupId>
- <artifactId>arquillian-junit</artifactId>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -32,46 +32,22 @@
</dependencies>
<profiles>
+
<profile>
<id>arq-weld-se-embedded</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-weld-se-embedded-1.1</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec.javax.el</groupId>
- <artifactId>jboss-el-api_2.2_spec</artifactId>
- <version>1.0.0.Final</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>container-bom-weld-se-embedded-1.1</artifactId>
+ <type>pom</type>
+ <scope>test</scope>
</dependency>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
+ <groupId>org.jboss.spec</groupId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
+ <type>pom</type>
</dependency>
</dependencies>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-core-bom</artifactId>
- <version>${version.weld}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
<build>
<plugins>
<plugin>
@@ -95,114 +71,31 @@
</activation>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
- </dependency>
- <!-- import the entire Java EE 6 API -->
- <dependency>
- <groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
- <type>pom</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
- </dependencies>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-core-bom</artifactId>
- <version>${version.weld}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- </profile>
-
- <profile>
- <id>arq-jbossas-remote-6</id>
- <dependencies>
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-remote-6</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>container-bom-weld-ee-embedded-1.1</artifactId>
<type>pom</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-profileservice-client</artifactId>
- <type>pom</type>
- </dependency>
- <!-- jboss-deployers-client-spi provides deployment exception class -->
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-client-spi</artifactId>
- <version>2.2.0.GA</version>
- <scope>test</scope>
- </dependency>
- <!--
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-core</artifactId>
- <version>1.1.0.Final</version>
<scope>test</scope>
</dependency>
- -->
- </dependencies>
- </profile>
-
- <profile>
- <id>arq-jbossas-managed-6</id>
- <dependencies>
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-managed-6</artifactId>
- </dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
- <type>pom</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-profileservice-client</artifactId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
<type>pom</type>
</dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-server-manager</artifactId>
- </dependency>
</dependencies>
</profile>
<profile>
- <id>arq-jbossas-remote-7</id>
+ <id>arq-owb-embedded</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-remote-7</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-controller-client</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>container-bom-openwebbeans-embedded-1</artifactId>
+ <type>pom</type>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
<type>pom</type>
</dependency>
</dependencies>
@@ -212,7 +105,8 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <exclude>com/acme/cdi/payment/SynchronousPaymentProcessorTestCase.java</exclude>
+ <exclude>**/AmbiguousDependencyTestCase.java</exclude>
+ <exclude>**/BeanManagerInitializedTestCase.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -224,72 +118,50 @@
<id>arq-jbossas-managed-7</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-managed-7</artifactId>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-managed</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
<type>pom</type>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <property>
- <name>jboss.home</name>
- <value>${user.home}/opt/jboss-as7</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
</profile>
<profile>
- <id>arq-owb-embedded</id>
+ <id>arq-jbossas-remote-7</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-openwebbeans-embedded-1</artifactId>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-remote</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
<type>pom</type>
</dependency>
+ </dependencies>
+ </profile>
+
+ <profile>
+ <id>arq-glassfish-embedded</id>
+ <dependencies>
<dependency>
- <groupId>org.apache.openwebbeans</groupId>
- <artifactId>openwebbeans-spi</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.openwebbeans</groupId>
- <artifactId>openwebbeans-impl</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>container-bom-glassfish-embedded-3.1</artifactId>
+ <type>pom</type>
+ <scope>test</scope>
</dependency>
</dependencies>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.openwebbeans</groupId>
- <artifactId>openwebbeans</artifactId>
- <version>${version.openwebbeans}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <!-- exclude failing test; compliance issue? -->
<excludes>
- <exclude>**/BeanManagerInitializedTestCase.java</exclude>
+ <exclude>**/AmbiguousDependencyTestCase.java</exclude>
+ <exclude>**/SynchronousPaymentProcessorTestCase.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -298,84 +170,24 @@
</profile>
<profile>
- <id>arq-glassfish-embedded</id>
- <dependencies>
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish.extras</groupId>
- <artifactId>glassfish-embedded-all</artifactId>
- </dependency>
- </dependencies>
- </profile>
-
- <profile>
<id>arq-glassfish-remote</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-glassfish-remote-3.1</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>container-bom-glassfish-remote-3.1</artifactId>
<type>pom</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-api</artifactId>
- <version>1.1.Final</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-bundle</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey.contribs</groupId>
- <artifactId>jersey-multipart</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </profile>
-
- <!--
- <profile>
- <id>arq-as7-managed</id>
- <dependencies>
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-arquillian-container-managed</artifactId>
- <version>7.0.0.Beta2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
<type>pom</type>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <property>
- <name>jboss.home</name>
- <value>/home/dallen/opt/jboss-as7</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
</profile>
- -->
+
</profiles>
+
<!--
vi:ts=4:sw=4:expandtab:
-->
View
6 cdi/src/test/java/com/acme/cdi/BeanManagerTestCase.java
@@ -22,7 +22,7 @@
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
@@ -45,6 +45,7 @@ public static JavaArchive createTestArchive() {
public void testCdiBootstrap() {
assertNotNull(beanManager);
assertFalse(beanManager.getBeans(BeanManager.class).isEmpty());
+ printCdiImplementationInfo(beanManager);
}
protected void printCdiImplementationInfo(BeanManager beanManager) {
@@ -52,6 +53,5 @@ protected void printCdiImplementationInfo(BeanManager beanManager) {
if (impl != null) {
System.out.println("CDI implementation: " + impl.replaceFirst("^([^ ]+)( .*)?$", "$1"));
}
- System.out.println("BeanManager implementation class: " + beanManager.getClass().getName());
- }
+ }
}
View
2  cdi/src/test/java/com/acme/cdi/GreeterManagedBeanTestCase.java
@@ -18,7 +18,7 @@
import javax.inject.Inject;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
View
2  cdi/src/test/java/com/acme/cdi/decorator/AnnouncerDecoratorTest.java
@@ -4,7 +4,7 @@
import junit.framework.Assert;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
View
2  cdi/src/test/java/com/acme/cdi/event/BeanManagerInitializedTestCase.java
@@ -4,7 +4,7 @@
import javax.enterprise.inject.spi.Extension;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
View
2  cdi/src/test/java/com/acme/cdi/event/DocumentEventTestCase.java
@@ -5,7 +5,7 @@
import javax.inject.Inject;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
View
2  cdi/src/test/java/com/acme/cdi/event/PacketSendReceiveTestCase.java
@@ -8,7 +8,7 @@
import javax.enterprise.inject.Instance;
import javax.inject.Inject;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
View
4 cdi/src/test/java/com/acme/cdi/failure/AmbiguousDependencyTestCase.java
@@ -1,7 +1,7 @@
package com.acme.cdi.failure;
-import org.jboss.arquillian.api.Deployment;
-import org.jboss.arquillian.api.ShouldThrowException;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.ShouldThrowException;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
View
2  cdi/src/test/java/com/acme/cdi/measurement/TemperatureConverterTestCase.java
@@ -5,7 +5,7 @@
import javax.inject.Inject;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
View
24 cdi/src/test/java/com/acme/cdi/payment/SynchronousPaymentProcessorTestCase.java
@@ -20,11 +20,12 @@
import javax.inject.Inject;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.descriptor.api.Descriptors;
import org.jboss.shrinkwrap.descriptor.api.spec.cdi.beans.BeansDescriptor;
import org.junit.Test;
@@ -66,13 +67,18 @@ public void shouldBeReplacedByAMock() throws Exception {
assertEquals(secondPayment, MockPaymentProcessor.PAYMENTS.get(1));
}
+
+
+
+
// Use this deployment for GlassFish due to visibility issues
- /*
- * @Deployment public static WebArchive createDeployment() { BeansDescriptor beansXml =
- * Descriptors.create(BeansDescriptor.class);
- *
- * return ShrinkWrap.create(WebArchive.class) .addAsWebInfResource(new
- * StringAsset(beansXml.alternativeClass(MockPaymentProcessor.class).exportAsString()), beansXml.getDescriptorName())
- * .addPackage(Synchronous.class.getPackage()); }
- */
+ //@Deployment
+ public static WebArchive createDeploymentForGlassFish() {
+ BeansDescriptor beansXml = Descriptors.create(BeansDescriptor.class);
+
+ return ShrinkWrap.create(WebArchive.class)
+ .addAsWebInfResource(new StringAsset(beansXml.alternativeClass(MockPaymentProcessor.class).exportAsString()),
+ beansXml.getDescriptorName()).addPackage(Synchronous.class.getPackage());
+ }
+
}
View
2  cdi/src/test/java/com/acme/cdi/random/RandomTestCase.java
@@ -20,7 +20,7 @@
import javax.inject.Inject;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
View
2  cdi/src/test/java/com/acme/cdi/singleton/JavaxInjectSingletonTestCase.java
@@ -21,7 +21,7 @@
import junit.framework.Assert;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
View
2  cdi/src/test/java/com/acme/cdi/translate/TextTranslatorServiceTestCase.java
@@ -18,7 +18,7 @@
import javax.inject.Inject;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
View
12 cdi/src/test/resources/arquillian.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian xmlns="http://jboss.org/schema/arquillian"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+ <container qualifier="jbossas-remote-7" default="true">
+ <protocol type="jmx-as7">
+ <property name="executionType">REMOTE</property>
+ </protocol>
+ </container>
+
+</arquillian>
View
4 cdi/src/test/resources/log4j.properties
@@ -1,7 +1,7 @@
-log4j.rootLogger=INFO, stdout
+log4j.rootLogger=DEBUG, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%p [%c] %m %n
-#log4j.logger.org.jboss.weld.Bootstrap=DEBUG
View
142 ejb/pom.xml
@@ -17,14 +17,8 @@
<dependencies>
<dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian</groupId>
- <artifactId>arquillian-junit</artifactId>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -40,12 +34,10 @@
</activation>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-openejb-embedded-3.1</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.openejb</groupId>
- <artifactId>openejb-core</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>container-bom-openejb-embedded-3.1</artifactId>
+ <type>pom</type>
+ <scope>test</scope>
</dependency>
</dependencies>
<build>
@@ -64,54 +56,17 @@
</profile>
<profile>
- <id>arq-jbossas-remote-6</id>
- <dependencies>
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-remote-6</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec.javax.ejb</groupId>
- <artifactId>jboss-ejb-api_3.1_spec</artifactId>
- <version>1.0.0.Final</version>
- <scope>provided</scope>
- </dependency>
- <!-- cdi api needed for arquillian to function -->
- <dependency>
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- <version>1.0-SP4</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-profileservice-client</artifactId>
- <type>pom</type>
- </dependency>
- </dependencies>
- </profile>
-
- <profile>
- <id>arq-jbossas-managed-6</id>
+ <id>arq-jbossas-managed-7</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-managed-6</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec.javax.ejb</groupId>
- <artifactId>jboss-ejb-api_3.1_spec</artifactId>
- <version>1.0.0.Final</version>
- <scope>provided</scope>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-managed</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-profileservice-client</artifactId>
+ <groupId>org.jboss.spec</groupId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
<type>pom</type>
</dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-server-manager</artifactId>
- </dependency>
</dependencies>
</profile>
@@ -119,93 +74,36 @@
<id>arq-jbossas-remote-7</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-remote-7</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-controller-client</artifactId>
+ <artifactId>jboss-as-arquillian-container-remote</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
<type>pom</type>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>com/acme/ejb/TemperatureConverterTestCase.java</exclude>
- <exclude>com/acme/ejb/calc/*</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
</profile>
<profile>
<id>arq-glassfish-embedded</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish.extras</groupId>
- <artifactId>glassfish-embedded-all</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>container-bom-glassfish-embedded-3.1</artifactId>
+ <type>pom</type>
+ <scope>test</scope>
</dependency>
</dependencies>
- <!--
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <property>
- <name>arquillian.launch</name>
- <value>glassfish-embedded</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
- -->
</profile>
<profile>
<id>arq-glassfish-remote</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-glassfish-remote-3.1</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec.javax.ejb</groupId>
- <artifactId>jboss-ejb-api_3.1_spec</artifactId>
- <version>1.0.0.Final</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-api</artifactId>
- <version>1.1.Final</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-bundle</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey.contribs</groupId>
- <artifactId>jersey-multipart</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>container-bom-glassfish-remote-3.1</artifactId>
+ <type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
View
5 ejb/src/test/java/com/acme/ejb/GreeterTestCase.java
@@ -18,7 +18,7 @@
import javax.ejb.EJB;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
@@ -30,7 +30,8 @@
public class GreeterTestCase {
@Deployment
public static JavaArchive createDeployment() {
- return ShrinkWrap.create(JavaArchive.class)
+ // explicit archive name required until ARQ-77 is resolved
+ return ShrinkWrap.create(JavaArchive.class, "test.jar")
.addClasses(Greeter.class, GreeterBean.class);
}
View
3  ejb/src/test/java/com/acme/ejb/TemperatureConverterTestCase.java
@@ -21,7 +21,7 @@
import javax.ejb.EJB;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
@@ -32,6 +32,7 @@
public class TemperatureConverterTestCase {
@Deployment
public static JavaArchive createDeployment() {
+ // explicit archive name required until ARQ-77 is resolved
return ShrinkWrap.create(JavaArchive.class, "test.jar")
.addClasses(TemperatureConverter.class, TemperatureConverterBean.class);
}
View
3  ejb/src/test/java/com/acme/ejb/calc/MortgageCalculatorEnvEntryTestCase.java
@@ -6,7 +6,7 @@
import junit.framework.Assert;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -19,6 +19,7 @@
@Deployment
public static Archive<?> createDeployment() {
// we have to create a war because ejb-jar.xml must be put in WEB-INF
+ // explicit archive name required until ARQ-77 is resolved
return ShrinkWrap.create(WebArchive.class, "test.war")
.addClasses(MortgageCalculator.class, MortgageCalculatorBean.class)
.addAsWebInfResource("interest-rate-ejb-jar.xml", "ejb-jar.xml");
View
5 ejb/src/test/java/com/acme/ejb/calc/MortgageCalculatorTestCase.java
@@ -3,7 +3,7 @@
import java.math.BigDecimal;
import javax.ejb.EJB;
import junit.framework.Assert;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
@@ -14,7 +14,8 @@
public class MortgageCalculatorTestCase {
@Deployment
public static JavaArchive createDeployment() {
- return ShrinkWrap.create(JavaArchive.class)
+ // explicit archive name required until ARQ-77 is resolved
+ return ShrinkWrap.create(JavaArchive.class, "test.jar")
.addClasses(MortgageCalculator.class, MortgageCalculatorBean.class);
}
View
5 ejb/src/test/java/com/acme/ejb/nointerface/NoInterfaceEJBTestCase.java
@@ -21,7 +21,7 @@
import javax.ejb.EJB;
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
@@ -38,7 +38,8 @@
public class NoInterfaceEJBTestCase {
@Deployment
public static JavaArchive createDeployment() {
- return ShrinkWrap.create(JavaArchive.class).addClass(NoInterfaceEJB.class);
+ // explicit archive name required until ARQ-77 is resolved
+ return ShrinkWrap.create(JavaArchive.class, "test.jar").addClass(NoInterfaceEJB.class);
}
@EJB
View
10 ejb/src/test/resources/arquillian.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<arquillian xmlns="http://jboss.com/arquillian"
+<arquillian xmlns="http://jboss.org/schema/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian-1.0.xsd">
+ xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<!-- Uncomment to have test archives exported to the file system for inspection.
This feature can also be controlled using the system property arquillian.deploymentExportPath -->
@@ -10,6 +10,12 @@
<property name="deploymentExportPath">target</property>
</engine>
-->
+
+ <container qualifier="jbossas-remote-7" default="true">
+ <protocol type="jmx-as7">
+ <property name="executionType">REMOTE</property>
+ </protocol>
+ </container>
<container qualifier="glassfish-embedded">
<configuration>
View
121 jaxrs/pom.xml
@@ -17,16 +17,8 @@
<dependencies>
<dependency>
- <groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
- <type>pom</type>
- </dependency>
-
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
- <version>1.1.1.Final</version>
- <scope>provided</scope>
</dependency>
<dependency>
@@ -35,62 +27,32 @@
</dependency>
<dependency>
- <groupId>org.jboss.arquillian</groupId>
- <artifactId>arquillian-junit</artifactId>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
- <version>${version.resteasy}</version>
- <scope>test</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <!-- Compiler plugin enforces Java 1.6 compatibility and activates annotation processors -->
- <!-- FIXME not generating correctly from the commandline -->
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.1</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
<profiles>
+
<profile>
- <id>default</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>arq-glassfish-embedded</id>
+ <id>arq-jbossas-remote-6</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>container-bom-jbossas-remote-6</artifactId>
+ <type>pom</type>
+ <scope>test</scope>
</dependency>
- <!-- This imports the Java EE 6 runtime provided by GlassFish Embedded -->
<dependency>
- <groupId>org.glassfish.extras</groupId>
- <artifactId>glassfish-embedded-all</artifactId>
+ <groupId>org.jboss.spec</groupId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
+ <type>pom</type>
</dependency>
</dependencies>
<build>
@@ -99,21 +61,25 @@
<directory>src/test/resources</directory>
</testResource>
<testResource>
- <directory>src/test/resources-glassfish-embedded</directory>
+ <directory>src/test/resources-jbossas-6</directory>
</testResource>
</testResources>
</build>
</profile>
+
<profile>
- <id>arq-jbossas-remote-6</id>
+ <id>arq-jbossas-managed-7</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-remote-6</artifactId>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-managed</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-profileservice-client</artifactId>
+ <groupId>org.jboss.spec</groupId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
<type>pom</type>
</dependency>
</dependencies>
@@ -123,28 +89,59 @@
<directory>src/test/resources</directory>
</testResource>
<testResource>
- <directory>src/test/resources-jbossas</directory>
+ <directory>src/test/resources-jbossas-7</directory>
</testResource>
</testResources>
</build>
</profile>
+
<profile>
<id>arq-jbossas-remote-7</id>
<dependencies>
<dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-remote-7</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-controller-client</artifactId>
+ <artifactId>jboss-as-arquillian-container-remote</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
<type>pom</type>
</dependency>
</dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ </testResource>
+ <testResource>
+ <directory>src/test/resources-jbossas-7</directory>
+ </testResource>
+ </testResources>
+ </build>
+ </profile>
+
+ <profile>
+ <!-- Fails because no seed data is imported -->
+ <id>arq-glassfish-embedded</id>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>container-bom-glassfish-embedded-3.1</artifactId>
+ <type>pom</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ </testResource>
+ <testResource>
+ <directory>src/test/resources-glassfish-embedded</directory>
+ </testResource>
+ </testResources>
+ </build>
</profile>
+
</profiles>
</project>
View
11 jaxrs/src/test/java/com/acme/jaxrs/CustomerResourceClientTest.java
@@ -7,10 +7,10 @@
import junit.framework.Assert;
-import org.jboss.arquillian.api.ArquillianResource;
-import org.jboss.arquillian.api.Deployment;
-import org.jboss.arquillian.api.RunAsClient;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.resteasy.client.ClientRequest;
import org.jboss.resteasy.client.ClientResponse;
import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -29,11 +29,11 @@
public class CustomerResourceClientTest {
private static final String RESOURCE_PREFIX = JaxRsActivator.class.getAnnotation(ApplicationPath.class).value().substring(1);
- @Deployment
+ @Deployment(testable = false)
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class, "test.war").addPackage(Customer.class.getPackage())
.addClasses(EntityManagerProducer.class, CustomerResource.class, JaxRsActivator.class)
- // .addAsManifestResource("test-persistence.xml", "persistence.xml")
+ //.addAsManifestResource("test-persistence.xml", "persistence.xml")
.addAsResource("test-persistence.xml", "META-INF/persistence.xml")
.addAsResource("import.sql")
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
@@ -44,6 +44,7 @@ public static WebArchive createDeployment() {
@Test
public void testGetCustomerByIdUsingClientRequest() throws Exception {
+ //deploymentUrl = new URL("http://localhost:8180/test/");
// GET http://localhost:8080/test/rest/customer/1
ClientRequest request = new ClientRequest(deploymentUrl.toString() + RESOURCE_PREFIX + "/customer/1");
request.header("Accept", MediaType.APPLICATION_XML);
View
8 jaxrs/src/test/java/com/acme/jaxrs/CustomerResourceRESTEasyClientTest.java
@@ -7,10 +7,10 @@
import javax.ws.rs.ApplicationPath;
-import org.jboss.arquillian.api.ArquillianResource;
-import org.jboss.arquillian.api.Deployment;
-import org.jboss.arquillian.api.RunAsClient;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.resteasy.client.ProxyFactory;
import org.jboss.resteasy.plugins.providers.RegisterBuiltin;
import org.jboss.resteasy.spi.ResteasyProviderFactory;
@@ -32,7 +32,7 @@
public class CustomerResourceRESTEasyClientTest {