deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject [3/3] git commit: DELTASPIKE-380 add javassist to @Deployment for some containers
Date Wed, 28 Aug 2013 20:51:14 GMT
DELTASPIKE-380 add javassist to @Deployment for some containers


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/a37851c6
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/a37851c6
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/a37851c6

Branch: refs/heads/master
Commit: a37851c6aba102d30e6acc33ac5c2098af7ac3eb
Parents: ce7f1b2
Author: Mark Struberg <struberg@apache.org>
Authored: Wed Aug 28 22:41:25 2013 +0200
Committer: Mark Struberg <struberg@apache.org>
Committed: Wed Aug 28 22:41:25 2013 +0200

----------------------------------------------------------------------
 .../deltaspike/data/test/util/TestDeployments.java     | 12 +++++++++++-
 .../uc002/PartialBeanAsAbstractClassTest.java          | 13 ++++++++++++-
 2 files changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/a37851c6/deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/test/util/TestDeployments.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/test/util/TestDeployments.java
b/deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/test/util/TestDeployments.java
index 77431fa..b55b1e4 100755
--- a/deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/test/util/TestDeployments.java
+++ b/deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/test/util/TestDeployments.java
@@ -51,6 +51,7 @@ import org.apache.deltaspike.data.spi.QueryInvocationContext;
 import org.apache.deltaspike.data.test.TransactionalTestCase;
 import org.apache.deltaspike.data.test.domain.AuditedEntity;
 import org.apache.deltaspike.test.category.WebProfileCategory;
+import org.apache.deltaspike.test.utils.CdiContainerUnderTest;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ArchivePath;
 import org.jboss.shrinkwrap.api.ArchivePaths;
@@ -126,7 +127,7 @@ public abstract class TestDeployments
 
     public static WebArchive addDependencies(WebArchive archive)
     {
-        return archive.addAsLibraries(
+        WebArchive webArchive= archive.addAsLibraries(
                 Maven.resolver().loadPomFromFile("pom.xml").resolve(
                         "org.apache.deltaspike.core:deltaspike-core-api",
                         "org.apache.deltaspike.core:deltaspike-core-impl",
@@ -134,6 +135,15 @@ public abstract class TestDeployments
                         "org.apache.deltaspike.modules:deltaspike-partial-bean-module-impl")
                         .withTransitivity()
                         .asFile());
+        if (CdiContainerUnderTest.is("owb-.*") ||
+            CdiContainerUnderTest.is("tomee-.*"))
+        {
+            JavaArchive javassistJar = ShrinkWrap.create(JavaArchive.class, "dsjavassist.jar")
+                    .addPackages(true, "javassist");
+            webArchive.addAsLibrary(javassistJar);
+        }
+
+        return webArchive;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/a37851c6/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc002/PartialBeanAsAbstractClassTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc002/PartialBeanAsAbstractClassTest.java
b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc002/PartialBeanAsAbstractClassTest.java
index eec97c3..3373ca1 100644
--- a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc002/PartialBeanAsAbstractClassTest.java
+++ b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc002/PartialBeanAsAbstractClassTest.java
@@ -20,6 +20,7 @@ package org.apache.deltaspike.test.core.api.partialbean.uc002;
 
 import org.apache.deltaspike.test.core.api.partialbean.shared.TestPartialBeanBinding;
 import org.apache.deltaspike.test.core.api.partialbean.util.ArchiveUtils;
+import org.apache.deltaspike.test.utils.CdiContainerUnderTest;
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -49,10 +50,20 @@ public class PartialBeanAsAbstractClassTest
                 .addPackage(TestPartialBeanBinding.class.getPackage())
                 .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
 
-        return ShrinkWrap.create(WebArchive.class, archiveName + ".war")
+        WebArchive webArchive =  ShrinkWrap.create(WebArchive.class, archiveName + ".war")
                 .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreAndPartialBeanArchive())
                 .addAsLibraries(testJar)
                 .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
+
+        if (CdiContainerUnderTest.is("owb-.*") ||
+            CdiContainerUnderTest.is("tomee-.*"))
+        {
+            JavaArchive javassistJar = ShrinkWrap.create(JavaArchive.class, "dsjavassist.jar")
+                    .addPackages(true, "javassist");
+            webArchive.addAsLibrary(javassistJar);
+        }
+
+        return webArchive;
     }
 
     @Test


Mime
View raw message