Author: snoopdave
Date: Thu May 24 08:39:17 2007
New Revision: 541328
URL: http://svn.apache.org/viewvc?view=rev&rev=541328
Log:
Having two copies of planet.properties and hibernate.cfg.xml in Planet was
driving me bonkers, so now the build-test target creates a testcontext with
WEB-INF/classes and such. Also, Planet now uses DatabaseProvider to allow
properties based config, just like Roller.
Removed:
roller/trunk/apps/planet/testdata/hibernate.cfg.xml
roller/trunk/apps/planet/testdata/planet.properties
roller/trunk/apps/planet/testdata/planetRuntimeConfigDefs.xml
roller/trunk/apps/planet/testdata/rome.properties
Modified:
roller/trunk/apps/planet/build.xml
roller/trunk/apps/planet/testdata/planet-custom.properties
Modified: roller/trunk/apps/planet/build.xml
URL:
http://svn.apache.org/viewvc/roller/trunk/apps/planet/build.xml?view=diff&rev=541328&r1=541327&r2=541328
==============================================================================
--- roller/trunk/apps/planet/build.xml (original)
+++ roller/trunk/apps/planet/build.xml Thu May 24 08:39:17 2007
@@ -33,6 +33,7 @@
<property name="src" value="${basedir}/src/java" />
<property name="tools" value="${basedir}/../../tools" />
<property name="test" value="${basedir}/test/java" />
+ <property name="testcontext"
value="${basedir}/build/test/testcontext" />
<property name="web" value="${basedir}/web" />
<!-- build properties -->
@@ -332,7 +333,13 @@
<pathelement location="${tools}/buildtime/ant-1.6.2/ant.jar"/>
</classpath>
</javac>
-
+
+ <mkdir dir="${testcontext}" />
+ <copy todir="${testcontext}">
+ <fileset dir="${web}" excludes="**/jsps/**,**/velocity/**" />
+ <fileset dir="${basedir}/testdata" />
+ </copy>
+
<!-- Copy test resources -->
<copy todir="${build.compile.test}">
<fileset dir="${test}" excludes="**/*.java, **/*.html, **/*.png" />
@@ -368,8 +375,9 @@
<!-- plus our compiled test classes -->
<pathelement location="${build.compile.test}"/>
- <!-- testdata. the equivalent of /WEB-INF/classes in a webapp
-->
- <pathelement location="${basedir}/testdata" />
+ <!-- testdata. the equivalent of /WEB-INF/classes in a webapp
-->
+ <pathelement location="${basedir}/build/test/testcontext" />
+ <pathelement
location="${basedir}/build/test/testcontext/WEB-INF/classes" />
<!-- plus the classpath for jars needed to talk to the test db
-->
<pathelement path="${test.db.cpath}" />
Modified: roller/trunk/apps/planet/testdata/planet-custom.properties
URL:
http://svn.apache.org/viewvc/roller/trunk/apps/planet/testdata/planet-custom.properties?view=diff&rev=541328&r1=541327&r2=541328
==============================================================================
--- roller/trunk/apps/planet/testdata/planet-custom.properties (original)
+++ roller/trunk/apps/planet/testdata/planet-custom.properties Thu May 24
08:39:17 2007
@@ -1,8 +1,11 @@
-jdbc.driverClass=org.apache.derby.jdbc.ClientDriver
-jdbc.connectionURL=jdbc:derby://localhost:3219/planet
-jdbc.username=app
-jdbc.password=app
+database.configurationType=jdbc
+
+database.jdbc.driverClass=org.apache.derby.jdbc.ClientDriver
+database.jdbc.connectionURL=jdbc:derby://localhost:3219/planet
+database.jdbc.username=app
+database.jdbc.password=app
+
hibernate.dialect=org.hibernate.dialect.DerbyDialect
#jdbc.driverClass=com.mysql.jdbc.Driver