You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by gm...@apache.org on 2013/08/22 15:16:38 UTC

svn commit: r1516442 - in /jspwiki/trunk/jspwiki-it-tests: ./ jspwiki-it-test-container-jdbc/ jspwiki-it-test-container/ jspwiki-it-test-custom-jdbc/ jspwiki-selenium-tests/src/main/config/ jspwiki-selenium-tests/src/main/java/

Author: gmazza
Date: Thu Aug 22 13:16:38 2013
New Revision: 1516442

URL: http://svn.apache.org/r1516442
Log:
Switched to the inmemdb-maven-plugin for IT tests

Added:
    jspwiki/trunk/jspwiki-it-tests/jspwiki-selenium-tests/src/main/config/hsql-userdb-setup.sql
      - copied, changed from r1516421, jspwiki/trunk/jspwiki-it-tests/jspwiki-selenium-tests/src/main/config/hsql-userdb-setup.ddl
Removed:
    jspwiki/trunk/jspwiki-it-tests/jspwiki-selenium-tests/src/main/config/hsql-userdb-setup.ddl
    jspwiki/trunk/jspwiki-it-tests/jspwiki-selenium-tests/src/main/config/hsql-userdb-teardown.ddl
    jspwiki/trunk/jspwiki-it-tests/jspwiki-selenium-tests/src/main/java/
Modified:
    jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-container-jdbc/pom.xml
    jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-container/pom.xml
    jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/pom.xml
    jspwiki/trunk/jspwiki-it-tests/pom.xml

Modified: jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-container-jdbc/pom.xml
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-container-jdbc/pom.xml?rev=1516442&r1=1516441&r2=1516442&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-container-jdbc/pom.xml (original)
+++ jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-container-jdbc/pom.xml Thu Aug 22 13:16:38 2013
@@ -55,57 +55,29 @@
       </resource>
       <resource>
         <directory>${project.basedir}/../jspwiki-selenium-tests/src/main/resources</directory>
+        <filtering>true</filtering>
       </resource>
     </resources>
     
-    <plugins> <!-- selenium test execution -->
+    <plugins>
       <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
+        <groupId>com.btmatthews.maven.plugins.inmemdb</groupId>
+        <artifactId>inmemdb-maven-plugin</artifactId>
       </plugin>
-      
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>selenium-maven-plugin</artifactId>
-      </plugin>
-      
+
       <plugin>
         <groupId>org.apache.tomcat.maven</groupId>
         <artifactId>tomcat7-maven-plugin</artifactId>
         <configuration>
           <contextFile>${project.basedir}/../jspwiki-selenium-tests/src/main/config/tomcatconf/tomcat7-context.xml</contextFile>
         </configuration>
-        <dependencies>
-          <dependency>
-            <groupId>org.hsqldb</groupId>
-            <artifactId>hsqldb</artifactId>
-            <version>1.8.0.10</version>
-          </dependency>
-        </dependencies>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>selenium-maven-plugin</artifactId>
       </plugin>
     </plugins>
   </build>
   
-  <dependencies>    
-    <dependency>
-      <groupId>commons-lang</groupId>
-      <artifactId>commons-lang</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-    </dependency>
-
-    <dependency>
-       <groupId>org.hsqldb</groupId>
-       <artifactId>hsqldb</artifactId>
-       <scope>compile</scope>
-    </dependency>
-
-    <dependency>
-       <groupId>org.hsqldb</groupId>
-       <artifactId>sqltool</artifactId>
-       <scope>compile</scope>
-    </dependency>
-  </dependencies>
 </project>
\ No newline at end of file

Modified: jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-container/pom.xml
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-container/pom.xml?rev=1516442&r1=1516441&r2=1516442&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-container/pom.xml (original)
+++ jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-container/pom.xml Thu Aug 22 13:16:38 2013
@@ -53,6 +53,7 @@
         <groupId>org.apache.tomcat.maven</groupId>
         <artifactId>tomcat7-maven-plugin</artifactId>
       </plugin>
