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/23 16:01:21 UTC

svn commit: r1485715 - in /incubator/jspwiki/trunk: ./ .externalToolBuilders/ src/main/config/dev/ src/main/java/org/apache/wiki/ src/main/java/org/apache/wiki/auth/user/ src/main/webapp/WEB-INF/ src/test/java/org/apache/wiki/auth/authorize/ src/test/j...

Author: gmazza
Date: Thu May 23 14:01:21 2013
New Revision: 1485715

URL: http://svn.apache.org/r1485715
Log:
Various cleanups (see changelog) associated with Mavenization.

Added:
    incubator/jspwiki/trunk/src/main/config/dev/OldChangeLog
      - copied unchanged from r1485652, incubator/jspwiki/trunk/OldChangeLog
Removed:
    incubator/jspwiki/trunk/.externalToolBuilders/
    incubator/jspwiki/trunk/.fbprefs
    incubator/jspwiki/trunk/OldChangeLog
    incubator/jspwiki/trunk/build.properties
    incubator/jspwiki/trunk/tests/etc/WEB-INF/
Modified:
    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/main/java/org/apache/wiki/auth/user/JDBCUserDatabase.java
    incubator/jspwiki/trunk/src/main/webapp/WEB-INF/jspwiki.properties
    incubator/jspwiki/trunk/src/test/java/org/apache/wiki/auth/authorize/JDBCGroupDatabaseTest.java
    incubator/jspwiki/trunk/src/test/java/org/apache/wiki/auth/user/JDBCUserDatabaseTest.java
    incubator/jspwiki/trunk/src/test/resources/jdbc.properties

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=1485715&r1=1485714&r2=1485715&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Thu May 23 14:01:21 2013
@@ -1,3 +1,13 @@
+2013-05-23  Glen Mazza (gmazza AT apache DOT org)
+
+       * 2.9.2-incubating-11
+       
+       * Remove unused .externalToolBuilders, .fbprefs folders
+         OldChangeLog out of root directory and now under config/dev,
+         build.properties deleted, JDBC config notes moved from
+         build.xml to JDBCUserDatabase.java, removed no longer used
+         etc/WEB-INF folder, jartests target gone from build.xml. 
+
 2013-05-22  Glen Mazza (gmazza AT apache DOT org)
 
        * 2.9.2-incubating-10

Modified: incubator/jspwiki/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/build.xml?rev=1485715&r1=1485714&r2=1485715&view=diff
==============================================================================
--- incubator/jspwiki/trunk/build.xml (original)
+++ incubator/jspwiki/trunk/build.xml Thu May 23 14:01:21 2013
@@ -24,31 +24,10 @@
     To build:
     1.) run mvn clean install from Maven, which runs all unit
         tests and builds the WAR.
-    2.) from Ant, run the webtests (Selenium tests), war
-        (another way to build the war), or dist (create the
-        full distribution).
-
-    RUNNING JSPWIKI WITH JDBC SUPPORT
-    =================================
-    1) Configure the Jdbc.* properties in the build.properties file
-    2) Configure table and column mappings in etc/jspwiki.properties.tmpl
-    3) Configure your web container to create a JDBC DataSource
-       (by default, the JNDI name is jdbc/UserDatabase)
-    4) Put the JDBC driver jar in a place where your web container will
-       find it, for example CATALINA_HOME/common/lib
-    5) Build JSPWiki, and start it up!
-
-    See the Javadoc for org.apache.wiki.auth.user.JDBCUserDatabase
-    for details and examples.
+    2.) from Ant, run the webtests (Selenium tests) or dist 
+        (to create the full distribution).
 -->
 
-<!--
-    First, we define the project.  We assign it a name,
-    and the default action if no action is specified on the
-    command line.  Also, all relative directory references
-    in the rest of the project file should be calculated from
-    the current directory.
--->
 <project name="JSPWiki" default="war" basedir=".">
 
   <!-- This tells us which build.properties file lies.  By default, we
@@ -81,9 +60,6 @@
   <!-- The location for the JAR file for the core JSPWiki classes -->
   <property name="jarfile" value="target/JSPWiki/WEB-INF/lib/jspwiki-2.9.2-SNAPSHOT.jar" />
 
