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/05/16 22:13:11 UTC

svn commit: r1483542 - in /incubator/jspwiki/trunk: ./ src/main/java/org/apache/wiki/ src/test/java/org/apache/wiki/ src/test/resources/ tests/etc/

Author: gmazza
Date: Thu May 16 20:13:10 2013
New Revision: 1483542

URL: http://svn.apache.org/r1483542
Log:
Mavenization of JDBC test cases.

Added:
    incubator/jspwiki/trunk/src/test/resources/jdbc.properties
      - copied unchanged from r1483510, incubator/jspwiki/trunk/tests/etc/jdbc.properties.tmpl
Removed:
    incubator/jspwiki/trunk/tests/etc/dependencyfindertasks.properties
    incubator/jspwiki/trunk/tests/etc/jdbc.properties.tmpl
Modified:
    incubator/jspwiki/trunk/.classpath
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/build.xml
    incubator/jspwiki/trunk/pom.xml
    incubator/jspwiki/trunk/src/main/java/org/apache/wiki/Release.java
    incubator/jspwiki/trunk/src/test/java/org/apache/wiki/HsqlDbUtils.java

Modified: incubator/jspwiki/trunk/.classpath
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/.classpath?rev=1483542&r1=1483541&r2=1483542&view=diff
==============================================================================
--- incubator/jspwiki/trunk/.classpath (original)
+++ incubator/jspwiki/trunk/.classpath Thu May 16 20:13:10 2013
@@ -36,8 +36,6 @@
 	<classpathentry kind="lib" path="lib/jstl-1.1.2.jar"/>
 	<classpathentry kind="lib" path="tests/lib/commons-el-1.0.jar"/>
 	<classpathentry kind="lib" path="tests/lib/hsqldb-1.8.0.10.jar"/>
-	<classpathentry kind="lib" path="tests/lib/jasper-compiler-5.5.23.jar"/>
-	<classpathentry kind="lib" path="tests/lib/jasper-runtime-5.5.23.jar"/>
 	<classpathentry kind="lib" path="tests/lib/stripes-1.5.7.jar"/>
 	<classpathentry kind="lib" path="tests/lib/selenium-server-standalone-2.25.0.jar"/>
 	<classpathentry kind="lib" path="tests/lib/jetty-all-7.6.7.v20120910.jar"/>

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=1483542&r1=1483541&r2=1483542&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Thu May 16 20:13:10 2013
@@ -1,3 +1,11 @@
+2013-05-16  Glen Mazza (glenmazza AT apache DOT org)
+
+       * 2.9.2-incubating-0
+       
+       * Mavenized location of jdbc.properties.tmpl, routed JDBC tests 
+         from tests/etc/db to target/etc/db, removed unused Ant API-difference
+         detector & switched to Maven Clirr plugin equivalent.
+
 2013-05-06  Glen Mazza (glenmazza AT apache DOT org)
 
        * 2.9.1-incubating-10

Modified: incubator/jspwiki/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/build.xml?rev=1483542&r1=1483541&r2=1483542&view=diff
==============================================================================
--- incubator/jspwiki/trunk/build.xml (original)
+++ incubator/jspwiki/trunk/build.xml Thu May 16 20:13:10 2013
@@ -105,6 +105,7 @@
        directory where the test results are written in. -->
 
   <property name="tests.src" value="src/test/java" />
+  <property name="tests.mvnresources" value="src/test/resources" />
   <property name="tests.resources" value="tests" />
   <property name="tests.build" value="tests/build" />
   <property name="tests.reports" value="tests/reports" />
@@ -316,7 +317,6 @@
     <delete file="${code.i18n}/plugin/PluginResources_en.properties" />
     <delete file="${code.i18n}/templates/default_en.properties" />
     <delete dir="target" />
-    <delete dir="tests/etc/db" />
     <delete dir="tests/etc/WEB-INF" />
     <delete>
       <fileset dir="." includes="**/*~" defaultexcludes="no"/>
@@ -1223,7 +1223,7 @@ To automate the JAR signing processs, yo
        JDBC-compliant database such as Postgresql.
 
        Step 2: If desired, modify the database properties in