+
     </plugins>
   </build>
 </project>
\ No newline at end of file

Modified: jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/pom.xml
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/pom.xml?rev=1516442&r1=1516441&r2=1516442&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/pom.xml (original)
+++ jspwiki/trunk/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/pom.xml Thu Aug 22 13:16:38 2013
@@ -66,20 +66,18 @@
         <artifactId>maven-antrun-plugin</artifactId>
       </plugin>
 
-      <plugin>
-        <groupId>org.apache.tomcat.maven</groupId>
-        <artifactId>tomcat7-maven-plugin</artifactId>
-        <configuration>
-          <contextFile>${project.basedir}/../jspwiki-selenium-tests/src/main/config/tomcatconf/tomcat7-context.xml</contextFile>
-        </configuration>
-        <dependencies>
-          <dependency>
-            <groupId>org.hsqldb</groupId>
-            <artifactId>hsqldb</artifactId>
-            <version>2.3.0</version>
-          </dependency>
-        </dependencies>
-      </plugin>
+        <plugin>
+            <groupId>com.btmatthews.maven.plugins.inmemdb</groupId>
+            <artifactId>inmemdb-maven-plugin</artifactId>
+        </plugin>
+
+        <plugin>
+            <groupId>org.apache.tomcat.maven</groupId>
+            <artifactId>tomcat7-maven-plugin</artifactId>
+            <configuration>
+                <contextFile>${project.basedir}/../jspwiki-selenium-tests/src/main/config/tomcatconf/tomcat7-context.xml</contextFile>
+            </configuration>
+        </plugin>
 
         <plugin>
             <groupId>org.codehaus.mojo</groupId>
@@ -88,28 +86,5 @@
 
     </plugins>
   </build>
-  
-  <dependencies>
-   <dependency>
-      <groupId>commons-lang</groupId>
-      <artifactId>commons-lang</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.hsqldb</groupId>
-      <artifactId>hsqldb</artifactId>
-      <scope>compile</scope>
-    </dependency>
 
-    <dependency>
-      <groupId>org.hsqldb</groupId>
-      <artifactId>sqltool</artifactId>
-      <scope>compile</scope>
-    </dependency>
-  </dependencies>
 </project>
\ No newline at end of file