-  <!-- The location of the JAR file for the test classes -->
-  <property name="testjarfile" location="${code.build}/${ant.project.name}-test.jar" />
-
   <!-- The location for the keystore used to sign the JAR; will be created if it doesn't exist. -->
   <property name="jks.keystore" value="${basedir}/etc/jspwiki.jks" />
 
@@ -138,10 +114,8 @@
        already built files in the build-directory, and then we
        add all the jar files in the "lib" -directory. -->
   <path id="path.base">
-     <pathelement path="${code.build}" />
      <fileset dir="${libs.main}">
         <include name="*.jar" />
-        <exclude name="jspwiki*.jar"/>
      </fileset>
   </path>
 
@@ -149,21 +123,14 @@
        to the base path defined above, since we put all the relevant
        .properties-files in tests/etc. -->
   <path id="path.tests">
-     <pathelement location="${jarfile}" />
-     <pathelement location="${testjarfile}" />
      <pathelement location="${java.home}/../lib/tools.jar" />
      <fileset dir="${libs.main}">
         <include name="*.jar" />
-        <exclude name="jspwiki*.jar"/>
      </fileset>
      <fileset dir="${libs.tests}">
         <include name="*.jar" />
      </fileset>
-     <!-- Note ini folder present both below and 
-          in ${jarfile} (can cause conflict? bug?) -->
      <pathelement path="target/test-classes" />
-     <!-- Below line temporary until all test resources in Maven location -->
-     <pathelement path="${tests.resources}/etc" />
   </path>
 
   <!-- Path holding (L)GPL jars and their dependencies -->
@@ -214,12 +181,6 @@
 
   <macrodef name="download-deps">
      <sequential>
-     	<!-- main dependencies now populated via "mvn clean install [-Dmaven.test.skip]", which must be run prior to any Ant task 
-             present build process:
-             mvn clean install [-Dmaven.test.skip to avoid unit tests] will build a WAR.
-             ant dist (will run unit tests still) or ant war (just to build a WAR).
-     	-->
-     
      	<!-- tests dependencies  -->
      	<get-element to-file="${libs.tests}/commons-el-1.0.jar" url="${central.url}/commons-el/commons-el/1.0/commons-el-1.0.jar" />
      	<get-element to-file="${libs.tests}/hsqldb-1.8.0.10.jar" url="${central.url}/org/hsqldb/hsqldb/1.8.0.10/hsqldb-1.8.0.10.jar" />
@@ -229,8 +190,6 @@
         <get-element to-file="${libs.tests}/selenium-server-standalone-2.25.0.jar" 
                      url="http://selenium.googlecode.com/files/selenium-server-standalone-2.25.0.jar" />
         <get-element to-file="${libs.tests}/stripes-1.5.7.jar" url="${central.url}/net/sourceforge/stripes/stripes/1.5.7/stripes-1.5.7.jar" />
-        <get-element to-file="${libs.tests}/yuicompressor-2.4.7.jar" 
-                     url="${central.url}/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar" />
      	
      	<!-- other dependencies ((L)GPL dependencies and jars needed by these) -->
      	<get-element to-file="${libs.opt}/cobertura-1.9.4.1.jar" url="${central.url}/net/sourceforge/cobertura/cobertura/1.9.4.1/cobertura-1.9.4.1.jar" />
@@ -276,17 +235,6 @@
     <mkdir dir="${release.dir}" />
   </target>
 
-  <target name="jartests">
-    <jar jarfile="${testjarfile}" update="false">
-      <fileset dir="${tests.build}">
-        <include name="**/*.class"/>
-      </fileset>
-      <fileset dir="${tests.src}">
-        <include name="org/**/*.properties"/>
-      </fileset>
-    </jar>
-  </target>
-
   <!--  Signs the JSPWiki JAR file with a self-issued digital certificate.
         This should only be needed when your JVM starts with a global security
         policy. By this we mean a standard J2SE policy that is set at JVM startup
@@ -510,8 +458,6 @@
                token="&lt;!--  REMOVE ME TO ENABLE CONTAINER-MANAGED AUTH" value="" />
       <replace file="${webtests.build}/containerauth.web.xml"
                token="REMOVE ME TO ENABLE CONTAINER-MANAGED AUTH  --&gt;" value="" />
-      <copy file="${webtests.build}/containerauth.web.xml"
-          tofile="tests/etc/WEB-INF/web.xml" overwrite="true" />
 
   </target>
 