-       tests/etc/jdbc.properties.tmpl.  The defaults given should be sufficient 
+       src/test/resources/jdbc.properties.  The defaults given should be sufficient 
        for JDBC testing using hsql on any developer's local machine.
 
        The 'jdbc.driver.id' property in this file (defaulted to hsql) is 
@@ -1281,7 +1281,7 @@ To automate the JAR signing processs, yo
     <check-file file="${jdbc.driver.jar}"            prop="jdbc.jar.present" />
 
     <!-- Bulk-copy the table setup/teardown scripts -->
-    <property name="tests.db.scripts" value="${tests.resources}/etc/db/${jdbc.driver.id}" />
+    <property name="tests.db.scripts" value="target/etc/db/${jdbc.driver.id}" />
     <mkdir dir="${tests.db.scripts}" />
     <copy toDir="${tests.db.scripts}" overwrite="true">
       <fileset dir="${db.scripts}" />
@@ -1304,7 +1304,7 @@ To automate the JAR signing processs, yo
     <property name="db.props.exist" value="true" />
 
     <!-- Copying the testing jdbc.properties file -->
-    <copy file="${tests.resources}/etc/jdbc.properties.tmpl" toFile="${tests.resources}/etc/db/jdbc.properties" overwrite="true"/>
+    <copy file="${tests.mvnresources}/jdbc.properties" toFile="target/test-classes/jdbc.properties" overwrite="true"/>
   </target>
 
   <!-- Some convenience macrodefs -->
@@ -1369,40 +1369,6 @@ To automate the JAR signing processs, yo
 	     </java>
   </target>
 	
-  <target name="api-diff" description="Compares API in JSPWiki.jar with previous version"
-    depends="jar">
-     <!-- Assumes that the dependencyfinder.dir property points to the
-          dir containing the binary distribution of DependencyFinder -->
-     <check-property prop="dependencyfinder.dir" />
-     <check-property prop="jarfile.old" />
-     <mkdir dir="${tests.reports}" />
-     <java classname="com.jeantessier.dependencyfinder.cli.JarJarDiff"
-       output="${tests.reports}/API-changes.xml">
-       <classpath refid="path.tests" />
-       <classpath>
-         <pathelement location="${dependencyfinder.dir}/lib/DependencyFinder.jar" />
-       </classpath>
-       <arg value="-new" />
-       <arg value="${jarfile}" />
-       <arg value="-old" />
-       <arg value="${jarfile.old}" />
-       <arg value="-name" />
-       <arg value="JSPWiki Public API Changes" />
-     </java>
-
-     <!-- Filthy hack that suppresses DTD resolution -->
-     <replace file="${tests.reports}/API-changes.xml"
-       token='&lt;!DOCTYPE differences SYSTEM "http://depfind.sourceforge.net/dtd/differences.dtd"&gt;'
-       value=""/>
-     <!-- Just to be safe, replace raw ampersands with something bogus -->
-     <replace file="${tests.reports}/API-changes.xml"
-       token="&amp;" value="(ampersand)"/>
-     <xslt in="${tests.reports}/API-changes.xml"
-       out="${tests.reports}/API-changes.html"
-       style="${dependencyfinder.dir}/etc/DiffToHTML.xsl">
-     </xslt>
-  </target>
-	
   <target name="coverage-tests" depends="compile,tests">
   	<!-- delete previous info, if any -->
     <delete file="cobertura.ser" />

Modified: incubator/jspwiki/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/pom.xml?rev=1483542&r1=1483541&r2=1483542&view=diff
==============================================================================
--- incubator/jspwiki/trunk/pom.xml (original)
+++ incubator/jspwiki/trunk/pom.xml Thu May 16 20:13:10 2013
@@ -311,10 +311,9 @@
                         <configuration>
                             <target>
                                 <!-- Copy the database configuration information -->
-                                <mkdir dir="tests/etc/db/hsql" />
-                                <copy file="tests/etc/jdbc.properties.tmpl" tofile="tests/etc/db/jdbc.properties" />
+                                <mkdir dir="target/etc/db/hsql" />
                                 <!-- Bulk-copy the table setup/teardown scripts -->