Copied: jspwiki/trunk/jspwiki-it-tests/jspwiki-selenium-tests/src/main/config/hsql-userdb-setup.sql (from r1516421, jspwiki/trunk/jspwiki-it-tests/jspwiki-selenium-tests/src/main/config/hsql-userdb-setup.ddl)
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-it-tests/jspwiki-selenium-tests/src/main/config/hsql-userdb-setup.sql?p2=jspwiki/trunk/jspwiki-it-tests/jspwiki-selenium-tests/src/main/config/hsql-userdb-setup.sql&p1=jspwiki/trunk/jspwiki-it-tests/jspwiki-selenium-tests/src/main/config/hsql-userdb-setup.ddl&r1=1516421&r2=1516442&rev=1516442&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-it-tests/jspwiki-selenium-tests/src/main/config/hsql-userdb-setup.ddl (original)
+++ jspwiki/trunk/jspwiki-it-tests/jspwiki-selenium-tests/src/main/config/hsql-userdb-setup.sql Thu Aug 22 13:16:38 2013
@@ -1,22 +1,16 @@
-/*
- * Licensed 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.
- */
-
-drop table users if exists;
-drop table roles if exists;
-drop table groups if exists;
-drop table group_members if exists;
-drop user jspwiki;
+--
+-- Licensed 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.
+--
 
 create table users (
   uid varchar(100),

Modified: jspwiki/trunk/jspwiki-it-tests/pom.xml
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-it-tests/pom.xml?rev=1516442&r1=1516441&r2=1516442&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-it-tests/pom.xml (original)
+++ jspwiki/trunk/jspwiki-it-tests/pom.xml Thu Aug 22 13:16:38 2013
@@ -35,11 +35,11 @@
   
   <modules>
     <module>jspwiki-selenium-tests</module>
-    <module>jspwiki-it-test-custom</module>
+    <!--module>jspwiki-it-test-custom</module-->
     <!--module>jspwiki-it-test-custom-absolute-urls</module>
     <module>jspwiki-it-test-container</module-->
     <!--module>jspwiki-it-test-container-jdbc</module-->
-    <!--module>jspwiki-it-test-custom-jdbc</module-->
+    <module>jspwiki-it-test-custom-jdbc</module>
   </modules>
   
   <profiles>
@@ -68,47 +68,41 @@
             <version>2.4</version>
           </plugin>
 
-          <!-- exec-maven-plugin does not accept forked executions (!) -->
+          <!-- Activates the HSQLDB database for IT tests -->
           <plugin>
-            <artifactId>maven-antrun-plugin</artifactId>
-            <version>1.7</version>
+            <groupId>com.btmatthews.maven.plugins.inmemdb</groupId>
+            <artifactId>inmemdb-maven-plugin</artifactId>
+            <version>1.3.0</version>
+            <configuration>
+              <monitorKey>inmem</monitorKey>
+              <monitorPort>11157</monitorPort>
+            </configuration>
             <executions>
               <execution>
-                <id>db-setUp</id>
+                <id>run</id>
                 <phase>pre-integration-test</phase>
-                <goals><goal>run</goal></goals>
+                <goals>
+                  <goal>run</goal>
+                </goals>
                 <configuration>
-                  <target>
-                    <property name="compile_classpath" refid="maven.compile.classpath" />
-                    <echo message="**** starting hsqldb..." />
-                    <exec executable="java" dir="${env.JAVA_HOME}/bin" spawn="true">
-                        <arg value="-classpath" />
-                        <arg value="${compile_classpath}" />
-                        <arg value="org.apache.wiki.HsqlDbUtilsIT"/>
-                        <arg value="setUp" />
-                        <arg value="jspwiki-selenium-tests/src/main/config/hsql-userdb-setup.ddl" />
-                    </exec>  
-                  </target>
+                  <daemon>true</daemon>
+                  <type>hsqldb</type>
+                  <database>jspwiki</database>
+                  <username>sa</username>
+                  <password></password>
+                  <sources>
+                    <script>
+                      <sourceFile>jspwiki-selenium-tests/src/main/config/hsql-userdb-setup.sql</sourceFile>
+                    </script>
+                  </sources>
                 </configuration>
               </execution>
-              
               <execution>
-                <id>db-tearDown</id>
+                <id>stop</id>
                 <phase>post-integration-test</phase>
-                <goals><goal>run</goal></goals>
-                <configuration>
-                  <target>
-                    <property name="compile_classpath" refid="maven.compile.classpath" />
-                    <echo message="***** stopping hsqldb..." />
-                    <exec executable="java" dir="${env.JAVA_HOME}/bin" spawn="true">
-                        <arg value="-classpath" />
-                        <arg value="${compile_classpath}" />
-                        <arg value="org.apache.wiki.HsqlDbUtilsIT"/>
-                        <arg value="tearDown" />
-                        <arg value="jspwiki-selenium-tests/src/main/config/hsql-userdb-teardown.ddl" />
-                    </exec>  
-                  </target>
-                </configuration>
+                <goals>
+                  <goal>stop</goal>
+                </goals>
               </execution>
             </executions>
           </plugin>
@@ -166,6 +160,13 @@
                 <phase>post-integration-test</phase>
               </execution>
             </executions>
+            <dependencies>
+              <dependency>
+                <groupId>org.hsqldb</groupId>
+                <artifactId>hsqldb</artifactId>
+                <version>2.3.0</version>
+              </dependency>
+            </dependencies>
           </plugin>
         </plugins>
         </pluginManagement>