Author: mfranklin
Date: Fri Dec 28 19:49:31 2012
New Revision: 1426613

URL: http://svn.apache.org/viewvc?rev=1426613&view=rev
Log:
Fixed build issue with integration tests under mongo profile

Added:
    
rave/branches/mongo/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/db/
    rave/branches/mongo/rave-portal/src/test/resources_jpa/
    rave/branches/mongo/rave-portal/src/test/resources_jpa/test-data.sql   
(props changed)
      - copied unchanged from r1426593, 
rave/branches/mongo/rave-portal/src/test/resources/test-data.sql
    rave/branches/mongo/rave-portal/src/test/resources_jpa/test-dataContext.xml 
  (props changed)
      - copied unchanged from r1426551, 
rave/branches/mongo/rave-portal/src/test/resources/test-dataContext.xml
    rave/branches/mongo/rave-portal/src/test/resources_mongo/
    rave/branches/mongo/rave-portal/src/test/resources_mongo/initial-data.json
      - copied unchanged from r1426551, 
rave/branches/mongo/rave-portal-resources/src/main/resources/initial-data.json
    
rave/branches/mongo/rave-portal/src/test/resources_mongo/test-dataContext.xml
Removed:
    rave/branches/mongo/rave-portal/src/test/resources/test-data.sql
    rave/branches/mongo/rave-portal/src/test/resources/test-dataContext.xml
Modified:
    rave/branches/mongo/pom.xml
    rave/branches/mongo/rave-components/rave-mongodb/pom.xml
    
rave/branches/mongo/rave-portal-resources/src/main/webapp/WEB-INF/dataContext.xml
    rave/branches/mongo/rave-portal/pom.xml

Modified: rave/branches/mongo/pom.xml
URL: 
http://svn.apache.org/viewvc/rave/branches/mongo/pom.xml?rev=1426613&r1=1426612&r2=1426613&view=diff
==============================================================================
--- rave/branches/mongo/pom.xml (original)
+++ rave/branches/mongo/pom.xml Fri Dec 28 19:49:31 2012
@@ -79,6 +79,7 @@
         <javax.activation.version>1.1.1</javax.activation.version>
         <freemarker.version>2.3.19</freemarker.version>
         <org.mongodb.driver.version>2.9.1</org.mongodb.driver.version>
+        
<de.flapdoodle.embed.mongo.version>1.28</de.flapdoodle.embed.mongo.version>
         <!-- The location of Rave's H2 file DB. No trailing / -->
         <rave.database.location>/tmp/rave_db</rave.database.location>
 
@@ -358,6 +359,11 @@
                 <artifactId>mongo-java-driver</artifactId>
                 <version>${org.mongodb.driver.version}</version>
             </dependency>
+            <dependency>
+                <groupId>de.flapdoodle.embed</groupId>
+                <artifactId>de.flapdoodle.embed.mongo</artifactId>
+                <version>${de.flapdoodle.embed.mongo.version}</version>
+            </dependency>
 
             <dependency>
                 <groupId>com.sun.jersey</groupId>

Modified: rave/branches/mongo/rave-components/rave-mongodb/pom.xml
URL: 
http://svn.apache.org/viewvc/rave/branches/mongo/rave-components/rave-mongodb/pom.xml?rev=1426613&r1=1426612&r2=1426613&view=diff
==============================================================================
--- rave/branches/mongo/rave-components/rave-mongodb/pom.xml (original)
+++ rave/branches/mongo/rave-components/rave-mongodb/pom.xml Fri Dec 28 
19:49:31 2012
@@ -85,6 +85,11 @@
             <artifactId>jackson-mrbean</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>de.flapdoodle.embed</groupId>
+            <artifactId>de.flapdoodle.embed.mongo</artifactId>
+            <scope>provided</scope>
+        </dependency>
 
         <!-- Logging -->
         <dependency>

Modified: 
rave/branches/mongo/rave-portal-resources/src/main/webapp/WEB-INF/dataContext.xml
URL: 
http://svn.apache.org/viewvc/rave/branches/mongo/rave-portal-resources/src/main/webapp/WEB-INF/dataContext.xml?rev=1426613&r1=1426612&r2=1426613&view=diff
==============================================================================
--- 
rave/branches/mongo/rave-portal-resources/src/main/webapp/WEB-INF/dataContext.xml
 (original)
+++ 
rave/branches/mongo/rave-portal-resources/src/main/webapp/WEB-INF/dataContext.xml
 Fri Dec 28 19:49:31 2012
