venice-main-classic/build.xml
Eric J. Bowersox 372f548f7f update to older Venice sources to modernize things - revamped the build system
using techniques from newer Dynamo version, allow source to compile and work
using newer versions of J2SDK, Tomcat, BSF, other libraries; bugfixes to get
everything running in a newer environment
2004-03-08 05:13:29 +00:00

191 lines
7.9 KiB
XML

<?xml version="1.0"?>
<!--
The contents of this file are subject to the Mozilla Public License Version 1.1
(the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
WARRANTY OF ANY KIND, either express or implied. See the License for the specific
language governing rights and limitations under the License.
The Original Code is the Venice Web Communities System.
The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
Copyright (C) 2001-04 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
Contributor(s):
-->
<project name="Venice" default="compile">
<!-- ============================================================================
Load build properties
============================================================================ -->
<property file="build.properties"/>
<!-- ============================================================================
Default build properties
============================================================================ -->
<!-- [Compilation control flags] -->
<property name="compile.debug" value="on"/>
<property name="compile.deprecation" value="on"/>
<property name="compile.optimize" value="off"/>
<property name="build.compiler" value="modern"/>
<!-- [Target directories] -->
<property name="deploy.home" value="../venice"/>
<property name="javadoc.home" value="${deploy.home}/javadoc"/>
<!-- [Location of Servlet API 2.3] -->
<property name="servlet.base" value="../servletapi"/>
<property name="servlet.lib" value="${servlet.base}/lib"/>
<property name="servlet.jarfile" value="servlet.jar"/>
<!-- [Location of Commons Collections Library 2.1] -->
<property name="collections.base" value="../commons-collections"/>
<property name="collections.lib" value="${collections.base}"/>
<property name="collections.jarfile" value="commons-collections.jar"/>
<!-- [Location of Jakarta Regexp Library 1.3] -->
<property name="regexp.base" value="../jakarta-regexp"/>
<property name="regexp.lib" value="${regexp.base}"/>
<property name="regexp.jarfile" value="jakarta-regexp-1.3.jar"/>
<!-- [Location of Log4J 1.2.8] -->
<property name="log4j.base" value="../log4j"/>
<property name="log4j.lib" value="${log4j.base}/dist/lib"/>
<property name="log4j.jarfile" value="log4j-1.2.8.jar"/>
<!-- [Location of Bean Scripting Framework 2.3] -->
<property name="bsf.base" value="../bsf"/>
<property name="bsf.lib" value="${bsf.base}/lib"/>
<property name="bsf.jarfile" value="bsf.jar"/>
<!-- [Location of Jacl 1.3.1] -->
<property name="jacl.base" value="../jacl"/>
<property name="jacl.lib" value="${jacl.base}"/>
<property name="jacl.jarfile" value="jacl.jar"/>
<property name="jacl.tcljarfile" value="tcljava.jar"/>
<!-- [Location of Rhino 1.5R4.1] -->
<property name="rhino.base" value="../rhino"/>
<property name="rhino.lib" value="${rhino.base}"/>
<property name="rhino.jarfile" value="js.jar"/>
<!-- ============================================================================
Path references
============================================================================ -->
<path id="base.build.path">
<fileset dir="${servlet.lib}" includes="${servlet.jarfile}"/>
<fileset dir="${collections.lib}" includes="${collections.jarfile}"/>
<fileset dir="${regexp.lib}" includes="${regexp.jarfile}"/>
<fileset dir="${log4j.lib}" includes="${log4j.jarfile}"/>
<fileset dir="${bsf.lib}" includes="${bsf.jarfile}"/>
</path>
<!-- ============================================================================
"mkbasedirs" - Creates the base directories for "fastupdate"
============================================================================ -->
<target name="mkbasedirs">
<mkdir dir="${deploy.home}"/>
<mkdir dir="${deploy.home}/WEB-INF"/>
<mkdir dir="${deploy.home}/WEB-INF/scripts"/>
<mkdir dir="${deploy.home}/WEB-INF/rpcscripts"/>
</target>
<!-- ============================================================================
"fastupdate" - Copies everything to the deployment directory that can be
copied without a restart.
============================================================================ -->
<target name="fastupdate" depends="mkbasedirs">
<copy todir="${deploy.home}"> <!-- this copies all the JSP files and stuff -->
<fileset dir="web"/>
</copy>
<copy todir="${deploy.home}/WEB-INF/scripts"> <!-- this copies all the scripts -->
<fileset dir="scripts"/>
</copy>
<copy todir="${deploy.home}/WEB-INF/rpcscripts"> <!-- this copies all the RPC scripts -->
<fileset dir="rpcscripts"/>
</copy>
</target>
<!-- ============================================================================
"prepare" - Prepare directory for build (copy everything that requires a
restart to take effect)
============================================================================ -->
<target name="prepare" depends="mkbasedirs">
<copy todir="${deploy.home}/WEB-INF">
<fileset dir="etc">
<include name="*.xml"/>
<include name="*.css"/>
<include name="*.dict"/>
</fileset>
</copy>
<mkdir dir="${deploy.home}/WEB-INF/classes"/>
<mkdir dir="${deploy.home}/WEB-INF/lib"/>
<copy todir="${deploy.home}/WEB-INF/lib">
<fileset dir="${collections.lib}" includes="${collections.jarfile}"/>
<fileset dir="${regexp.lib}" includes="${regexp.jarfile}"/>
<fileset dir="${log4j.lib}" includes="${log4j.jarfile}"/>
<fileset dir="${bsf.lib}" includes="${bsf.jarfile}"/>
<!-- <fileset dir="${jacl.lib}" includes="${jacl.jarfile}, ${jacl.tcljarfile}"/> -->
<fileset dir="${rhino.lib}" includes="${rhino.jarfile}"/>
<fileset dir="lib" includes="*.jar"/>
</copy>
<mkdir dir="${deploy.home}/WEB-INF/tlds"/>
<copy todir="${deploy.home}/WEB-INF/tlds">
<fileset dir="tlds">
<include name="*.tld"/>
</fileset>
</copy>
<mkdir dir="${deploy.home}/WEB-INF/temp"/>
<mkdir dir="${javadoc.home}"/>
</target>
<!-- ============================================================================
"compile" - Compile all the Java source
============================================================================ -->
<target name="compile" depends="prepare, fastupdate">
<javac srcdir="src" destdir="${deploy.home}/WEB-INF/classes"
debug="${compile.debug}" optimize="${compile.optimize}" deprecation="${compile.deprecation}">
<classpath>
<pathelement location="${deploy.home}/WEB-INF/classes"/>
<path refid="base.build.path"/>
</classpath>
</javac>
<copy todir="${deploy.home}/WEB-INF/classes">
<fileset dir="src" includes="**/*.properties"/>
</copy>
</target>
<!-- ============================================================================
"javadoc" - Create Javadocs
============================================================================ -->
<target name="javadoc" depends="mkbasedirs,prepare">
<javadoc sourcepath="src" packagenames="*" destdir="${javadoc.home}"/>
</target>
<!-- ============================================================================
"clean" - Cleans up all stuff that was built
============================================================================ -->
<target name="clean">
<delete dir="${deploy.home}"/>
</target>
<!-- ============================================================================
"all" - Build entire project
============================================================================ -->
<target name="all" depends="clean,mkbasedirs,prepare,fastupdate,compile,javadoc"/>
</project>