-                                <copy toDir="tests/etc/db/hsql" overwrite="true">
+                                <copy toDir="target/etc/db/hsql" overwrite="true">
                                     <fileset dir="etc/db/hsql" />
                                     <filterset>
                                         <filtersfile file="target/test-classes/jspwiki.properties" />
@@ -516,6 +515,11 @@
                     </execution>
                 </executions>
             </plugin-->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>clirr-maven-plugin</artifactId>
+                <version>2.5</version>
+            </plugin>
         </plugins>
         <pluginManagement>
         	<plugins>
@@ -552,5 +556,13 @@
         	</plugins>
         </pluginManagement>
     </build>
-
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>clirr-maven-plugin</artifactId>
+                <version>2.5</version>
+            </plugin>
+        </plugins>
+    </reporting>
 </project>

Modified: incubator/jspwiki/trunk/src/main/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/main/java/org/apache/wiki/Release.java?rev=1483542&r1=1483541&r2=1483542&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/main/java/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/main/java/org/apache/wiki/Release.java Thu May 16 20:13:10 2013
@@ -64,7 +64,7 @@ public final class Release
     public static final int        REVISION      = 9;
 
     /** The minor revision.  */
-    public static final int        MINORREVISION = 1;
+    public static final int        MINORREVISION = 2;
 
     /** The build number/identifier.  This is a String as opposed to an integer, just
      *  so that people can add other identifiers to it.  The build number is incremented
@@ -75,7 +75,7 @@ public final class Release
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "10";
+    public static final String     BUILD         = "0";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/test/java/org/apache/wiki/HsqlDbUtils.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/test/java/org/apache/wiki/HsqlDbUtils.java?rev=1483542&r1=1483541&r2=1483542&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/test/java/org/apache/wiki/HsqlDbUtils.java (original)
+++ incubator/jspwiki/trunk/src/test/java/org/apache/wiki/HsqlDbUtils.java Thu May 16 20:13:10 2013
@@ -37,8 +37,8 @@ import org.hsqldb.util.SqlFile;
  * <ol>
  *   <li>HsqlDbUtils hsqldbu = new HsqlDbUtils()</li>
  *   <li>hsqldbu.start()</li>
- *   <li>hsqldbu.exec( "tests/etc/db/hsql/userdb-setup.ddl" )</li>
- *   <li>hsqldbu.exec( "tests/etc/db/hsql/userdb-teardown.ddl" )</li>
+ *   <li>hsqldbu.exec( "target/etc/db/hsql/userdb-setup.ddl" )</li>
+ *   <li>hsqldbu.exec( "target/etc/db/hsql/userdb-teardown.ddl" )</li>
  *   <li>hsqldbu.stop()</li>
  * </ol>
  * </code>
@@ -71,7 +71,7 @@ public class HsqlDbUtils
         {
             LOG.error( e.getMessage(), e );
         }
-        exec( "tests/etc/db/hsql/userdb-setup.ddl" );
+        exec( "target/etc/db/hsql/userdb-setup.ddl" );
     }
     
     /**
@@ -79,7 +79,7 @@ public class HsqlDbUtils
      */
     public void tearDown() 
     {
-        exec( "tests/etc/db/hsql/userdb-teardown.ddl" );
+        exec( "target/etc/db/hsql/userdb-teardown.ddl" );
         stop();
     }
     
@@ -90,7 +90,7 @@ public class HsqlDbUtils
     {
         
         // start Hypersonic server
-        Properties hProps = loadPropertiesFrom( "tests/etc/db/hsql/server.properties" );
+        Properties hProps = loadPropertiesFrom( "target/etc/db/hsql/server.properties" );
         
         hsqlServer = new Server();
         // pre-checks
@@ -168,7 +168,7 @@ public class HsqlDbUtils
     Connection getConnection() throws IOException, SQLException
     {
         Connection conn;
-        Properties jProps = loadPropertiesFrom( "tests/etc/db/jdbc.properties" );
+        Properties jProps = loadPropertiesFrom( "target/test-classes/jdbc.properties" );
         conn = DriverManager.getConnection( jProps.getProperty( "jdbc.driver.url" ), 
                                             jProps.getProperty( "jdbc.admin.id" ),
                                             jProps.getProperty( "jdbc.admin.password" ) );