@@ -522,7 +468,7 @@
        - 'admin' with password 'myP@5sw0rd' and roles of 'Authenticated', 'Admin'
        These are the same as the test users in tests/org.apache.wiki.auth.Users.
   -->
-  <target name="webtests" depends="tests-init,jartests">
+  <target name="webtests" depends="tests-init">
     <mkdir dir="${webtests.temp}" />
     <mkdir dir="${webtests.build}" />
   

Modified: incubator/jspwiki/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/pom.xml?rev=1485715&r1=1485714&r2=1485715&view=diff
==============================================================================
--- incubator/jspwiki/trunk/pom.xml (original)
+++ incubator/jspwiki/trunk/pom.xml Thu May 23 14:01:21 2013
@@ -450,6 +450,9 @@
             <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9</version>
+               <configuration>
+                   <quiet>true</quiet>
+               </configuration>
                <executions>
                    <execution>
                        <goals>

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=1485715&r1=1485714&r2=1485715&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 23 14:01:21 2013
@@ -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         = "11";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/user/JDBCUserDatabase.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/user/JDBCUserDatabase.java?rev=1485715&r1=1485714&r2=1485715&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/user/JDBCUserDatabase.java (original)
+++ incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/user/JDBCUserDatabase.java Thu May 23 14:01:21 2013
@@ -138,7 +138,7 @@ import org.apache.wiki.util.Serializer;
  * </p>
  * <p>
  * This class is typically used in conjunction with a web container's JNDI
- * resource factory. For example, Tomcat versions 4 and higher provide a basic
+ * resource factory. For example, Tomcat provides a basic
  * JNDI factory for registering DataSources. To give JSPWiki access to the JNDI
  * resource named by <code></code>, you would declare the datasource resource
  * similar to this:
@@ -152,10 +152,23 @@ import org.apache.wiki.util.Serializer;
  *  &nbsp;...<br/>
  * &lt;/Context&gt;</code></blockquote>
  * <p>
- * JDBC driver JARs should be added to Tomcat's <code>common/lib</code>
- * directory. For more Tomcat 5.5 JNDI configuration examples, see <a
- * href="http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html">
- * http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html</a>.
+ * To configure JSPWiki to use JDBC support, first create a database 
+ * with a structure similar to that provided by the HSQL and PostgreSQL 
+ * scripts in src/main/config/db.  If you have different table or column 
+ * names you can either alias them with a database view and have JSPWiki
+ * use the views, or alter the WEB-INF/jspwiki.properties file: the 
+ * jspwiki.userdatabase.* and jspwiki.groupdatabase.* properties change the
+ * names of the tables and columns that JSPWiki uses.
+ * </p>
+ * <p>
+ * A JNDI datasource (named jdbc/UserDatabase by default but can be configured 
+ * in the jspwiki.properties file) will need to be created in your servlet container.
+ * JDBC driver JARs should be added, e.g. in Tomcat's <code>lib</code>
+ * directory. For more Tomcat JNDI configuration examples, see <a
+ * href="http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html">
+ * http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html</a>.
+ * Once done, restart JSPWiki in the servlet container for it to read the 
+ * new properties and switch to JDBC authentication.
  * </p>
  * <p>
  * JDBCUserDatabase commits changes as transactions if the back-end database

Modified: incubator/jspwiki/trunk/src/main/webapp/WEB-INF/jspwiki.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/main/webapp/WEB-INF/jspwiki.properties?rev=1485715&r1=1485714&r2=1485715&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/main/webapp/WEB-INF/jspwiki.properties (original)
+++ incubator/jspwiki/trunk/src/main/webapp/WEB-INF/jspwiki.properties Thu May 23 14:01:21 2013
@@ -599,9 +599,11 @@ jspwiki.userdatabase = org.apache.wiki.a
 
 #jspwiki.xmlUserDatabaseFile = /etc/tomcat/userdatabase.xml
 
-# You can also use a JDBC database for storing user profiles.
-# See the online AuthenticationAndAuthorization2.3 docs for details on
-# how to configure it.
+# You can also use a JDBC database for storing user profiles,  
+# to be configured below in the JDBC section. See the online
+# AuthenticationAndAuthorization2.3 docs and the JavaDoc for
+# the JDBCUserDatabase class for details on how to configure it.
+# 
 
 #jspwiki.userdatabase = org.apache.wiki.auth.user.JDBCUserDatabase
 
@@ -724,11 +726,22 @@ jspwiki.rss.channelLanguage = en-us
 
 ###########################################################################
 #