@@ -31,7 +31,7 @@
         <property name="executeScriptQuery" value="SELECT * FROM WIDGET"/>
         <property name="scriptLocations">
             <list>
-                <value>/WEB-INF/db/initial_data.sql</value>
+                <!--<value>/WEB-INF/db/initial_data.sql</value>-->
             </list>
         </property>
     </bean>
@@ -42,7 +42,7 @@
         </property>
         <property name="scriptLocations">
             <list>
-                <!--<value>classpath:initial-data.json</value>-->
+                <value>classpath:initial-data.json</value>
             </list>
         </property>
     </bean>

Modified: rave/branches/mongo/rave-portal/pom.xml
URL: 
http://svn.apache.org/viewvc/rave/branches/mongo/rave-portal/pom.xml?rev=1426613&r1=1426612&r2=1426613&view=diff
==============================================================================
--- rave/branches/mongo/rave-portal/pom.xml (original)
+++ rave/branches/mongo/rave-portal/pom.xml Fri Dec 28 19:49:31 2012
@@ -286,6 +286,19 @@
             </build>
         </profile>
             <profile>
+                <id>jpa</id>
+                <activation>
+                    <activeByDefault>true</activeByDefault>
+                </activation>
+                <build>
+                    <testResources>
+                        <testResource>
+                            
<directory>${project.basedir}/src/test/resources_jpa</directory>
+                        </testResource>
+                    </testResources>
+                </build>
+            </profile>
+            <profile>
                 <id>mongodb</id>
                 <dependencies>
                     <dependency>
@@ -303,7 +316,42 @@
                         <groupId>org.apache.rave</groupId>
                         <artifactId>rave-mongodb</artifactId>
                     </dependency>
+                    <dependency>
+                        <groupId>de.flapdoodle.embed</groupId>
+                        <artifactId>de.flapdoodle.embed.mongo</artifactId>
+                        <scope>test</scope>
+                    </dependency>
                 </dependencies>
+                <build>
+                    <testResources>
+                        <testResource>
+                            
<directory>${project.basedir}/src/test/resources_mongo</directory>
+                        </testResource>
+                    </testResources>
+                    <plugins>
+                        <plugin>
+                            
<groupId>com.github.joelittlejohn.embedmongo</groupId>
+                            <artifactId>embedmongo-maven-plugin</artifactId>
+                            <version>0.1.5</version>
+                            <executions>
+                                <execution>
+                                    <id>start</id>
+                                    <phase>test-compile</phase>
+                                    <goals>
+                                        <goal>start</goal>
+                                    </goals>
+                                </execution>
+                                <execution>
+                                    <id>stop</id>
+                                    <phase>post-integration-test</phase>
+                                    <goals>
+                                        <goal>stop</goal>
+                                    </goals>
+                                </execution>
+                            </executions>
+                        </plugin>
+                    </plugins>
+                </build>
             </profile>
     </profiles>
 

Propchange: rave/branches/mongo/rave-portal/src/test/resources_jpa/test-data.sql
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: rave/branches/mongo/rave-portal/src/test/resources_jpa/test-data.sql
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: 
rave/branches/mongo/rave-portal/src/test/resources_jpa/test-dataContext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
rave/branches/mongo/rave-portal/src/test/resources_jpa/test-dataContext.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: 
rave/branches/mongo/rave-portal/src/test/resources_jpa/test-dataContext.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
rave/branches/mongo/rave-portal/src/test/resources_mongo/test-dataContext.xml
URL: 
http://svn.apache.org/viewvc/rave/branches/mongo/rave-portal/src/test/resources_mongo/test-dataContext.xml?rev=1426613&view=auto
==============================================================================
--- 
rave/branches/mongo/rave-portal/src/test/resources_mongo/test-dataContext.xml 
(added)
+++ 
rave/branches/mongo/rave-portal/src/test/resources_mongo/test-dataContext.xml 
Fri Dec 28 19:49:31 2012
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           
http://www.springframework.org/schema/beans/spring-beans.xsd";>
+
+    <bean id="dataImporter" 
class="org.apache.rave.portal.util.data.DataImporter">
+        <property name="dataExecutor">
+            <bean 
class="org.apache.rave.portal.util.data.DataImporter$ExecutorImpl" />
+        </property>
+        <property name="scriptLocations">
+            <list>
+                <value>classpath:initial-data.json</value>
+            </list>
+        </property>
+    </bean>
+</beans>
\ No newline at end of file


Reply via email to