vgritsenko 2003/09/04 17:42:15
Modified: . build.xml status.xml
Added: . build.properties
Removed: . build.properties.sample
Log:
Extract build properties out of build.xml.
Fix guide target.
Revision Changes Path
1.59 +40 -116 xml-xindice/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-xindice/build.xml,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- build.xml 9 Aug 2003 00:59:33 -0000 1.58
+++ build.xml 5 Sep 2003 00:42:15 -0000 1.59
@@ -29,53 +29,14 @@
- Give the chance to overwrite the definitions by setting the
- build.properties file.
-->
+ <property file="local.build.properties"/>
<property file="build.properties"/>
-
<property environment="ENVIRONMENT"/>
<!-- ===================================================================
-->
<!-- Build definitions
-->
<!-- ===================================================================
-->
- <!-- Project's properties -->
- <property name="project.name" value="xml-xindice"/>
- <property name="project.filename" value="xindice"/>
- <property name="project.version" value="1.1b2"/>
- <property name="project.year" value="1999-2003"/>
- <property name="webapp.name" value="Xindice"/>
-
- <!-- source directories -->
- <property name="root.dir" value="java"/>
- <property name="jar.dir" value="${root.dir}/lib"/>
- <property name="src.dir" value="${root.dir}/src"/>
- <property name="config.dir" value="${basedir}/config"/>
- <property name="test.dir" value="${root.dir}/tests"/>
- <property name="test.src.dir" value="${root.dir}/tests/src"/>
- <property name="tools.dir" value="${basedir}/tools/lib"/>
-
- <!-- destination directories -->
- <property name="build.dir" value="build"/>
- <property name="src.build.dir" value="${build.dir}/classes"/>
- <property name="test.build.dir" value="${build.dir}/classes-tests"/>
- <property name="test.report.dir" value="${build.dir}/test-reports"/>
- <property name="reports.dir" value="${build.dir}/reports"/>
- <property name="api.dir" value="${build.dir}/api"/>
- <property name="dist.dir" value="dist"/>
- <property name="javadoc.pkgs" value="org.apache.xindice.*"/>
-
- <!-- External projects properties -->
- <property name="tomcat.home" value="${ENVIRONMENT.TOMCAT_HOME}"/>
-
- <!-- Testing properties -->
- <property name="test.xmlrpc.driver" value="xerces"/>
- <property name="test.xmlrpc.hostport" value="localhost:8888"/>
- <property name="test.xmlrpc.service-location" value="/xindice/"/>
-
- <!-- Compilation properties -->
- <property name="compile.debug" value="on"/>
- <property name="compile.optimize" value="off"/>
- <property name="compile.nowarn" value="off"/>
- <property name="compile.deprecation" value="on"/>
- <property name="compile.verbose" value="off"/>
+
<fileset dir="${jar.dir}" id="core.jars">
<include name="*.jar"/>
<exclude name="servlet*.jar"/>
@@ -98,18 +59,13 @@
<target name="init" description="Initializes the build">
<tstamp/>
- <mkdir dir="${src.build.dir}"/>
- <mkdir dir="${test.build.dir}"/>
- <mkdir dir="${test.report.dir}"/>
- <mkdir dir="${reports.dir}"/>
- <mkdir dir="${api.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>
<!-- ===================================================================
-->
<!-- Definition of the main targets
-->
<!-- ===================================================================
-->
- <target name="build" depends="init, src-build, test-build, guide-build"
+ <target name="build" depends="src-build, test-build, guide-build"
description="Compiles the source and test code">
</target>
<target name="release" depends="jar-release, war-release"
@@ -124,6 +80,7 @@
<!-- Compiles the source code
-->
<!-- ===================================================================
-->
<target name="src-build" depends="init">
+ <mkdir dir="${src.build.dir}"/>
<javac srcdir="${src.dir}" destdir="${src.build.dir}"
debug="${compile.debug}" optimize="${compile.optimize}"
nowarn="${compile.nowarn}" deprecation="${compile.deprecation}"
verbose="${compile.verbose}">
<classpath>
<path refid="project.class.path"/>
@@ -138,14 +95,8 @@
<!-- ===================================================================
-->
<!-- Compiles and create the release for the guide code
-->
<!-- ===================================================================
-->
- <property name="guide.root.dir" value="${root.dir}/guide"/>
- <property name="guide.src.dir" value="${guide.root.dir}/src"/>
- <property name="guide.build.dir" value="${build.dir}/classes-guide"/>
-
- <target name="guide-init" depends="init">
+ <target name="guide-build" depends="init">
<mkdir dir="${guide.build.dir}"/>
- </target>
- <target name="guide-build" depends="guide-init">
<javac srcdir="${guide.src.dir}" destdir="${guide.build.dir}"
debug="${compile.debug}" optimize="${compile.optimize}"
nowarn="${compile.nowarn}" deprecation="${compile.deprecation}"
verbose="${compile.verbose}">
<classpath>
<path refid="project.class.path"/>
@@ -171,6 +122,8 @@
<!-- Compiles and executes the tests
-->
<!-- ===================================================================
-->
<target name="test-build" depends="src-build">
+ <mkdir dir="${test.build.dir}"/>
+ <mkdir dir="${test.report.dir}"/>
<javac srcdir="${test.src.dir}" destdir="${test.build.dir}"
debug="${compile.debug}" optimize="${compile.optimize}"
nowarn="${compile.nowarn}" deprecation="${compile.deprecation}"
verbose="${compile.verbose}">
<classpath>
<path refid="project.class.path"/>
@@ -186,19 +139,14 @@
<jvmarg value="-Dxindice.home=${basedir}"/>
<jvmarg value="-Dxindice.db.home=${basedir}/build/test-unit"/>
<jvmarg
value="-Dxindice.configuration=${basedir}/config/system.xml"/>
-
- <!-- to show debug logging on screen comment this line and
uncomment the next block -->
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
-
- <!--
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=debug"/>
- -->
+ <jvmarg value="-Dorg.apache.commons.logging.Log=${test.logger}"/>
+ <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=${test.loglevel}"/>
<formatter type="plain" usefile="no"/>
<formatter type="xml"/>
- <test name="org.apache.xindice.UnitTests"
outfile="${test.report.dir}/org.apache.xindice.UnitTests"/>
+ <test name="org.apache.xindice.UnitTests"
+ outfile="${test.report.dir}/org.apache.xindice.UnitTests"/>
<classpath>
<path refid="project.class.path"/>
<pathelement location="${test.build.dir}"/>
@@ -211,19 +159,14 @@
<jvmarg value="-Dxindice.home=${basedir}"/>
<jvmarg value="-Dxindice.db.home=${basedir}/build/test-binary"/>
<jvmarg
value="-Dxindice.configuration=${basedir}/config/system.xml"/>
-
- <!-- to show debug logging on screen comment this line and
uncomment the next block -->
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
-
- <!--
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=debug"/>
- -->
+ <jvmarg value="-Dorg.apache.commons.logging.Log=${test.logger}"/>
+ <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=${test.loglevel}"/>
<formatter type="plain" usefile="no"/>
<formatter type="xml"/>
- <test
name="org.apache.xindice.client.xmldb.resources.BinaryResourceTest"
outfile="${test.report.dir}/org.apache.xindice.client.xmldb.resources.BinaryResourceTest"/>
+ <test
name="org.apache.xindice.client.xmldb.resources.BinaryResourceTest"
+
outfile="${test.report.dir}/org.apache.xindice.client.xmldb.resources.BinaryResourceTest"/>
<classpath>
<path refid="project.class.path"/>
<pathelement location="${test.build.dir}"/>
@@ -236,19 +179,14 @@
<jvmarg value="-Dxindice.home=${basedir}"/>
<jvmarg value="-Dxindice.db.home=${basedir}/build/test-embed"/>
<jvmarg
value="-Dxindice.configuration=${basedir}/config/system.xml"/>
-
- <!-- to show debug logging on screen comment this line and
uncomment the next block -->
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
-
- <!--
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=debug"/>
- -->
+ <jvmarg value="-Dorg.apache.commons.logging.Log=${test.logger}"/>
+ <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=${test.loglevel}"/>
<formatter type="plain" usefile="no"/>
<formatter type="xml"/>
- <test name="org.apache.xindice.IntegrationEmbedTests"
outfile="${test.report.dir}/org.apache.xindice.IntegrationEmbedTests"/>
+ <test name="org.apache.xindice.IntegrationEmbedTests"
+
outfile="${test.report.dir}/org.apache.xindice.IntegrationEmbedTests"/>
<classpath>
<path refid="project.class.path"/>
<pathelement location="${test.build.dir}"/>
@@ -266,14 +204,8 @@
<jvmarg value="-Dtest.xmlrpc.hostport=${test.xmlrpc.hostport}"/>
<jvmarg
value="-Dtest.xmlrpc.service-location=${test.xmlrpc.service-location}"/>
<jvmarg value="-Dtest.xmlrpc.driver=${test.xmlrpc.driver}"/>
-
- <!-- to show debug logging on screen comment this line and
uncomment the next block -->
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
-
- <!--
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=debug"/>
- -->
+ <jvmarg value="-Dorg.apache.commons.logging.Log=${test.logger}"/>
+ <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=${test.loglevel}"/>
<formatter type="plain" usefile="no"/>
<formatter type="xml" />
@@ -291,14 +223,8 @@
<jvmarg value="-Dxindice.home=${basedir}"/>
<jvmarg value="-Dxindice.db.home=${basedir}/build/test-managed"/>
<jvmarg
value="-Dxindice.configuration=${basedir}/config/system.xml"/>
-
- <!-- to show debug logging on screen comment this line and
uncomment the next block -->
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
-
- <!--
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=debug"/>
- -->
+ <jvmarg value="-Dorg.apache.commons.logging.Log=${test.logger}"/>
+ <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=${test.loglevel}"/>
<formatter type="plain" usefile="no"/>
<formatter type="xml"/>
@@ -334,6 +260,7 @@
</target>
<target name="test-report" depends="init">
+ <mkdir dir="${reports.dir}"/>
<junitreport todir="${test.report.dir}">
<fileset dir="${test.report.dir}">
<include name="*.xml"/>
@@ -342,16 +269,14 @@
</junitreport>
</target>
- <target name="test" depends="test-all, test-report">
+ <target name="test" depends="test-all, test-report"
+ description="Run all tests and generate all test reports">
</target>
<target name="test-clean">
<delete dir="${test.build.dir}"/>
</target>
- <!-- reports -->
- <target name="reports" depends="test" description="Generate all project
reports"/>
-
<!-- ===================================================================
-->
<!-- Build the Xindice archives (jar and war)
-->
<!-- ===================================================================
-->
@@ -380,13 +305,13 @@
<include name="system.xml"/>
</webinf>
<!--
- <webinf dir=".">
- <include name="config/*.*"/>
- </webinf>
- <webinf dir="bin">
- <include name="xindicewar"/>
- <include name="xindicewar.bat"/>
- </webinf>
+ <webinf dir=".">
+ <include name="config/*.*"/>
+ </webinf>
+ <webinf dir="bin">
+ <include name="xindicewar"/>
+ <include name="xindicewar.bat"/>
+ </webinf>
-->
<lib refid="core.jars"/>
<manifest>
@@ -401,7 +326,8 @@
<delete
file="${dist.dir}/${project.filename}-${project.version}.war"/>
<delete
file="${dist.dir}/${project.filename}-${project.version}.xml"/>
</target>
- <target name="tomcat-deploy" depends="war-release" description="Deployes
the Xindice webapp into the Tomcat installation">
+
+ <target name="tomcat-deploy" depends="war-release" description="Deploys
the Xindice webapp into the Tomcat installation">
<copy file="${dist.dir}/${project.filename}-${project.version}.xml"
todir="${tomcat.home}/webapps"/>
<copy file="${dist.dir}/${project.filename}-${project.version}.war"
todir="${tomcat.home}/webapps"/>
<!-- TODO: Currently try to test the use of the xindice-1.1b.xml
file for the
@@ -419,7 +345,7 @@
<!-- ===================================================================
-->
<!-- Documentation Build Targets
-->
<!-- ===================================================================
-->
- <target name="javadoc" depends="init">
+ <target name="javadoc" depends="init" description="Creates Javadoc API
documentation">
<delete dir="${api.dir}"/>
<mkdir dir="${api.dir}"/>
<javadoc packagenames="org.apache.xindice.*" destdir="${api.dir}"
overview="${src.dir}/overview.html" author="true" version="true"
protected="true" use="false" windowtitle="Xindice API v${project.version}"
doctitle="Xindice API, version ${project.version}<br>API specification"
header="<b>Xindice API<br>version ${project.version}</b>"
bottom="Copyright (c) ${project.year} The Apache Software Foundation. All
Rights Reserved.">
@@ -439,16 +365,15 @@
<target name="javadoc-clean">
<delete dir="${api.dir}"/>
</target>
+
<target name="gump-target" depends="release"/>
<!-- clover -->
<!--
<taskdef resource="clovertasks"/>
-
<target name="with.clover">
<clover-setup initString="${build.dir}/coverage.db"/>
- </target>
-
+ </target>
<target name="clover.report.html" depends="with.clover">
<clover-report>
<current outfile="clover_html">
@@ -456,9 +381,8 @@
</current>
</clover-report>
</target>
-
<target name="clover.view" depends="with.clover">
<clover-view/>
</target>
- -->
+ -->
</project>
1.11 +4 -0 xml-xindice/status.xml
Index: status.xml
===================================================================
RCS file: /home/cvs/xml-xindice/status.xml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- status.xml 4 Sep 2003 23:03:40 -0000 1.10
+++ status.xml 5 Sep 2003 00:42:15 -0000 1.11
@@ -61,6 +61,10 @@
<!-- Add new releases here -->
<release version="1.1-dev" date="September 4 2003">
<action dev="VG" type="add">
+ Updated build script: all build properties extracted into
build.properties
+ file. You can override them in local.build.properties file.
+ </action>
+ <action dev="VG" type="add">
Added new fault code, DBE_CANNOT_READ
</action>
<action dev="VG" type="add">
1.1 xml-xindice/build.properties
Index: build.properties
===================================================================
#
# Xindice build properties.
#
# NOTE: do not modify this file directly but copy the properties you need
# to modify over to a file named 'local.build.properties' and modify that.
# The build system will override these properties with the ones in the
# 'local.build.properties' file.
#
# CVS $Id: build.properties,v 1.1 2003/09/05 00:42:15 vgritsenko Exp $
#
# ---- Testing
-----------------------------------------------------------------
# The SAX parser to be used by Apache XmlRpc.
# Apache XmlRpc has an internal list of keywords for known parsers; the
# following list is given in terms of those keywords. Value may be set
# to either the keyword or the full classname.
# Tested:
# xerces [org.apache.xerces.parsers.SAXParser] ok
# xp [com.jclark.xml.sax.Driver] NOT ok
# net.sf.saxon.aelfred.SAXDriver ok
# This is a re-packaging of an early aelfred version.
test.xmlrpc.driver=xerces
# The host:port where the xindice server is running.
# Defaults to "localhost:8888".
test.xmlrpc.hostport=localhost:8888
# Xindice web application context directory in the servlet engine. For
# tomcat, a webapp named xindice.war is automatically deployed as
# /xindice. Defaults to "/xindice/".
test.xmlrpc.service-location=/xindice/
# Jakarta commons logger used while running tests.
# NoOpLog: No logging. SimpleLog: logging to console.
test.logger=org.apache.commons.logging.impl.NoOpLog
# Jakarta commons logger log level
test.loglevel=debug
# ---- Compilation
-------------------------------------------------------------
compile.debug=on
compile.optimize=off
compile.nowarn=off
compile.deprecation=on
compile.verbose=off
# ---- Tomcat
------------------------------------------------------------------
# Location of the Jakarta Tomcat directory.
# Environment variable TOMCAT_HOME is used by default.
tomcat.home=${ENVIRONMENT.TOMCAT_HOME}
# ---- System Properties
-------------------------------------------------------
# WARNING: you shouldn't need to modify anything below here since there is a
# very high change of breaking the build system. Do it only if you know what
# you're doing.
# Java packages
javadoc.pkgs=org.apache.xindice.*
# Project's properties
project.name=xml-xindice
project.filename=xindice
project.version=1.1b2
project.year=1999-2003
# Source directories
root.dir=java
jar.dir=${root.dir}/lib
src.dir=${root.dir}/src
config.dir=${basedir}/config
test.dir=${root.dir}/tests
test.src.dir=${root.dir}/tests/src
tools.dir=${basedir}/tools/lib
# Destination directories
build.dir=build
src.build.dir=${build.dir}/classes
test.build.dir=${build.dir}/classes-tests
test.report.dir=${build.dir}/test-reports
reports.dir=${build.dir}/reports
api.dir=${build.dir}/api
dist.dir=dist
# Guide directories
guide.root.dir=${root.dir}/examples/guide
guide.src.dir=${guide.root.dir}/src
guide.build.dir=${build.dir}/classes-guide
webapp.name=xindice