[Commits] (bcm) fix up build and config files so that the distro is configured to use whatever

commits at osafoundation.org commits at osafoundation.org
Mon Apr 11 17:13:32 PDT 2005


Commit by: bcm
Modified files:
server/build.xml 1.29 1.30
server/shared.properties 1.18 1.19
server/core/build.xml 1.14 1.15
server/docs/TODO.txt 1.47 1.48
server/etc/cosmo.xml 1.3 1.4
server/ext/mysql-connector-java-3.1.7-bin.jar None 1.1
server/web/build.xml 1.4 1.5

Log message:
fix up build and config files so that the distro is configured to use whatever
database is specified in shared.properties (for me, that's mysql). tests still
use hsqldb. need to figure out an easy way for a cosmo admin to tweak the
hibernate dialect if he wants to use something other than mysql.


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/server/build.xml.diff?r1=text&tr1=1.29&r2=text&tr2=1.30
http://cvs.osafoundation.org/index.cgi/server/shared.properties.diff?r1=text&tr1=1.18&r2=text&tr2=1.19
http://cvs.osafoundation.org/index.cgi/server/core/build.xml.diff?r1=text&tr1=1.14&r2=text&tr2=1.15
http://cvs.osafoundation.org/index.cgi/server/docs/TODO.txt.diff?r1=text&tr1=1.47&r2=text&tr2=1.48
http://cvs.osafoundation.org/index.cgi/server/etc/cosmo.xml.diff?r1=text&tr1=1.3&r2=text&tr2=1.4
http://cvs.osafoundation.org/index.cgi/server/ext/mysql-connector-java-3.1.7-bin.jar?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.osafoundation.org/index.cgi/server/web/build.xml.diff?r1=text&tr1=1.4&r2=text&tr2=1.5

Index: server/shared.properties
diff -u server/shared.properties:1.18 server/shared.properties:1.19
--- server/shared.properties:1.18	Mon Apr 11 13:59:44 2005
+++ server/shared.properties	Mon Apr 11 17:13:28 2005
@@ -87,6 +87,7 @@
 jta.jar=${cosmo.ext}/jta.jar
 log4j.jar=${cosmo.ext}/log4j-1.2.8.jar
 lucene.jar=${maven.repository}/lucene/jars/lucene-1.4.3.jar
+mysql.jar=${cosmo.ext}/mysql-connector-java-3.1.7-bin.jar
 odmg.jar=${cosmo.ext}/odmg-3.0.jar
 oro.jar=${cosmo.ext}/jakarta-oro-2.0.8.jar
 servletapi.jar=${maven.repository}/servletapi/jars/servletapi-2.3.jar
@@ -103,13 +104,14 @@
 # distribution properties
 #
 
-cosmo.dist.userdb.dialect=net.sf.hibernate.dialect.HSQLDialect
+cosmo.dist.userdb.dialect=net.sf.hibernate.dialect.MySQLDialect
+cosmo.dist.userdb.driver=com.mysql.jdbc.Driver
 cosmo.dist.userdb.dataSource=java:comp/env/jdbc/cosmo
-cosmo.dist.userdb.driver=org.hsqldb.jdbcDriver
-cosmo.dist.userdb.database=userdb
-cosmo.dist.userdb.url=jdbc:hsqldb:file:data/${cosmo.dist.userdb.database}
-cosmo.dist.userdb.username=sa
-cosmo.dist.userdb.password=
+cosmo.dist.userdb.database=cosmo
+cosmo.dist.userdb.url=jdbc:mysql:///${cosmo.dist.userdb.database}
+cosmo.dist.userdb.username=cosmo
+cosmo.dist.userdb.password=cosmo
+cosmo.dist.userdb.jar=${mysql.jar}
 
 #
 # test properties
@@ -121,3 +123,4 @@
 cosmo.test.userdb.url=jdbc:hsqldb:file:${cosmo.test}/db/${cosmo.test.userdb.database}
 cosmo.test.userdb.username=sa
 cosmo.test.userdb.password=
+cosmo.test.userdb.jar=${hsqldb.jar}

Index: server/core/build.xml
diff -u server/core/build.xml:1.14 server/core/build.xml:1.15
--- server/core/build.xml:1.14	Fri Apr  8 16:53:16 2005
+++ server/core/build.xml	Mon Apr 11 17:13:28 2005
@@ -82,22 +82,6 @@
     <delete dir="${core.build}"/>
   </target>
 
-  <target name="userdb-setup"
-          description="set up the user database">
-    <echo>Setting up db ${cosmo.dist.userdb.database}</echo>
-    <sql driver="${cosmo.dist.userdb.driver}"
-         url="${cosmo.dist.userdb.url}"
-         userid="${cosmo.dist.userdb.username}"
-         password="${cosmo.dist.userdb.password}">
-      <fileset dir="${cosmo.db}">
-        <include name="schema.sql"/>
-      </fileset>
-      <classpath>
-        <pathelement location="${hsqldb.jar}"/>
-      </classpath>
-    </sql>
-  </target>
-
   <!-- TEST TARGETS -->
 
   <target name="test-prepare" description="set up the test environment">
@@ -162,9 +146,9 @@
         <pathelement location="${cglib.jar}"/>
         <pathelement location="${commons-collections.jar}"/>
         <pathelement location="${concurrent.jar}"/>
+        <pathelement location="${cosmo.test.userdb.jar}"/>
         <pathelement location="${dom4j.jar}"/>
         <pathelement location="${ehcache.jar}"/>
-        <pathelement location="${hsqldb.jar}"/>
         <pathelement location="${lucene.jar}"/>
         <pathelement location="${jta.jar}"/>
         <pathelement location="${log4j.jar}"/>

Index: server/etc/cosmo.xml
diff -u server/etc/cosmo.xml:1.3 server/etc/cosmo.xml:1.4
--- server/etc/cosmo.xml:1.3	Mon Apr 11 15:19:57 2005
+++ server/etc/cosmo.xml	Mon Apr 11 17:13:29 2005
@@ -45,19 +45,19 @@
     </parameter>
     <parameter>
       <name>username</name>
-      <value>sa</value>
+      <value>@DB_USERNAME@</value>
     </parameter>
     <parameter>
       <name>password</name>
-      <value></value>
+      <value>@DB_PASSWORD@</value>
     </parameter>
     <parameter>
       <name>driverClassName</name>
-      <value>org.hsqldb.jdbcDriver</value>
+      <value>@DB_DRIVER@</value>
     </parameter>
     <parameter>
       <name>url</name>
-      <value>jdbc:hsqldb:file:data/userdb</value>
+      <value>@DB_URL@</value>
     </parameter>
   </ResourceParams>
   <Realm className="org.apache.catalina.realm.DataSourceRealm"

Index: server/web/build.xml
diff -u server/web/build.xml:1.4 server/web/build.xml:1.5
--- server/web/build.xml:1.4	Mon Apr 11 13:59:45 2005
+++ server/web/build.xml	Mon Apr 11 17:13:30 2005
@@ -171,7 +171,7 @@
         <path location="${web.build}/testclasses"/>
         <path location="${web.web}"/>
         <fileset dir="${web.web}/WEB-INF/lib" includes="*.jar"/>
-        <pathelement location="${hsqldb.jar}"/>
+        <pathelement location="${cosmo.test.userdb.jar}"/>
       </classpath>
       <formatter type="xml"/>
       <formatter type="brief" usefile="false"/>

Index: server/build.xml
diff -u server/build.xml:1.29 server/build.xml:1.30
--- server/build.xml:1.29	Fri Apr  8 16:53:15 2005
+++ server/build.xml	Mon Apr 11 17:13:28 2005
@@ -83,7 +83,7 @@
         <include name="schema.sql"/>
       </fileset>
     <classpath>
-      <pathelement location="${hsqldb.jar}"/>
+      <pathelement location="${cosmo.test.userdb.jar}"/>
     </classpath>
     </sql>
   </target>
@@ -160,13 +160,6 @@
     <copy todir="${cosmo.dist.web}">
       <fileset dir="${web.build}/webapp"/>
     </copy>
-    <copy todir="${cosmo.dist.tomcat}/conf/Catalina/localhost"
-          file="${cosmo.etc}/cosmo.xml">
-      <filterset>
-        <filter token="RELOADABLE" value="${compile.debug}"/>
-        <filter token="VERSION" value="${cosmo.version}"/>
-      </filterset>
-    </copy>
   </target>
 
   <target name="dist-server"
@@ -180,6 +173,17 @@
     </copy>
     <copy todir="${cosmo.dist.tomcat}/conf"
           file="${cosmo.etc}/server.xml"/>
+    <copy todir="${cosmo.dist.tomcat}/conf/Catalina/localhost"
+          file="${cosmo.etc}/cosmo.xml">
+      <filterset>
+        <filter token="RELOADABLE" value="${compile.debug}"/>
+        <filter token="VERSION" value="${cosmo.version}"/>
+        <filter token="DB_USERNAME" value="${cosmo.dist.userdb.username}"/>
+        <filter token="DB_PASSWORD" value="${cosmo.dist.userdb.password}"/>
+        <filter token="DB_DRIVER" value="${cosmo.dist.userdb.driver}"/>
+        <filter token="DB_URL" value="${cosmo.dist.userdb.url}"/>
+      </filterset>
+    </copy>
     <copy todir="${cosmo.dist.version}/etc">
       <fileset dir="${cosmo.etc}">
         <include name="repository.xml"/>
@@ -192,25 +196,27 @@
           file="${commons-logging.jar}"/>
     <copy todir="${cosmo.dist.tomcat}/common/lib"
           file="${log4j.jar}"/>
-    <!-- XXX: remove and document dropping in your db driver as part of
-         installation -->
-    <copy todir="${cosmo.dist.tomcat}/common/lib"
-          file="${hsqldb.jar}"/>
     <!-- need to make tomcat aware of the jcr classes for webapp
          reloads -->
     <copy todir="${cosmo.dist.tomcat}/common/lib" file="${jcr.jar}"/>
+    <copy todir="${cosmo.dist.tomcat}/common/lib"
+          file="${cosmo.dist.userdb.jar}"/>
   </target>
 
   <target name="dist-data"
-          description="install user database database">
-    <ant dir="${core.home}" target="userdb-setup"
-         inheritAll="false"/>
-    <move todir="${cosmo.dist.version}/data">
-      <fileset dir="${cosmo.home}/data">
-        <exclude name="*.lck"/>
+          description="set up the user database">
+    <echo>Setting up db ${cosmo.dist.userdb.database}</echo>
+    <sql driver="${cosmo.dist.userdb.driver}"
+         url="${cosmo.dist.userdb.url}"
+         userid="${cosmo.dist.userdb.username}"
+         password="${cosmo.dist.userdb.password}">
+      <fileset dir="${cosmo.db}">
+        <include name="schema.sql"/>
       </fileset>
-    </move>
-    <delete dir="${cosmo.home}/data"/>
+      <classpath>
+        <pathelement location="${cosmo.dist.userdb.jar}"/>
+      </classpath>
+    </sql>
   </target>
 
   <target name="dist"

Index: server/docs/TODO.txt
diff -u server/docs/TODO.txt:1.47 server/docs/TODO.txt:1.48
--- server/docs/TODO.txt:1.47	Fri Apr  8 16:53:27 2005
+++ server/docs/TODO.txt	Mon Apr 11 17:13:28 2005
@@ -2,6 +2,14 @@
 0.1 RELEASE
 ===========
 
+core:
+
+ * don't pack hibernate config file in jar and place it somewhere a
+   cosmo admin can find it to tweak the dialect
+ * cache hibernate collections
+ * re-implement user pages without the goofy form-based user object
+   that is screwing everything up.
+
 docs:
 
  * rewrite all existing docs



More information about the Commits mailing list