[prev in list] [next in list] [prev in thread] [next in thread]
List: ojb-dev
Subject: svn commit: r524313 - in /db/ojb/trunk: build.properties build.xml
From: arminw () apache ! org
Date: 2007-03-30 23:08:56
Message-ID: 20070330230856.9D6681A9838 () eris ! apache ! org
[Download RAW message or body]
Author: arminw
Date: Fri Mar 30 16:08:55 2007
New Revision: 524313
URL: http://svn.apache.org/viewvc?view=rev&rev=524313
Log:
rework build section, centralize OJB's configuration files in new directory
Modified:
db/ojb/trunk/build.properties
db/ojb/trunk/build.xml
Modified: db/ojb/trunk/build.properties
URL: http://svn.apache.org/viewvc/db/ojb/trunk/build.properties?view=diff&rev=524313&r1=524312&r2=524313
==============================================================================
--- db/ojb/trunk/build.properties (original)
+++ db/ojb/trunk/build.properties Fri Mar 30 16:08:55 2007
@@ -88,6 +88,7 @@
src.forrest=${src.doc}/forrest
src.javadoc=${src.doc}/javadoc
src.ojb-blank=${src.dir}/ojb-blank
+config.dir=${src.dir}/config
ojb=${source}/ojb
etc=${source}/etc
test=${build.dir}/test
@@ -128,13 +129,18 @@
# build.compiler=modern
deprecation=true
+# ojb-blank and tutorial properties
+ojb-blank.resource.includes=OJB*.properties,repository.dtd,repository_database.xml,repository_internal.xml
+ojb-blank.lib.includes=antlr*.jar,commons*.jar,hsqldb*.jar,log4j*.jar,torque*.jar,velocity*.jar,xdoclet*.jar,xjavadoc*.jar
+
+
#
# Documentation properties
#
forrest.javadoc.destdir=${build.doc}/src/documentation/content/api
forrest.staticfiles.srcdir=${src.test}/org/apache/ojb
-forrest.staticfiles.destdir=${build.doc}/src/documentation/content
+forrest.staticfiles.destdir=${build.doc}/src/documentation/content/xdocs
forrest.output.dir=${build.doc}/build/site
javadoc.stylesheet=${src.javadoc}/javadoc.css
@@ -177,7 +183,7 @@
minor=0
build=0
version=${major}.${minor}.${build}
-versiondate=2006-XX-XX
+versiondate=2008-XX-XX
ojb-filename-prefix=${project-name}-${version}
#
Modified: db/ojb/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/build.xml?view=diff&rev=524313&r1=524312&r2=524313
==============================================================================
--- db/ojb/trunk/build.xml (original)
+++ db/ojb/trunk/build.xml Fri Mar 30 16:08:55 2007
@@ -329,12 +329,15 @@
<target name="prepare-repository" depends="checkP6Spy, useP6Spy, dontUseP6Spy">
<delete dir="${build.test}" verbose="false"/>
+ <mkdir dir="${build.test}"/>
+ <mkdir dir="${build.test}/ojb"/>
+ <echo message="Preparing properties for database: ${dbmsName}"/>
+ <echo message=" --> jdbcLevel: ${jdbcLevel}"/>
+ <echo message=" --> jdbcRuntimeDriver: ${jdbcRuntimeDriver}"/>
+ <echo message=" --> urlProtocol: ${urlProtocol}"/>
+ <echo message=" --> urlSubprotocol: ${urlSubprotocol}"/>
+ <echo message=" --> urlDbalias: ${urlDbalias}"/>
<copy todir="${build.test}/ojb">
- <fileset dir="${build.srctest}/org/apache/ojb"
- includes="Test_*,database*,repository*,*.properties,*.dtd,*.jdo,*.ccf">
- <exclude name="build.properties" />
- <exclude name="build.xml" />
- </fileset>
<filterset>
<filter token="JCD_ALIAS" value="${jcdAlias}" />
<filter token="DBMS_NAME" value="${dbmsName}" />
@@ -349,14 +352,13 @@
<filter token="TEST_ON_BORROW" value="${testOnBorrow}" />
<filter token="TEST_ON_RETURN" value="${testOnReturn}" />
</filterset>
+ <fileset dir="${config.dir}"
+ includes="repository*,OJB.properties,OJB-logging*,cache.ccf,commons-logging.*,log4j*,simplelog.*,spy.*"
+ excludes="web.xml, repository.xml"
+ />
+ <fileset dir="${build.srctest}/org/apache/ojb"
+ includes="Test_*,repository*,*.properties"/>
</copy>
- <echo message="Preparing properties for database: ${dbmsName}"/>
- <echo message=" --> jdbcLevel: ${jdbcLevel}"/>
- <echo message=" --> jdbcRuntimeDriver: ${jdbcRuntimeDriver}"/>
- <echo message=" --> urlProtocol: ${urlProtocol}"/>
- <echo message=" --> urlSubprotocol: ${urlSubprotocol}"/>
- <echo message=" --> urlDbalias: ${urlDbalias}"/>
-
<copy file="${src.test}/org/apache/ojb/faraway-db/OJB_FarAway.properties" \
tofile="${build.test}/OJB_FarAway.properties"/>
<copy file="${src.test}/org/apache/ojb/faraway-db/OJB_FarAway.script" \
tofile="${build.test}/OJB_FarAway.script"/>
@@ -539,7 +541,10 @@
<!-- 2. OJB.properties and repository*.* files -->
<copy todir="${build.dir}/WEB-INF/classes">
- <fileset dir="${build.test}/ojb" includes="*.properties,*.dtd,*.xml"/>
+ <fileset dir="${config.dir}"
+ includes="repository*,OJB.properties,OJB-logging*,cache.ccf,commons-logging.*,log4j*,simplelog.*,spy.*"
+ excludes=""
+ />
</copy>
<!-- 3. additional jar files -->
@@ -591,13 +596,14 @@
<!-- 2. OJB.properties and repository*.* files -->
<copy todir="${build.servlet}/WEB-INF/classes">
- <fileset dir="${build.test}/ojb" includes="*.properties,*.dtd,*.xml">
- <exclude name="Test_*"/>
- </fileset>
+ <fileset dir="${config.dir}"
+ includes="repository*,OJB.properties,OJB-logging*,cache.ccf,commons-logging.*,log4j*,simplelog.*,spy.*"
+ excludes="web.xml"
+ />
</copy>
<copy todir="${build.servlet}/WEB-INF">
- <fileset dir="${build.srctest}/org/apache/ojb" includes="web.xml"/>
+ <fileset dir="${config.dir}" includes="web.xml"/>
</copy>
<!-- 3. additional jar files -->
@@ -609,9 +615,9 @@
<!-- 4. the business code, that is our servlet-->
- <copy todir="${build.servlet}/WEB-INF/classes">
- <fileset dir="${build.dest}" \
includes="org/apache/ojb/broker/locking/**"/>
- </copy>
+ <!--<copy todir="${build.servlet}/WEB-INF/classes">-->
+ <!--<fileset dir="${build.dest}" \
includes="org/apache/ojb/broker/locking/**"/>--> + <!--</copy>-->
<jar jarfile="${dist}/ojb-lockserver.war" basedir="${build.servlet}"
includes="WEB-INF/**"/>
@@ -647,12 +653,13 @@
<copy file="${dist}/${archive}.jar" todir="${build.ojb-blank}/lib"/>
<copy todir="${build.ojb-blank}/src/resources">
- <fileset dir="${src.test}/org/apache/ojb">
- <include name="OJB*.properties" />
- <include name="repository.dtd" />
- <include name="repository_database.xml" />
- <include name="repository_internal.xml" />
- </fileset>
+ <fileset dir="${config.dir}"
+ includes="${ojb-blank.resource.includes}"/>
+ <filterset>
+ <filter token="VALIDATION_QUERY" value="${validationQuery}"/>
+ <filter token="TEST_ON_BORROW" value="${testOnBorrow}"/>
+ <filter token="TEST_ON_RETURN" value="${testOnReturn}"/>
+ </filterset>
</copy>
<copy todir="${build.ojb-blank}">
@@ -670,17 +677,8 @@
<copy file="build-torque.xml" todir="${build.ojb-blank}/src/schema"/>
<copy todir="${build.ojb-blank}/lib">
- <fileset dir="${lib}">
- <include name="antlr*.jar"/>
- <include name="commons*.jar"/>
- <include name="hsqldb*.jar"/>
- <include name="log4j*.jar"/>
- <include name="pico*.jar"/>
- <include name="torque*.jar"/>
- <include name="velocity*.jar"/>
- <include name="xdoclet*.jar"/>
- <include name="xjavadoc*.jar"/>
- </fileset>
+ <fileset dir="${lib}"
+ includes="${ojb-blank.lib.includes}"/>
</copy>
<jar jarfile="${dist}/ojb-blank.jar"
@@ -700,6 +698,7 @@
<!-- We're using fresh ojb-blank's and copy the tutorial source into it
to generate the quickstart apps -->
<!-- Tutorial 1 -->
+ <echo message="* Build Tutorial 1 *"/>
<delete dir="${build.ojb-quickstart}" verbose="false" failonerror="false"/>
<unjar src="${dist}/ojb-blank.jar" dest="${build.dir}/ojb-quickstart"/>
<copy todir="${build.ojb-quickstart}/src/java">
@@ -731,6 +730,7 @@
<move file="${build.ojb-quickstart}/target/tutorial1-quickstart.jar" \
todir="${dist}"/>
<!-- Tutorial 2 -->
+ <echo message="* Build Tutorial 2 *"/>
<delete dir="${build.ojb-quickstart}" verbose="false" failonerror="false"/>
<unjar src="${dist}/ojb-blank.jar" dest="${build.dir}/ojb-quickstart"/>
<copy todir="${build.ojb-quickstart}/src/java">
@@ -812,24 +812,24 @@
<target name="run-forrest"
description="Generates the complete site documentation using Forrest">
<!-- Copy auxiliary documentation src files to the temporary directory -->
- <copy file="${forrest.staticfiles.srcdir}/repository.dtd"
+ <copy file="release-notes.txt"
+ tofile="${forrest.staticfiles.destdir}/release-notes.txt" />
+ <copy file="${config.dir}/OJB.properties"
+ tofile="${forrest.staticfiles.destdir}/OJB.properties.txt" />
+ <copy file="${config.dir}/repository.dtd"
tofile="${forrest.staticfiles.destdir}/repository.dtd.txt" />
- <copy file="${forrest.staticfiles.srcdir}/repository.xml"
+ <copy file="${config.dir}/repository.xml"
tofile="${forrest.staticfiles.destdir}/repository.xml.txt" />
- <copy file="${forrest.staticfiles.srcdir}/repository_database.xml"
+ <copy file="${config.dir}/repository_database.xml"
tofile="${forrest.staticfiles.destdir}/repository_database.xml.txt" />
- <copy file="${forrest.staticfiles.srcdir}/repository_internal.xml"
+ <copy file="${config.dir}/repository_internal.xml"
tofile="${forrest.staticfiles.destdir}/repository_internal.xml.txt" />
+ <copy file="${config.dir}/repository_user.xml"
+ tofile="${forrest.staticfiles.destdir}/repository_user.xml.txt" />
<copy file="${forrest.staticfiles.srcdir}/repository_junit.xml"
tofile="${forrest.staticfiles.destdir}/repository_junit.xml.txt" />
- <copy file="${forrest.staticfiles.srcdir}/repository_user.xml"
- tofile="${forrest.staticfiles.destdir}/repository_user.xml.txt" />
<copy file="${src.samples}/org/apache/ojb/tutorials/PBExample.java"
tofile="${forrest.staticfiles.destdir}/PBExamples.txt" />
- <copy file="${forrest.staticfiles.srcdir}/OJB.properties"
- tofile="${forrest.staticfiles.destdir}/OJB.properties.txt" />
- <copy file="release-notes.txt"
- tofile="${forrest.staticfiles.destdir}/release-notes.txt" />
<mkdir dir="${forrest.staticfiles.destdir}/dtdx"/>
@@ -839,7 +839,7 @@
should be fixed in next version of forrest
-->
<echo>Workaround: Copy repository.dtd to a Forrest installation \
directory</echo>
- <copy file="${forrest.staticfiles.srcdir}/repository.dtd"
+ <copy file="${config.dir}/repository.dtd"
todir="${env.FORREST_HOME}/main/webapp/resources/schema/dtd"/>
<!-- Do temporary copy OJB's repository.dtd to Forrest directory, will be \
removed at end of process --> @@ -1234,7 +1234,7 @@
<include name="repository.dtd Test_Repository_Renamed_DTD.xml"/>
</fileset>
</copy>
- <copy file="${res.src}/repository.dtd" \
tofile="${res.jar.dir}/tmp/test_renamed_repository.dtd"/> + <copy \
file="${config.dir}/repository.dtd" \
tofile="${res.jar.dir}/tmp/test_renamed_repository.dtd"/>
<copy file="${res.src}/Test_Repository_Renamed_DTD.xml" \
todir="${res.jar.dir}/tmp"/>
<jar jarfile="${res.jar.dir}/tmp/${res.jar.name}"
@@ -1246,16 +1246,8 @@
</target>
<!-- ================================================================== -->
- <!-- Perform JUnit Tests -->
+ <!-- Perform JUnit Tasks -->
<!-- ================================================================== -->
- <target name="junit-environment-check">
- <available classname="junit.framework.TestCase" property="junit.available"/>
- <fail unless="junit.available" message="Please make JUnit available in the \
classpath, e.g. by copying the junit.jar from OJB's lib subdirectory into the lib \
subdirectory of your Ant installation (${env.ANT_HOME}/lib)." />
- </target>
-
- <target name="junit" depends="junit-environment-check, main, junit-no-compile"
- description="Performs all JUnit regression tests."/>
-
<!-- property 'test.package' has to be set at command line -->
<target name="run-test" depends="junit-environment-check, prepare-repository, \
copy-testdb, prepare-test-suite">
<junit printsummary="yes" showoutput="true" fork="yes" \
dir="${build.test}/ojb"> @@ -1270,6 +1262,14 @@
</junit>
</target>
+ <target name="junit-environment-check">
+ <available classname="junit.framework.TestCase" property="junit.available"/>
+ <fail unless="junit.available" message="Please make JUnit available in the \
classpath, e.g. by copying the junit.jar from OJB's lib subdirectory into the lib \
subdirectory of your Ant installation (${env.ANT_HOME}/lib)." /> + </target>
+
+ <target name="junit" depends="junit-environment-check, main, junit-no-compile"
+ description="Performs all JUnit regression tests."/>
+
<target name="junit-no-compile"
depends="junit-environment-check,prepare,prepare-testdb, \
prepare-test-suite, junit-no-compile-no-prepare,junit-no-compile-no-prepare-selected" \
/> @@ -1292,6 +1292,7 @@
haltonfailure="no"
outfile="target/test/tests-odmg" >
</test>
+ <!-- comment out tests for discontinued api's -->
<!--<test name="org.apache.ojb.soda.AllTests"-->
<!--haltonfailure="no"-->
<!--outfile="target/test/tests-soda" >-->
@@ -1356,12 +1357,16 @@
</target>
<target name="junit-report" depends="junit-environment-check" description="create \
JUnit HTML report, requires Xalan">
- <junitreport todir="target/test">
- <fileset dir="target/test">
+ <property name="report.target" value="${build.dir}/test/junit-report"/>
+ <property name="report.src" value="${build.dir}/test/"/>
+ <mkdir dir="${report.target}"/>
+ <junitreport todir="${report.target}">
+ <fileset dir="${report.src}">
<include name="tests-*.xml"/>
</fileset>
- <report format="frames" todir="target/test"/>
+ <report format="frames" todir="${report.target}"/>
</junitreport>
+ <echo message="Create junit-report, see ${report.target}"/>
</target>
<target name="copy-testdb" depends="prepare">
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic