deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ch...@apache.org
Subject [3/5] git commit: DELTASPIKE-497 Fixed data module tests to work on build-managed Glassfish
Date Wed, 15 Jan 2014 11:36:11 GMT
DELTASPIKE-497 Fixed data module tests to work on build-managed Glassfish


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

Branch: refs/heads/master
Commit: e56e5467e931b2967bd4496e68cc80ec617b3184
Parents: 1550c88
Author: Christian Kaltepoth <chkal@apache.org>
Authored: Wed Jan 15 06:49:08 2014 +0100
Committer: Christian Kaltepoth <chkal@apache.org>
Committed: Wed Jan 15 06:49:08 2014 +0100

----------------------------------------------------------------------
 deltaspike/modules/data/impl/pom.xml            | 26 ++++++++++++++++++++
 .../data/test/util/TestDeployments.java         | 13 ++++++++++
 deltaspike/parent/code/pom.xml                  | 24 ++++++++++++++++--
 3 files changed, 61 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/e56e5467/deltaspike/modules/data/impl/pom.xml
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/impl/pom.xml b/deltaspike/modules/data/impl/pom.xml
index ca4b150..7b262fb 100755
--- a/deltaspike/modules/data/impl/pom.xml
+++ b/deltaspike/modules/data/impl/pom.xml
@@ -217,6 +217,32 @@
             </build>
         </profile>
         <profile>
+            <id>glassfish-build-managed-3</id>
+            <build>
+                <testResources>
+                    <testResource>
+                        <directory>src/test/resources</directory>
+                    </testResource>
+                    <testResource>
+                        <directory>src/test/resources-glassfish</directory>
+                    </testResource>
+                </testResources>
+            </build>
+        </profile>
+        <profile>
+            <id>glassfish-build-managed-4</id>
+            <build>
+                <testResources>
+                    <testResource>
+                        <directory>src/test/resources</directory>
+                    </testResource>
+                    <testResource>
+                        <directory>src/test/resources-glassfish</directory>
+                    </testResource>
+                </testResources>
+            </build>
+        </profile>
+        <profile>
             <id>tomee-build-managed</id>
             <build>
                 <testResources>

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/e56e5467/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 64042f4..d002913 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
@@ -152,6 +152,19 @@ public abstract class TestDeployments
             }
         }
 
+        /*
+         * We need to add Javassist in case of Glassfish for the partial beans to work correctly.
But as Javassist is
+         * not on the test classpath like for the OWB and TomEE profiles, it is added using
the Shrinkwrap Maven
+         * resolver.
+         */
+        if (CdiContainerUnderTest.is("glassfish-.*"))
+        {
+            webArchive.addAsLibraries(Maven.resolver()
+                    .resolve("javassist:javassist:3.12.0.GA")
+                    .withTransitivity()
+                    .asFile());
+        }
+
         return webArchive;
     }
 

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/e56e5467/deltaspike/parent/code/pom.xml
----------------------------------------------------------------------
diff --git a/deltaspike/parent/code/pom.xml b/deltaspike/parent/code/pom.xml
index 25953fc..278e88c 100644
--- a/deltaspike/parent/code/pom.xml
+++ b/deltaspike/parent/code/pom.xml
@@ -1007,7 +1007,7 @@
             <id>glassfish-build-managed-3</id>
 
             <properties>
-                <cdicontainer.version>weld-1.1.8</cdicontainer.version>
+                <cdicontainer.version>glassfish-${glassfish3.version}</cdicontainer.version>
             </properties>
 
             <dependencies>
@@ -1111,6 +1111,16 @@
                                         <replace
                                             file="${container.unpack.directory}/glassfish3/glassfish/domains/domain1/config/domain.xml"
                                             token="port=&quot;7676&quot;" value="port=&quot;37676&quot;"
/>
+
+                                        <!-- Replace the default datasource with an in-memory
one -->
+                                        <replace
+                                            file="${container.unpack.directory}/glassfish3/glassfish/domains/domain1/config/domain.xml"
+                                            token="datasource-classname=&quot;org.apache.derby.jdbc.ClientDataSource&quot;"
+                                            value="datasource-classname=&quot;org.apache.derby.jdbc.EmbeddedDataSource&quot;"
/>
+                                        <replace
+                                            file="${container.unpack.directory}/glassfish3/glassfish/domains/domain1/config/domain.xml"
+                                            token="value=&quot;sun-appserv-samples&quot;"
value="value=&quot;memory:deltaspike&quot;" />
+
                                     </target>
                                 </configuration>
                             </execution>
@@ -1131,7 +1141,7 @@
             <id>glassfish-build-managed-4</id>
 
             <properties>
-                <cdicontainer.version>weld-2.0.0.SP1</cdicontainer.version>
+                <cdicontainer.version>glassfish-${glassfish4.version}</cdicontainer.version>
             </properties>
 
             <dependencies>
@@ -1236,6 +1246,16 @@
                                         <replace
                                             file="${container.unpack.directory}/glassfish4/glassfish/domains/domain1/config/domain.xml"
                                             token="value=&quot;7676&quot;" value="value=&quot;27676&quot;"
/>
+
+                                        <!-- Replace the default datasource with an in-memory
one -->
+                                        <replace
+                                            file="${container.unpack.directory}/glassfish4/glassfish/domains/domain1/config/domain.xml"
+                                            token="datasource-classname=&quot;org.apache.derby.jdbc.ClientDataSource&quot;"
+                                            value="datasource-classname=&quot;org.apache.derby.jdbc.EmbeddedDataSource&quot;"
/>
+                                        <replace
+                                            file="${container.unpack.directory}/glassfish4/glassfish/domains/domain1/config/domain.xml"
+                                            token="value=&quot;sun-appserv-samples&quot;"
value="value=&quot;memory:deltaspike&quot;" />
+
                                     </target>
                                 </configuration>
                             </execution>


Mime
View raw message