-#  JDBC Configuration. Tells JSPWiki which tables and columns to map
-#  to for the JDBCUserDatabase and JDBCGroupDatabase. For more info, see the
+#  JDBC Configuration. Provides JDBC connectivity info and  
+#  tells JSPWiki which tables and columns to map to for the
+#  JDBCUserDatabase and JDBCGroupDatabase. For more info, see the
 #  JavaDoc for classes org.apache.wiki.auth.user.JDBCUserDatabase and
 #  org.apache.wiki.auth.authorize.JDBCGroupDatabase.
 #
+
+#jdbc.admin.id=SA
+#jdbc.admin.password=
+#jdbc.driver.class=org.hsqldb.jdbcDriver
+#jdbc.driver.id=hsql
+#jdbc.driver.jar=MyDatabasesJDBCDriver.jar
+#jdbc.driver.url=jdbc\:hsqldb\:hsql\://localhost/jspwiki
+#jdbc.user.id=jspwiki
+#jdbc.user.password=password
+
 jspwiki.userdatabase.datasource=jdbc/UserDatabase
 jspwiki.userdatabase.table=users
 jspwiki.userdatabase.uid=uid

Modified: incubator/jspwiki/trunk/src/test/java/org/apache/wiki/auth/authorize/JDBCGroupDatabaseTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/test/java/org/apache/wiki/auth/authorize/JDBCGroupDatabaseTest.java?rev=1485715&r1=1485714&r2=1485715&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/test/java/org/apache/wiki/auth/authorize/JDBCGroupDatabaseTest.java (original)
+++ incubator/jspwiki/trunk/src/test/java/org/apache/wiki/auth/authorize/JDBCGroupDatabaseTest.java Thu May 23 14:01:21 2013
@@ -74,7 +74,7 @@ public class JDBCGroupDatabaseTest exten
             // ignore
         }
         Context ctx = (Context) initCtx.lookup( "java:comp/env" );
-        DataSource ds = new TestJDBCDataSource( new File( "build.properties" ) );
+        DataSource ds = new TestJDBCDataSource( new File( "target/test-classes/jdbc.properties" ) );
         ctx.bind( JDBCGroupDatabase.DEFAULT_GROUPDB_DATASOURCE, ds );
 
         // Get the JDBC connection and init tables

Modified: incubator/jspwiki/trunk/src/test/java/org/apache/wiki/auth/user/JDBCUserDatabaseTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/test/java/org/apache/wiki/auth/user/JDBCUserDatabaseTest.java?rev=1485715&r1=1485714&r2=1485715&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/test/java/org/apache/wiki/auth/user/JDBCUserDatabaseTest.java (original)
+++ incubator/jspwiki/trunk/src/test/java/org/apache/wiki/auth/user/JDBCUserDatabaseTest.java Thu May 23 14:01:21 2013
@@ -97,7 +97,7 @@ public class JDBCUserDatabaseTest extend
             // ignore
         }
         Context ctx = (Context) initCtx.lookup( "java:comp/env" );
-        DataSource ds = new TestJDBCDataSource( new File( "build.properties" ) );
+        DataSource ds = new TestJDBCDataSource( new File( "target/test-classes/jdbc.properties" ) );
         ctx.bind( JDBCUserDatabase.DEFAULT_DB_JNDI_NAME, ds );
 
         // Get the JDBC connection and init tables

Modified: incubator/jspwiki/trunk/src/test/resources/jdbc.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/test/resources/jdbc.properties?rev=1485715&r1=1485714&r2=1485715&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/test/resources/jdbc.properties (original)
+++ incubator/jspwiki/trunk/src/test/resources/jdbc.properties Thu May 23 14:01:21 2013
@@ -26,8 +26,8 @@ jdbc.admin.id=SA
 jdbc.admin.password=
 jdbc.driver.class=org.hsqldb.jdbcDriver
 jdbc.driver.id=hsql
-jdbc.driver.jar=tests/lib/hsqldb-1.8.0.10.jar
+jdbc.driver.jar=hsqldb-1.8.0.10.jar
 jdbc.driver.url=jdbc\:hsqldb\:hsql\://localhost/jspwiki
-jdbc.jar.present=tests/lib/hsqldb-1.8.0.10.jar
 jdbc.user.id=jspwiki
 jdbc.user.password=password
+