You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2007/03/31 01:06:36 UTC
svn commit: r524309 - in /db/ojb/branches/OJB_1_0_RELEASE: build.properties
build.xml
Author: arminw
Date: Fri Mar 30 16:06:36 2007
New Revision: 524309
URL: http://svn.apache.org/viewvc?view=rev&rev=524309
Log:
rework build section, centralize OJB's configuration files in new directory
Modified:
db/ojb/branches/OJB_1_0_RELEASE/build.properties
db/ojb/branches/OJB_1_0_RELEASE/build.xml
Modified: db/ojb/branches/OJB_1_0_RELEASE/build.properties
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/build.properties?view=diff&rev=524309&r1=524308&r2=524309
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/build.properties (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/build.properties Fri Mar 30 16:06:36 2007
@@ -87,6 +87,7 @@
src.javadoc=${src.doc}/javadoc
src.ojb-blank=${src.dir}/ojb-blank
src.check=${src.dir}/check
+config.dir=${src.dir}/config
ojb=${source}/ojb
etc=${source}/etc
test=${build.dir}/test
Modified: db/ojb/branches/OJB_1_0_RELEASE/build.xml
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/build.xml?view=diff&rev=524309&r1=524308&r2=524309
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/build.xml (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/build.xml Fri Mar 30 16:06:36 2007
@@ -327,14 +327,17 @@
<property name="jdbcRuntimeDriver" value="${torque.database.driver}"/>
</target>
- <target name="prepare-repository" depends="checkP6Spy, useP6Spy, dontUseP6Spy">
+ <target name="prepare-repository" depends="prepare,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,7 +352,12 @@
<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>
<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"/>
@@ -521,7 +529,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 -->
@@ -573,13 +584,14 @@
<!-- 2. OJB.properties and repository*.* files -->
<copy todir="${build.servlet}/WEB-INF/classes">
- <fileset dir="${build.test}/ojb" includes="*.properties,*.dtd">
- <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 -->
@@ -591,9 +603,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/**"/>
@@ -652,7 +664,7 @@
<copy file="${dist}/${archive}.jar" todir="${build.ojb-blank}/lib"/>
<copy todir="${build.ojb-blank}/src/resources">
- <fileset dir="${src.test}/org/apache/ojb"
+ <fileset dir="${config.dir}"
includes="${ojb-blank.resource.includes}"/>
<filterset>
<filter token="VALIDATION_QUERY" value="${validationQuery}"/>
@@ -860,24 +872,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="${miscsamples.src.dir}/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"/>
@@ -887,7 +899,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 -->
@@ -1282,7 +1294,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}"
@@ -1294,14 +1306,13 @@
</target>
<!-- ================================================================== -->
- <!-- Perform JUnit Tests -->
+ <!-- Perform JUnit Tasks -->
<!-- ================================================================== -->
- <target name="junit" depends="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="prepare-repository, copy-testdb, prepare-test-suite">
<junit printsummary="yes" showoutput="true" fork="yes" dir="${build.test}/ojb">
+ <jvmarg value="-DOJB.bootLogLevel=INFO" />
+ <jvmarg value="-DOJB.skip.issues=${OJB.skip.issues}" />
<classpath refid="junit-classpath"/>
<formatter type="plain" />
<test name="${test.package}"
@@ -1312,6 +1323,9 @@
</junit>
</target>
+ <target name="junit" depends="main, junit-no-compile"
+ description="Performs all JUnit regression tests."/>
+
<target name="junit-no-compile"
depends="prepare, prepare-testdb, prepare-test-suite, junit-no-compile-no-prepare,junit-no-compile-no-prepare-selected"
/>
@@ -1319,6 +1333,7 @@
<target name="junit-no-compile-no-prepare" unless="ojb.testsToRun">
<junit printsummary="yes" fork="yes" dir="${build.test}/ojb">
+ <jvmarg value="-DOJB.bootLogLevel=INFO" />
<jvmarg value="-DOJB.skip.issues=${OJB.skip.issues}" />
<classpath refid="junit-classpath"/>
<formatter type="plain" />
@@ -1350,6 +1365,7 @@
<target name="junit-no-compile-no-prepare-selected" if="ojb.testsToRun">
<junit printsummary="yes" fork="yes" dir="${build.test}/ojb">
+ <jvmarg value="-DOJB.bootLogLevel=INFO" />
<jvmarg value="-DOJB.skip.issues=${OJB.skip.issues}" />
<classpath refid="junit-classpath"/>
<formatter type="plain" />
@@ -1370,38 +1386,43 @@
</junit>
</target>
- <target name="junit-sqlcount-no-compile"
- depends="prepare, prepare-testdb, junit-sqlcount-no-compile-no-prepare, junit-sqlcount-impossible"
- description="Run the sql statement count tests"
+ <target name="junit-sqlcount-no-compile"
+ depends="prepare, prepare-testdb, junit-sqlcount-no-compile-no-prepare, junit-sqlcount-impossible"
+ description="Run the sql statement count tests"
/>
- <target name="junit-sqlcount-impossible" depends="checkP6Spy" unless="shouldUseP6Spy">
- <echo message="junit-sqlcount does not run without p6spy. Please set ant property -DuseP6Spy=true."/>
- </target>
-
- <!-- run the sql count tests.-->
- <!-- todo: maybe let them run in an extra directory -->
- <target name="junit-sqlcount-no-compile-no-prepare" depends="checkP6Spy" if="shouldUseP6Spy">
- <junit printsummary="yes" fork="yes" dir="${build.test}/ojb">
- <jvmarg value="-DOJB.skip.issues=${OJB.skip.issues}" />
- <classpath refid="junit-classpath"/>
- <formatter type="plain" />
- <formatter type="xml" />
- <test name="org.apache.ojb.broker.sqlcount.AllTests"
- haltonfailure="no"
+ <target name="junit-sqlcount-impossible" depends="checkP6Spy" unless="shouldUseP6Spy">
+ <echo message="junit-sqlcount does not run without p6spy. Please set ant property -DuseP6Spy=true."/>
+ </target>
+
+ <!-- run the sql count tests.-->
+ <!-- todo: maybe let them run in an extra directory -->
+ <target name="junit-sqlcount-no-compile-no-prepare" depends="checkP6Spy" if="shouldUseP6Spy">
+ <junit printsummary="yes" fork="yes" dir="${build.test}/ojb">
+ <jvmarg value="-DOJB.bootLogLevel=INFO" />
+ <jvmarg value="-DOJB.skip.issues=${OJB.skip.issues}" />
+ <classpath refid="junit-classpath"/>
+ <formatter type="plain" />
+ <formatter type="xml" />
+ <test name="org.apache.ojb.broker.sqlcount.AllTests"
+ haltonfailure="no"
outfile="target/test/tests-sqlcount" >
- </test>
- </junit>
- </target>
+ </test>
+ </junit>
+ </target>
<target name="junit-report" depends="" 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>
- </target>
+ <echo message="Create junit-report, see ${report.target}"/>
+ </target>
<target name="copy-testdb" depends="prepare">
<delete file="${build.test}/OJB.properties"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org