leosimons 2003/02/07 12:06:52
Modified: . build.xml
Log:
adding a dependency check on avalon-site. This will make the source distribution
fail less miserably, and provides auto-recovery. The problem is the reference to
tools.class.path everywhere, which results in an "../avalon-site/lib not found" error.
I think this is an ugly fix but I have no better idea at this time.
Revision Changes Path
1.92 +747 -675 avalon-logkit/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/avalon-logkit/build.xml,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- build.xml 6 Feb 2003 13:40:26 -0000 1.91
+++ build.xml 7 Feb 2003 20:06:52 -0000 1.92
@@ -1,675 +1,747 @@
-<?xml version="1.0"?>
-
-<!--
-==============================================================================
-
- LogKit build file
-
-Authors:
- Peter Donald <peter at apache.org>
-
-Legal:
- Copyright (c) 2001-2002 The Apache Software Foundation. All Rights Reserved.
-
-==============================================================================
--->
-
-<project name="Avalon Logkit" default="main" basedir=".">
-
- <!--
- Give user a chance to override without editing this file
- (and without typing -D each time he compiles it)
- -->
- <property file="ant.properties"/>
- <property file="${user.home}/.ant.properties"/>
-
- <property name="name" value="logkit"/>
- <property name="Name" value="LogKit"/>
- <property name="version" value="1.2"/>
- <property name="year" value="1999-2003"/>
- <property name="status" value="final"/>
- <property name="release" value="3nd"/>
- <property name="short.version" value="1.2"/>
- <property name="compress.jars" value="true"/>
-
- <!--
- these are here only for those who use jikes compiler. For other
- developers this part makes no difference.
- -->
- <property name="build.compiler.emacs" value="on"/>
- <property name="build.compiler.pedantic" value="true"/>
-
- <property name="debug" value="on"/>
- <property name="optimize" value="off"/>
- <property name="deprecation" value="off"/>
-
- <!-- Set the properties for intermediate directory -->
- <property name="build.dir" value="build"/>
- <property name="build.lib" value="${build.dir}/lib"/>
- <property name="build.src" value="${build.dir}/src"/>
- <property name="build.classes" value="${build.dir}/classes"/>
- <property name="build.javadocs" value="${build.dir}/javadocs"/>
- <property name="build.docs" value="${build.dir}/docs"/>
- <property name="build.testdocs" value="${build.docs}/test"/>
- <property name="build.reports" value="${build.dir}/reports"/>
- <property name="build.context" value="${build.dir}/documentation"/>
- <property name="build.xdocs" value="${build.context}/xdocs"/>
-
- <!-- Set the properties for source directories -->
- <property name="src.dir" value="src"/>
- <property name="lib.dir" value="lib"/>
- <property name="java.dir" value="${src.dir}/java"/>
- <property name="compat.dir" value="${src.dir}/compat"/>
- <property name="test.dir" value="${src.dir}/test"/>
- <property name="tools.dir" value="../avalon/tools"/>
- <property name="docs.dir" value="${build.dir}/docs"/>
- <property name="www.dir" value="../avalon-site/docs/${name}"/>
- <property name="xdocs.dir" value="${src.dir}/xdocs"/>
- <property name="context.dir" value="../avalon/src/documentation"/>
- <property name="javadocs.dir" value="${docs.dir}/api"/>
- <property name="dist.dir" value="dist"/>
- <property name="src.dist.dir" value="src-dist"/>
-
- <property name="tools.jar" value="${java.home}/../lib/tools.jar"/>
- <property name="junit.jar" value="${tools.dir}/lib/junit-3.7.jar"/>
- <property name="j2ee.jar" value="${cjan.dir}/j2ee.jar"/>
- <property name="jdbc.driver.jar" value=""/>
-
- <property name="dist.name" value="${Name}-${version}"/>
- <property name="dist.base" value="distributions"/>
-
- <property name="announce2txt" value="${tools.dir}/announcement2txt.xsl"/>
- <property name="announce2header" value="${tools.dir}/announcement2header.xsl"/>
- <property name="announce2readme" value="${tools.dir}/announcement2readme.xsl"/>
- <property name="announce2site" value="${tools.dir}/announcement2site.xsl"/>
-
- <property name="servlet.jar" value="${lib.dir}/servlet.jar"/>
- <property name="mail.jar" value="${lib.dir}/mail.jar"/>
- <property name="avalon-site.dir" value="../avalon-site"/>
-
- <path id="project.class.path">
- <pathelement path="${java.class.path}" />
- <pathelement location="${junit.jar}"/>
- <pathelement path="${servlet.jar}" />
- <pathelement path="${mail.jar}"/>
- <pathelement path="${j2ee.jar}" />
- <pathelement path="${jdbc.driver.jar}" />
- <fileset dir="${lib.dir}">
- <include name="*.jar" />
- </fileset>
- <pathelement path="${build.classes}" />
- </path>
-
- <path id="tools.class.path">
- <fileset dir="${avalon-site.dir}/lib"/>
- </path>
-
- <path id="test.class.path">
- <path refid="tools.class.path"/>
- <path refid="project.class.path"/>
- </path>
-
- <!-- Main target -->
- <target name="main" depends="jar" description="Build complete"/>
-
- <!-- Help on usage -->
- <target name="usage">
- <echo message=""/>
- <echo message="${Name} Build file"/>
- <echo message="-------------------------------------------------------------"/>
- <echo message=""/>
- <echo message=" available targets are:"/>
- <echo message=""/>
- <echo message=" clean -> cleans up the created directories"/>
- <echo message=" dist -> generates the ${Name} distribution"/>
- <echo message=" dist-lite -> generates the ${Name} distribution without the
javadocs (default)"/>
- <echo message=" docs -> generates the ${Name} Documentation"/>
- <echo message=" jar -> generates the ${Name} jar file"/>
- <echo message=" javadocs -> generates the API documentation (java 1.2+
only)"/>
- <echo message=" real-clean -> cleans up all genereated files and
directories"/>
- <echo message=""/>
- <echo message="-------------------------------------------------------------"/>
- <echo message=""/>
- </target>
-
- <target name="help" depends="usage"/>
-
- <!-- Set up dist properties -->
- <target name="setup-properties" >
-
- </target>
-
- <target name="import-servlet-jar" description="Imports the servlet API if
required">
-
- <mkdir dir="tmp-imports"/>
-
- <property name="jar-version" value="3.2.3"/>
-
- <get
src="http://jakarta.apache.org/builds/jakarta-tomcat/release/v${jar-version}/bin/jakarta-servletapi-${jar-version}.zip"
- dest="tmp-imports/jakarta-servletapi-${jar-version}.zip"
- verbose="true"
- usetimestamp="true"/>
-
- <unzip src="tmp-imports/jakarta-servletapi-${jar-version}.zip"
dest="tmp-imports" />
-
- <copy file="tmp-imports/jakarta-servletapi-${jar-version}/lib/servlet.jar"
todir="${lib.dir}"/>
-
- <delete dir="tmp-imports" />
-
- </target>
-
- <target name="import-log4j-jar" description="Imports the Log4J API if required">
-
-
- <get src="http://www.ibiblio.org/maven/log4j/jars/log4j-1.2.7.jar"
- dest="${lib.dir}/log4j-1.2.7.jar"
- verbose="true"
- usetimestamp="true"/>
-
- </target>
-
-
- <target name="optional-tests" description="Tests for classes missing to the
environment">
-
- <available property="servlet.present"
- classname="javax.servlet.ServletContext"
- classpathref="project.class.path" />
-
- <available property="javax.sql.present"
- classname="javax.sql.DataSource"
- classpathref="project.class.path" />
-
- <available property="javax.jms.present"
- classname="javax.jms.TopicConnection"
- classpathref="project.class.path" />
-
- <available property="javax.mail.present"
- classname="javax.mail.Message"
- classpathref="project.class.path" />
-
- <available property="log4j.present"
- classname="org.apache.log4j.Appender"
- classpathref="project.class.path" />
-
- </target>
-
- <target name="op-warning">
- <echo>**********************************************</echo>
- <echo>*</echo>
- <echo>* Classes needed for output via ${thing} are not </echo>
- <echo>* available. Logkit should build without them</echo>
- <echo>*</echo>
- <echo>* Recovery:</echo>
- <echo>* ${recovery}</echo>
- <echo>*</echo>
- <echo>***********************************************</echo>
- <echo/>
- </target>
-
- <target name="servlet-warn" unless="servlet.present">
- <antcall target="op-warning">
- <param name="thing" value="Servlet"/>
- <param name="recovery"
- value="Run the build target import-servlet-jar and it will download the
servlet api jar - you should be online for that."/>
- </antcall>
- </target>
-
- <target name="mail-warn" unless="javax.mail.present">
- <antcall target="op-warning">
- <param name="thing" value="SMTP"/>
- <param name="recovery"
- value="Get mail.jar from inside javamail-1_2.zip from
http://java.sun.com/products/javamail/ and place it in the lib dir"/>
- </antcall>
- </target>
-
- <target name="jms-warn" unless="javax.jms.present">
- <antcall target="op-warning">
- <param name="thing" value="JMS"/>
- <param name="recovery"
- value="Get jms.jar from inside jms-1_0_2b.zip from
http://java.sun.com/products/jms/docs.html and place it in the lib dir"/>
- </antcall>
- </target>
-
- <target name="sql-warn" unless="javax.sql.present">
- <antcall target="op-warning">
- <param name="thing" value="SQL databases"/>
- <param name="recovery"
- value="Get jdbc2_0-stdext.jar (listed as 'JDBC 2.0 Optional Package
Binary') from http://java.sun.com/products/jdbc/download.html and place it in the lib
dir"/>
- </antcall>
- </target>
-
- <target name="log4j-warn" unless="log4j.present">
- <antcall target="op-warning">
- <param name="thing" value="Log4J"/>
- <param name="recovery"
- value="Run the build target import-log4j-jar and it will download the Log4J
api jar - you should be online for that."/>
- </antcall>
- </target>
-
- <target name="optional-warnings"
depends="jms-warn,sql-warn,servlet-warn,mail-warn,log4j-warn">
- </target>
-
- <!-- Prepares the build directory -->
- <target name="compile" depends="optional-tests, optional-warnings"
description="Compile project">
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${build.classes}"/>
-
-
- <javac srcdir="${java.dir}"
- destdir="${build.classes}"
- debug="${debug}"
- optimize="${optimize}"
- deprecation="${deprecation}"
- target="1.2">
- <classpath>
- <path refid="project.class.path" />
- <path refid="tools.class.path"/>
- </classpath>
- <src path="${test.dir}"/>
- <src path="${compat.dir}"/>
- <exclude name="org/apache/log/output/ServletOutputLogTarget.java"
- unless="servlet.present"/>
- <exclude name="org/apache/log/output/net/SMTPOutputLogTarget.java"
- unless="javax.mail.present"/>
- <exclude name="org/apache/log/output/db/**"
- unless="javax.sql.present"/>
- <exclude name="org/apache/log/output/jms/**"
- unless="javax.jms.present"/>
- <exclude name="org/apache/log/output/test/DBTargetTestCase.java"
- unless="javax.sql.present"/>
- <exclude name="org/apache/log/output/lf5/**"
- unless="log4j.present"/>
- </javac>
-
- <copy todir="${build.classes}">
- <fileset dir="${java.dir}">
- <include name="**/*.properties"/>
- </fileset>
- </copy>
-
- </target>
-
- <target name="test" depends="compile" description="Run tests">
- <mkdir dir="${build.reports}"/>
-
- <echo message="Performing Unit Tests" />
- <junit fork="true" printsummary="yes" dir="${build.reports}">
- <formatter type="plain"/>
- <classpath>
- <path refid="test.class.path"/>
- <pathelement location="${build.classes}"/>
- </classpath>
- <batchtest todir="${build.reports}">
- <fileset dir="${build.classes}">
- <exclude name="**/test/Abstract*TestCase.class"/>
- <include name="**/test/*TestCase.class"/>
- </fileset>
- </batchtest>
- </junit>
-
- </target>
-
- <target name="test-report" depends="compile" description="Run tests with
reports">
- <mkdir dir="${build.testdocs}"/>
- <mkdir dir="${build.reports}"/>
-
- <echo message="Performing Unit Tests" />
- <junit fork="true" printsummary="yes" dir="${build.reports}">
- <formatter type="xml"/>
- <classpath>
- <path refid="test.class.path"/>
- <pathelement location="${build.classes}"/>
- </classpath>
- <batchtest todir="${build.reports}">
- <fileset dir="${build.classes}">
- <exclude name="**/test/Abstract*TestCase.class"/>
- <include name="**/test/*Profile.class" if="test.profile"/>
- <include name="**/test/*TestCase.class"/>
- </fileset>
- </batchtest>
- </junit>
-
- <junitreport todir="${build.reports}">
- <fileset dir="${build.reports}">
- <include name="TEST-*.xml"/>
- </fileset>
- <report format="frames" todir="${build.testdocs}"/>
- </junitreport>
- </target>
-
- <!-- Creates all the .jar file -->
- <target name="jar" depends="compile" description="Build jar file">
-
- <mkdir dir="${build.lib}"/>
-
- <jar jarfile="${build.lib}/${name}.jar" basedir="${build.classes}"
compress="${compress.jars}">
- <include name="org/apache/log/**" />
- <exclude name="**/test/*" />
- </jar>
-
- </target>
-
- <target name="install" depends="jar, install-check-cjan">
-
- <mkdir dir="${cjan.lib}" />
- <copy file="${build.lib}/${name}.jar" todir="${cjan.lib}"/>
-
- </target>
-
- <target name="install-check-cjan" unless="cjan.lib">
- <fail message="cjan.lib not specified." />
- </target>
-
- <target name="uninstall" depends="install-check-cjan">
- <delete file="${build.lib}/${name}.jar" dir="${cjan.lib}"/>
- </target>
-
- <!-- Create the API documentation -->
- <target name="javadocs" description="Build javadocs">
-
- <!-- Hack to exclude javax.sql and javax.jms dependent classes -->
- <delete dir="${build.src}"/>
- <mkdir dir="${build.src}"/>
- <copy todir="${build.src}">
- <fileset dir="${java.dir}">
- <exclude name="org/apache/log/output/ServletOutputLogTarget.java"
- unless="servlet.present"/>
- <exclude name="org/apache/log/output/net/SMTPOutputLogTarget.java"
- unless="javax.mail.present"/>
- <exclude name="org/apache/log/output/db/**"
- unless="javax.sql.present"/>
- <exclude name="org/apache/log/output/jms/**"
- unless="javax.jms.present"/>
- <exclude name="org/apache/log/output/test/DBTargetTestCase.java"
- unless="javax.sql.present"/>
- </fileset>
- </copy>
-
- <delete dir="${build.javadocs}"/>
- <mkdir dir="${build.javadocs}"/>
-
- <javadoc packagenames="org.apache.*"
- sourcepath="${build.src}"
- destdir="${build.javadocs}">
- <classpath refid="project.class.path" />
- <doclet name="com.sun.tools.doclets.standard.Standard">
- <param name="-author"/>
- <param name="-version"/>
- <param name="-doctitle" value="${Name}"/>
- <param name="-windowtitle" value="${Name} API"/>
- <param name="-bottom"
- value=""Copyright © 2001 Apache Jakarta Project. All
Rights Reserved.""/>
- <param name="-link" value="http://java.sun.com/j2se/1.4/docs/api/"/>
- <param name="-link"
value="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/"/>
- <param name="-link" value="http://jakarta.apache.org/avalon/api/"/>
- </doclet>
- </javadoc>
-
- </target>
-
- <target name="anakia-avail">
- <available classname="org.apache.velocity.anakia.AnakiaTask"
- property="AnakiaTask.present">
- <classpath refid="tools.class.path"/>
- </available>
- </target>
-
- <target name="anakia-check" depends="anakia-avail" unless="AnakiaTask.present">
- <echo>
- AnakiaTask is not present! Please check to make sure that
- velocity.jar is in your classpath. The easiest way to build
- the documentation is to checkout jakarta-site CVS and specify
- avalon-site.dir property.
- </echo>
- </target>
-
- <target name="docs" depends="anakia-check" description="Generate documentation
and website">
- <taskdef name="anakia"
- classname="org.apache.velocity.anakia.AnakiaTask">
- <classpath refid="tools.class.path"/>
- </taskdef>
-
- <anakia basedir="${xdocs.dir}"
- destdir="${docs.dir}"
- style="docs.vsl"
- projectfile="stylesheets/project.xml"
- includes="**/*.xml"
- excludes="stylesheets/**, changes.xml, announcement.xml"
- velocitypropertiesfile="src/xdocs/stylesheets/velocity.properties"
- />
-
- <anakia basedir="${xdocs.dir}"
- destdir="${docs.dir}"
- style="changes.vsl"
- projectfile="stylesheets/project.xml"
- includes="changes.xml"
- velocitypropertiesfile="${xdocs.dir}/stylesheets/velocity.properties"
- />
-
- <copy todir="${docs.dir}" filtering="off">
- <fileset dir="${xdocs.dir}">
- <include name="**/images/**"/>
- <include name="**/*.gif"/>
- <include name="**/*.jpg"/>
- <include name="**/*.png"/>
- <include name="**/*.css"/>
- <include name="**/*.js"/>
- </fileset>
- </copy>
- </target>
-
- <!-- Update the www directory -->
- <target name="site-docs" depends="docs,javadocs" description="Build docs for
jakarta site">
-
- <mkdir dir="${www.dir}"/>
-
- <!-- delete all old documents but keep CVS directories -->
- <!-- note that by doing an include the defaultexcludes (CVS dirs) will be kept
-->
- <delete>
- <fileset dir="${www.dir}">
- <include name="**"/>
- </fileset>
- </delete>
-
- <mkdir dir="${www.dir}"/>
-
- <copy todir="${www.dir}">
- <fileset dir="${docs.dir}" />
- </copy>
-
- <copy todir="${www.dir}/api">
- <fileset dir="${build.javadocs}" />
- </copy>
-
-
- </target>
-
- <!-- Create the binary distribution -->
- <target name="bin-dist" depends="jar, docs, javadocs">
-
- <property name="dist.lib" value="${dist.dir}/lib"/>
- <property name="dist.docs" value="${dist.dir}/docs"/>
- <property name="dist.javadocs" value="${dist.dir}/docs/api"/>
-
- <mkdir dir="${dist.dir}"/>
- <mkdir dir="${dist.docs}"/>
- <mkdir dir="${dist.javadocs}"/>
-
- <copy todir="${dist.docs}">
- <fileset dir="${docs.dir}"/>
- </copy>
-
- <copy todir="${dist.javadocs}">
- <fileset dir="${build.javadocs}"/>
- </copy>
-
- <copy file="${build.lib}/${name}.jar"
tofile="${dist.dir}/${name}-${version}.jar"/>
-
- <copy todir="${dist.dir}">
- <fileset dir=".">
- <include name="README"/>
- <include name="KEYS"/>
- <include name="LICENSE"/>
- </fileset>
- </copy>
-
- <chmod dir="${dist.dir}" perm="go-rwx" />
-
- </target>
-
- <!-- Create the source distribution -->
- <target name="src-dist">
-
- <property name="src.dist.src" value="${src.dist.dir}/src"/>
- <property name="src.dist.docs" value="${src.dist.dir}/docs"/>
- <property name="src.dist.javadocs" value="${src.dist.dir}/docs/api"/>
- <property name="src.dist.lib" value="${src.dist.dir}/lib"/>
- <property name="src.dist.tools" value="${src.dist.dir}/tools"/>
-
- <mkdir dir="${src.dist.dir}" />
- <mkdir dir="${src.dist.docs}"/>
- <mkdir dir="${src.dist.javadocs}"/>
-
- <copy todir="${src.dist.lib}">
- <fileset dir="${lib.dir}">
- <include name="README"/>
- <include name="exceptionutil.jar"/>
- </fileset>
- </copy>
-
- <copy todir="${src.dist.src}">
- <fileset dir="${src.dir}"/>
- </copy>
-
- <copy todir="${src.dist.docs}">
- <fileset dir="${docs.dir}"/>
- </copy>
-
- <copy todir="${src.dist.javadocs}">
- <fileset dir="${build.javadocs}"/>
- </copy>
-
- <copy todir="${src.dist.dir}">
- <fileset dir=".">
- <include name="README"/>
- <include name="KEYS"/>
- <include name="LICENSE"/>
- <include name="build.xml"/>
- </fileset>
- </copy>
-
- <chmod perm="+x">
- <fileset dir="${src.dist.dir}">
- <include name="build.sh" />
- </fileset>
- </chmod>
-
- <fixcrlf srcdir="${src.dist.src}/java" includes="**/*.java" eol="lf"/>
-
- <chmod dir="${src.dist.dir}" perm="go-rwx" />
-
- </target>
-
- <!-- Completely build all dists -->
- <target name="dist" depends="site-docs,announcement" description="Build
distribution">
- <mkdir dir="${dist.base}"/>
-
- <antcall target="bin-dist">
- <param name="dist.dir" value="${dist.name}" />
- </antcall>
-
- <zip destfile="${dist.base}/${dist.name}-bin.zip"
- basedir="${dist.name}/.."
- includes="${dist.name}/**"/>
-
- <tar longfile="gnu" tarfile="${dist.base}/${dist.name}-bin.tar">
- <tarfileset dir="${dist.name}/.." username="avalon" group="avalon">
- <include name="${dist.name}/**"/>
- </tarfileset>
- </tar>
-
- <gzip zipfile="${dist.base}/${dist.name}-bin.tar.gz"
- src="${dist.base}/${dist.name}-bin.tar"/>
-
- <delete file="${dist.base}/${dist.name}-bin.tar"/>
- <delete dir="${dist.name}" />
-
- <antcall target="src-dist">
- <param name="src.dist.dir" value="${dist.name}" />
- </antcall>
-
- <zip destfile="${dist.base}/${dist.name}-src.zip"
- basedir="${dist.name}/.."
- includes="${dist.name}/**"/>
-
- <tar longfile="gnu" tarfile="${dist.base}/${dist.name}-src.tar" >
- <tarfileset dir="${dist.name}/.." mode="755" username="avalon"
group="avalon">
- <include name="${dist.name}/build.sh"/>
- </tarfileset>
- <tarfileset dir="${dist.name}/.." username="avalon" group="avalon">
- <include name="${dist.name}/**"/>
- <exclude name="${dist.name}/build.sh"/>
- </tarfileset>
- </tar>
-
- <gzip zipfile="${dist.base}/${dist.name}-src.tar.gz"
- src="${dist.base}/${dist.name}-src.tar"/>
-
- <delete file="${dist.base}/${dist.name}-src.tar"/>
- <delete dir="${dist.name}" />
-
- </target>
-
- <!-- Create the announcements and HEADER.html -->
- <target name="announcement" depends="setup-properties">
-
- <filter token="Name" value="${Name}"/>
- <filter token="name" value="${name}"/>
- <filter token="version" value="${version}"/>
- <filter token="year" value="${year}"/>
- <filter token="status" value="${status}"/>
- <filter token="short-version" value="${short.version}"/>
- <filter token="release" value="${release}"/>
-
- <mkdir dir="${build.dir}" />
- <mkdir dir="${dist.base}" />
-
- <copy todir="${build.xdocs}" overwrite="true" filtering="on">
- <fileset dir="${xdocs.dir}">
- <exclude name="**/images/**"/>
- </fileset>
- </copy>
-
- <style style="${announce2txt}" in="${build.xdocs}/announcement.xml"
out="Announcement.txt"/>
- <style style="${announce2header}" in="${build.xdocs}/announcement.xml"
- out="${dist.base}/HEADER.html"/>
- <style style="${announce2readme}" in="${build.xdocs}/announcement.xml"
- out="${dist.base}/README.html"/>
- <style style="${announce2site}" in="${build.xdocs}/announcement.xml"
- out="jakarta-news.xml"/>
-
- </target>
-
- <target name="recompile" description="Recompile the java files">
- <delete dir="${build.classes}" />
- <antcall target="compile"/>
- </target>
-
- <!-- Cleans up build and distribution directories -->
- <target name="clean" description="Clean build dirs">
- <delete dir="${build.dir}" />
- <delete dir="test" /> <!-- cleanup unit test directory -->
- <delete>
- <fileset dir="." includes="velocity.log*"/>
- <fileset dir="." includes="**/*~" defaultexcludes="no"/>
- </delete>
- </target>
-
- <!-- Cleans absolutely everything up -->
- <target name="distclean" depends="clean">
- <delete dir="${docs.dir}" />
- <delete dir="${dist.base}" />
- </target>
-
-</project>
-
+<?xml version="1.0"?>
+
+<!--
+==============================================================================
+
+ LogKit build file
+
+Authors:
+ Peter Donald <peter at apache.org>
+
+Legal:
+ Copyright (c) 2001-2002 The Apache Software Foundation. All Rights Reserved.
+
+==============================================================================
+-->
+
+<project name="Avalon Logkit" default="main" basedir=".">
+
+ <!--
+ Give user a chance to override without editing this file
+ (and without typing -D each time he compiles it)
+ -->
+ <property file="ant.properties"/>
+ <property file="${user.home}/.ant.properties"/>
+
+ <property name="name" value="logkit"/>
+ <property name="Name" value="LogKit"/>
+ <property name="version" value="1.2"/>
+ <property name="year" value="1999-2003"/>
+ <property name="status" value="final"/>
+ <property name="release" value="3nd"/>
+ <property name="short.version" value="1.2"/>
+ <property name="compress.jars" value="true"/>
+
+ <!--
+ these are here only for those who use jikes compiler. For other
+ developers this part makes no difference.
+ -->
+ <property name="build.compiler.emacs" value="on"/>
+ <property name="build.compiler.pedantic" value="true"/>
+
+ <property name="debug" value="on"/>
+ <property name="optimize" value="off"/>
+ <property name="deprecation" value="off"/>
+
+ <!-- Set the properties for intermediate directory -->
+ <property name="build.dir" value="build"/>
+ <property name="build.lib" value="${build.dir}/lib"/>
+ <property name="build.src" value="${build.dir}/src"/>
+ <property name="build.classes" value="${build.dir}/classes"/>
+ <property name="build.javadocs" value="${build.dir}/javadocs"/>
+ <property name="build.docs" value="${build.dir}/docs"/>
+ <property name="build.testdocs" value="${build.docs}/test"/>
+ <property name="build.reports" value="${build.dir}/reports"/>
+ <property name="build.context" value="${build.dir}/documentation"/>
+ <property name="build.xdocs" value="${build.context}/xdocs"/>
+
+ <!-- Set the properties for source directories -->
+ <property name="src.dir" value="src"/>
+ <property name="lib.dir" value="lib"/>
+ <property name="java.dir" value="${src.dir}/java"/>
+ <property name="compat.dir" value="${src.dir}/compat"/>
+ <property name="test.dir" value="${src.dir}/test"/>
+ <property name="tools.dir" value="../avalon/tools"/>
+ <property name="docs.dir" value="${build.dir}/docs"/>
+ <property name="www.dir" value="../avalon-site/docs/${name}"/>
+ <property name="xdocs.dir" value="${src.dir}/xdocs"/>
+ <property name="context.dir" value="../avalon/src/documentation"/>
+ <property name="javadocs.dir" value="${docs.dir}/api"/>
+ <property name="dist.dir" value="dist"/>
+ <property name="src.dist.dir" value="src-dist"/>
+
+ <property name="tools.jar" value="${java.home}/../lib/tools.jar"/>
+ <property name="junit.jar" value="${tools.dir}/lib/junit-3.7.jar"/>
+ <property name="j2ee.jar" value="${cjan.dir}/j2ee.jar"/>
+ <property name="jdbc.driver.jar" value=""/>
+
+ <property name="dist.name" value="${Name}-${version}"/>
+ <property name="dist.base" value="distributions"/>
+
+ <property name="announce2txt" value="${tools.dir}/announcement2txt.xsl"/>
+ <property name="announce2header" value="${tools.dir}/announcement2header.xsl"/>
+ <property name="announce2readme" value="${tools.dir}/announcement2readme.xsl"/>
+ <property name="announce2site" value="${tools.dir}/announcement2site.xsl"/>
+
+ <property name="servlet.jar" value="${lib.dir}/servlet.jar"/>
+ <property name="mail.jar" value="${lib.dir}/mail.jar"/>
+ <property name="avalon-site.dir" value="../avalon-site"/>
+
+ <path id="project.class.path">
+ <pathelement path="${java.class.path}" />
+ <pathelement location="${junit.jar}"/>
+ <pathelement path="${servlet.jar}" />
+ <pathelement path="${mail.jar}"/>
+ <pathelement path="${j2ee.jar}" />
+ <pathelement path="${jdbc.driver.jar}" />
+ <fileset dir="${lib.dir}">
+ <include name="*.jar" />
+ </fileset>
+ <pathelement path="${build.classes}" />
+ </path>
+
+ <path id="tools.class.path">
+ <fileset dir="${avalon-site.dir}/lib"/>
+ </path>
+
+ <path id="test.class.path">
+ <path refid="tools.class.path"/>
+ <path refid="project.class.path"/>
+ </path>
+
+ <!-- Main target -->
+ <target name="main" depends="jar" description="Build complete"/>
+
+ <!-- Help on usage -->
+ <target name="usage">
+ <echo message=""/>
+ <echo message="${Name} Build file"/>
+ <echo message="-------------------------------------------------------------"/>
+ <echo message=""/>
+ <echo message=" available targets are:"/>
+ <echo message=""/>
+ <echo message=" clean -> cleans up the created directories"/>
+ <echo message=" dist -> generates the ${Name} distribution"/>
+ <echo message=" dist-lite -> generates the ${Name} distribution without the
javadocs (default)"/>
+ <echo message=" docs -> generates the ${Name} Documentation"/>
+ <echo message=" jar -> generates the ${Name} jar file"/>
+ <echo message=" javadocs -> generates the API documentation (java 1.2+
only)"/>
+ <echo message=" real-clean -> cleans up all genereated files and
directories"/>
+ <echo message=""/>
+ <echo message="-------------------------------------------------------------"/>
+ <echo message=""/>
+ </target>
+
+ <target name="help" depends="usage"/>
+
+ <!-- Set up dist properties -->
+ <target name="setup-properties" >
+
+ </target>
+
+ <target name="import-servlet-jar" description="Imports the servlet API if
required">
+
+ <mkdir dir="tmp-imports"/>
+
+ <property name="jar-version" value="3.2.3"/>
+
+ <get
src="http://jakarta.apache.org/builds/jakarta-tomcat/release/v${jar-version}/bin/jakarta-servletapi-${jar-version}.zip"
+ dest="tmp-imports/jakarta-servletapi-${jar-version}.zip"
+ verbose="true"
+ usetimestamp="true"/>
+
+ <unzip src="tmp-imports/jakarta-servletapi-${jar-version}.zip"
dest="tmp-imports" />
+
+ <copy file="tmp-imports/jakarta-servletapi-${jar-version}/lib/servlet.jar"
todir="${lib.dir}"/>
+
+ <delete dir="tmp-imports" />
+
+ </target>
+
+ <target name="import-log4j-jar" description="Imports the Log4J API if required">
+
+ <get src="http://www.ibiblio.org/maven/log4j/jars/log4j-1.2.7.jar"
+ dest="${lib.dir}/log4j-1.2.7.jar"
+ verbose="true"
+ usetimestamp="true"/>
+
+ </target>
+
+ <target name="import-avalon-site" description="Imports the avalon-site"
depends="import-log4j-jar">
+ <!-- these are really old releases. Need to verify we can get the
+ latest of everything and just download that! -->
+ <mkdir dir="${avalon-site.dir}"/>
+ <mkdir dir="${avalon-site.dir}/lib"/>
+
+ <get src="http://www.ibiblio.org/maven/ant/jars/ant-1.4.1.jar"
+ dest="${avalon-site.dir}/lib/ant-1.4.1.jar"
+ verbose="true"
+ usetimestamp="true"/>
+
+ <get
src="http://www.ibiblio.org/maven/commons-collections/jars/commons-collections-2.0.jar"
+ dest="${avalon-site.dir}/lib/commons-collections-2.0.jar"
+ verbose="true"
+ usetimestamp="true"/>
+
+ <get src="http://www.ibiblio.org/maven/jdom/jars/jdom-b8.jar"
+ dest="${avalon-site.dir}/lib/jdom-b8.jar"
+ verbose="true"
+ usetimestamp="true"/>
+
+ <get src="http://www.ibiblio.org/maven/jdom/jars/jdom-b8.jar"
+ dest="${avalon-site.dir}/lib/jdom-b8.jar"
+ verbose="true"
+ usetimestamp="true"/>
+
+ <copy file="${lib.dir}/log4j-1.2.7.jar"
+ tofile="${avalon-site.dir}/lib/log4j-1.2.7.jar"/>
+
+ <get src="http://www.ibiblio.org/maven/velocity/jars/velocity-1.4-dev.jar"
+ dest="${avalon-site.dir}/lib/velocity-1.4-dev.jar"
+ verbose="true"
+ usetimestamp="true"/>
+
+ <get src="http://www.ibiblio.org/maven/xerces/jars/xerces-1.4.4.jar"
+ dest="${avalon-site.dir}/lib/velocity-1.4-dev.jar"
+ verbose="true"
+ usetimestamp="true"/>
+
+ </target>
+
+
+ <target name="optional-tests" description="Tests for classes missing to the
environment">
+
+ <available property="servlet.present"
+ classname="javax.servlet.ServletContext"
+ classpathref="project.class.path" />
+
+ <available property="javax.sql.present"
+ classname="javax.sql.DataSource"
+ classpathref="project.class.path" />
+
+ <available property="javax.jms.present"
+ classname="javax.jms.TopicConnection"
+ classpathref="project.class.path" />
+
+ <available property="javax.mail.present"
+ classname="javax.mail.Message"
+ classpathref="project.class.path" />
+
+ <available property="log4j.present"
+ classname="org.apache.log4j.Appender"
+ classpathref="project.class.path" />
+
+ <available property="avalon-site.present"
+ file="${avalon-site.dir}/lib/velocity-1.4-dev.jar"
+ type="file" />
+
+ </target>
+
+ <target name="op-warning">
+ <echo>******************7****************************</echo>
+ <echo>*</echo>
+ <echo>* Classes needed for output via ${thing} are not </echo>
+ <echo>* available. Logkit should build without them</echo>
+ <echo>*</echo>
+ <echo>* Recovery:</echo>
+ <echo>* ${recovery}</echo>
+ <echo>*</echo>
+ <echo>***********************************************</echo>
+ <echo/>
+ </target>
+
+ <target name="servlet-warn" unless="servlet.present">
+ <antcall target="op-warning">
+ <param name="thing" value="Servlet"/>
+ <param name="recovery"
+ value="Run the build target import-servlet-jar and it will download the
servlet api jar - you should be online for that."/>
+ </antcall>
+ </target>
+
+ <target name="mail-warn" unless="javax.mail.present">
+ <antcall target="op-warning">
+ <param name="thing" value="SMTP"/>
+ <param name="recovery"
+ value="Get mail.jar from inside javamail-1_2.zip from
http://java.sun.com/products/javamail/ and place it in the lib dir"/>
+ </antcall>
+ </target>
+
+ <target name="jms-warn" unless="javax.jms.present">
+ <antcall target="op-warning">
+ <param name="thing" value="JMS"/>
+ <param name="recovery"
+ value="Get jms.jar from inside jms-1_0_2b.zip from
http://java.sun.com/products/jms/docs.html and place it in the lib dir"/>
+ </antcall>
+ </target>
+
+ <target name="sql-warn" unless="javax.sql.present">
+ <antcall target="op-warning">
+ <param name="thing" value="SQL databases"/>
+ <param name="recovery"
+ value="Get jdbc2_0-stdext.jar (listed as 'JDBC 2.0 Optional Package
Binary') from http://java.sun.com/products/jdbc/download.html and place it in the lib
dir"/>
+ </antcall>
+ </target>
+
+ <target name="log4j-warn" unless="log4j.present">
+ <antcall target="op-warning">
+ <param name="thing" value="Log4J"/>
+ <param name="recovery"
+ value="Run the build target import-log4j-jar and it will download the Log4J
api jar - you should be online for that."/>
+ </antcall>
+ </target>
+
+ <target name="avalon-site-warn" unless="avalon-site.present">
+ <echo>******************************************************</echo>
+ <echo>*</echo>
+ <echo>* The avalon-site CVS module is not available.</echo>
+ <echo>* Without it, you cannot build the documentation</echo>
+ <echo>* from source.</echo>
+ <echo>*</echo>
+ <echo>* Recovery:</echo>
+ <echo>* Set the avalon-site.dir property in either</echo>
+ <echo>* ant.properties or ${user.home}/.ant.properties to</echo>
+ <echo>* point at your cvs checkout of avalon-site, or run</echo>
+ <echo>* the build target import-avalon-site and it will</echo>
+ <echo>* check out the required parts of avalon-site into the</echo>
+ <echo>* parent directory.</echo>
+ <echo>*</echo>
+ <echo>* In order to not let the build fail completely, I'll</echo>
+ <echo>* created a directory ${avalon-site.dir}/lib.</echo>
+ <echo>*</echo>
+ <echo>******************************************************</echo>
+ <echo/>
+
+ <mkdir dir="${avalon-site.dir}/lib"/>
+ </target>
+
+ <target name="optional-warnings"
depends="jms-warn,sql-warn,servlet-warn,mail-warn,log4j-warn,avalon-site-warn">
+ </target>
+
+ <!-- Prepares the build directory -->
+ <target name="compile" depends="optional-tests, optional-warnings"
description="Compile project">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.classes}"/>
+
+
+ <javac srcdir="${java.dir}"
+ destdir="${build.classes}"
+ debug="${debug}"
+ optimize="${optimize}"
+ deprecation="${deprecation}"
+ target="1.2">
+ <classpath>
+ <path refid="project.class.path" />
+ <path refid="tools.class.path"/>
+ </classpath>
+ <src path="${test.dir}"/>
+ <src path="${compat.dir}"/>
+ <exclude name="org/apache/log/output/ServletOutputLogTarget.java"
+ unless="servlet.present"/>
+ <exclude name="org/apache/log/output/net/SMTPOutputLogTarget.java"
+ unless="javax.mail.present"/>
+ <exclude name="org/apache/log/output/db/**"
+ unless="javax.sql.present"/>
+ <exclude name="org/apache/log/output/jms/**"
+ unless="javax.jms.present"/>
+ <exclude name="org/apache/log/output/test/DBTargetTestCase.java"
+ unless="javax.sql.present"/>
+ <exclude name="org/apache/log/output/lf5/**"
+ unless="log4j.present"/>
+ </javac>
+
+ <copy todir="${build.classes}">
+ <fileset dir="${java.dir}">
+ <include name="**/*.properties"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="test" depends="compile" description="Run tests">
+ <mkdir dir="${build.reports}"/>
+
+ <echo message="Performing Unit Tests" />
+ <junit fork="true" printsummary="yes" dir="${build.reports}">
+ <formatter type="plain"/>
+ <classpath>
+ <path refid="test.class.path"/>
+ <pathelement location="${build.classes}"/>
+ </classpath>
+ <batchtest todir="${build.reports}">
+ <fileset dir="${build.classes}">
+ <exclude name="**/test/Abstract*TestCase.class"/>
+ <include name="**/test/*TestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+
+ </target>
+
+ <target name="test-report" depends="compile" description="Run tests with reports">
+ <mkdir dir="${build.testdocs}"/>
+ <mkdir dir="${build.reports}"/>
+
+ <echo message="Performing Unit Tests" />
+ <junit fork="true" printsummary="yes" dir="${build.reports}">
+ <formatter type="xml"/>
+ <classpath>
+ <path refid="test.class.path"/>
+ <pathelement location="${build.classes}"/>
+ </classpath>
+ <batchtest todir="${build.reports}">
+ <fileset dir="${build.classes}">
+ <exclude name="**/test/Abstract*TestCase.class"/>
+ <include name="**/test/*Profile.class" if="test.profile"/>
+ <include name="**/test/*TestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+
+ <junitreport todir="${build.reports}">
+ <fileset dir="${build.reports}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="${build.testdocs}"/>
+ </junitreport>
+ </target>
+
+ <!-- Creates all the .jar file -->
+ <target name="jar" depends="compile" description="Build jar file">
+
+ <mkdir dir="${build.lib}"/>
+
+ <jar jarfile="${build.lib}/${name}.jar" basedir="${build.classes}"
compress="${compress.jars}">
+ <include name="org/apache/log/**" />
+ <exclude name="**/test/*" />
+ </jar>
+
+ </target>
+
+ <target name="install" depends="jar, install-check-cjan">
+
+ <mkdir dir="${cjan.lib}" />
+ <copy file="${build.lib}/${name}.jar" todir="${cjan.lib}"/>
+
+ </target>
+
+ <target name="install-check-cjan" unless="cjan.lib">
+ <fail message="cjan.lib not specified." />
+ </target>
+
+ <target name="uninstall" depends="install-check-cjan">
+ <delete file="${build.lib}/${name}.jar" dir="${cjan.lib}"/>
+ </target>
+
+ <!-- Create the API documentation -->
+ <target name="javadocs" description="Build javadocs">
+
+ <!-- Hack to exclude javax.sql and javax.jms dependent classes -->
+ <delete dir="${build.src}"/>
+ <mkdir dir="${build.src}"/>
+ <copy todir="${build.src}">
+ <fileset dir="${java.dir}">
+ <exclude name="org/apache/log/output/ServletOutputLogTarget.java"
+ unless="servlet.present"/>
+ <exclude name="org/apache/log/output/net/SMTPOutputLogTarget.java"
+ unless="javax.mail.present"/>
+ <exclude name="org/apache/log/output/db/**"
+ unless="javax.sql.present"/>
+ <exclude name="org/apache/log/output/jms/**"
+ unless="javax.jms.present"/>
+ <exclude name="org/apache/log/output/test/DBTargetTestCase.java"
+ unless="javax.sql.present"/>
+ </fileset>
+ </copy>
+
+ <delete dir="${build.javadocs}"/>
+ <mkdir dir="${build.javadocs}"/>
+
+ <javadoc packagenames="org.apache.*"
+ sourcepath="${build.src}"
+ destdir="${build.javadocs}">
+ <classpath refid="project.class.path" />
+ <doclet name="com.sun.tools.doclets.standard.Standard">
+ <param name="-author"/>
+ <param name="-version"/>
+ <param name="-doctitle" value="${Name}"/>
+ <param name="-windowtitle" value="${Name} API"/>
+ <param name="-bottom"
+ value=""Copyright © 2001 Apache Jakarta Project. All
Rights Reserved.""/>
+ <param name="-link" value="http://java.sun.com/j2se/1.4/docs/api/"/>
+ <param name="-link" value="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/"/>
+ <param name="-link" value="http://jakarta.apache.org/avalon/api/"/>
+ </doclet>
+ </javadoc>
+
+ </target>
+
+ <target name="anakia-avail">
+ <available classname="org.apache.velocity.anakia.AnakiaTask"
+ property="AnakiaTask.present">
+ <classpath refid="tools.class.path"/>
+ </available>
+ </target>
+
+ <target name="anakia-check" depends="anakia-avail" unless="AnakiaTask.present">
+ <echo>
+ AnakiaTask is not present! Please check to make sure that
+ velocity.jar is in your classpath. The easiest way to build
+ the documentation is to checkout avalon-site CVS and specify
+ avalon-site.dir property.
+
+ You can also run the build target import-avalon-site, to do
+ this automatically.
+ </echo>
+ </target>
+
+ <target name="docs" depends="anakia-check" description="Generate documentation
and website">
+ <taskdef name="anakia"
+ classname="org.apache.velocity.anakia.AnakiaTask">
+ <classpath refid="tools.class.path"/>
+ </taskdef>
+
+ <anakia basedir="${xdocs.dir}"
+ destdir="${docs.dir}"
+ style="docs.vsl"
+ projectfile="stylesheets/project.xml"
+ includes="**/*.xml"
+ excludes="stylesheets/**, changes.xml, announcement.xml"
+ velocitypropertiesfile="src/xdocs/stylesheets/velocity.properties"
+ />
+
+ <anakia basedir="${xdocs.dir}"
+ destdir="${docs.dir}"
+ style="changes.vsl"
+ projectfile="stylesheets/project.xml"
+ includes="changes.xml"
+ velocitypropertiesfile="${xdocs.dir}/stylesheets/velocity.properties"
+ />
+
+ <copy todir="${docs.dir}" filtering="off">
+ <fileset dir="${xdocs.dir}">
+ <include name="**/images/**"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.jpg"/>
+ <include name="**/*.png"/>
+ <include name="**/*.css"/>
+ <include name="**/*.js"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- Update the www directory -->
+ <target name="site-docs" depends="docs,javadocs" description="Build docs for
jakarta site">
+
+ <mkdir dir="${www.dir}"/>
+
+ <!-- delete all old documents but keep CVS directories -->
+ <!-- note that by doing an include the defaultexcludes (CVS dirs) will be kept
-->
+ <delete>
+ <fileset dir="${www.dir}">
+ <include name="**"/>
+ </fileset>
+ </delete>
+
+ <mkdir dir="${www.dir}"/>
+
+ <copy todir="${www.dir}">
+ <fileset dir="${docs.dir}" />
+ </copy>
+
+ <copy todir="${www.dir}/api">
+ <fileset dir="${build.javadocs}" />
+ </copy>
+
+
+ </target>
+
+ <!-- Create the binary distribution -->
+ <target name="bin-dist" depends="jar, docs, javadocs">
+
+ <property name="dist.lib" value="${dist.dir}/lib"/>
+ <property name="dist.docs" value="${dist.dir}/docs"/>
+ <property name="dist.javadocs" value="${dist.dir}/docs/api"/>
+
+ <mkdir dir="${dist.dir}"/>
+ <mkdir dir="${dist.docs}"/>
+ <mkdir dir="${dist.javadocs}"/>
+
+ <copy todir="${dist.docs}">
+ <fileset dir="${docs.dir}"/>
+ </copy>
+
+ <copy todir="${dist.javadocs}">
+ <fileset dir="${build.javadocs}"/>
+ </copy>
+
+ <copy file="${build.lib}/${name}.jar"
tofile="${dist.dir}/${name}-${version}.jar"/>
+
+ <copy todir="${dist.dir}">
+ <fileset dir=".">
+ <include name="README"/>
+ <include name="KEYS"/>
+ <include name="LICENSE"/>
+ </fileset>
+ </copy>
+
+ <chmod dir="${dist.dir}" perm="go-rwx" />
+
+ </target>
+
+ <!-- Create the source distribution -->
+ <target name="src-dist">
+
+ <property name="src.dist.src" value="${src.dist.dir}/src"/>
+ <property name="src.dist.docs" value="${src.dist.dir}/docs"/>
+ <property name="src.dist.javadocs" value="${src.dist.dir}/docs/api"/>
+ <property name="src.dist.lib" value="${src.dist.dir}/lib"/>
+ <property name="src.dist.tools" value="${src.dist.dir}/tools"/>
+
+ <mkdir dir="${src.dist.dir}" />
+ <mkdir dir="${src.dist.docs}"/>
+ <mkdir dir="${src.dist.javadocs}"/>
+
+ <copy todir="${src.dist.lib}">
+ <fileset dir="${lib.dir}">
+ <include name="README"/>
+ <include name="exceptionutil.jar"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${src.dist.src}">
+ <fileset dir="${src.dir}"/>
+ </copy>
+
+ <copy todir="${src.dist.docs}">
+ <fileset dir="${docs.dir}"/>
+ </copy>
+
+ <copy todir="${src.dist.javadocs}">
+ <fileset dir="${build.javadocs}"/>
+ </copy>
+
+ <copy todir="${src.dist.dir}">
+ <fileset dir=".">
+ <include name="README"/>
+ <include name="KEYS"/>
+ <include name="LICENSE"/>
+ <include name="build.xml"/>
+ </fileset>
+ </copy>
+
+ <chmod perm="+x">
+ <fileset dir="${src.dist.dir}">
+ <include name="build.sh" />
+ </fileset>
+ </chmod>
+
+ <fixcrlf srcdir="${src.dist.src}/java" includes="**/*.java" eol="lf"/>
+
+ <chmod dir="${src.dist.dir}" perm="go-rwx" />
+
+ </target>
+
+ <!-- Completely build all dists -->
+ <target name="dist" depends="site-docs,announcement" description="Build
distribution">
+ <mkdir dir="${dist.base}"/>
+
+ <antcall target="bin-dist">
+ <param name="dist.dir" value="${dist.name}" />
+ </antcall>
+
+ <zip destfile="${dist.base}/${dist.name}-bin.zip"
+ basedir="${dist.name}/.."
+ includes="${dist.name}/**"/>
+
+ <tar longfile="gnu" tarfile="${dist.base}/${dist.name}-bin.tar">
+ <tarfileset dir="${dist.name}/.." username="avalon" group="avalon">
+ <include name="${dist.name}/**"/>
+ </tarfileset>
+ </tar>
+
+ <gzip zipfile="${dist.base}/${dist.name}-bin.tar.gz"
+ src="${dist.base}/${dist.name}-bin.tar"/>
+
+ <delete file="${dist.base}/${dist.name}-bin.tar"/>
+ <delete dir="${dist.name}" />
+
+ <antcall target="src-dist">
+ <param name="src.dist.dir" value="${dist.name}" />
+ </antcall>
+
+ <zip destfile="${dist.base}/${dist.name}-src.zip"
+ basedir="${dist.name}/.."
+ includes="${dist.name}/**"/>
+
+ <tar longfile="gnu" tarfile="${dist.base}/${dist.name}-src.tar" >
+ <tarfileset dir="${dist.name}/.." mode="755" username="avalon" group="avalon">
+ <include name="${dist.name}/build.sh"/>
+ </tarfileset>
+ <tarfileset dir="${dist.name}/.." username="avalon" group="avalon">
+ <include name="${dist.name}/**"/>
+ <exclude name="${dist.name}/build.sh"/>
+ </tarfileset>
+ </tar>
+
+ <gzip zipfile="${dist.base}/${dist.name}-src.tar.gz"
+ src="${dist.base}/${dist.name}-src.tar"/>
+
+ <delete file="${dist.base}/${dist.name}-src.tar"/>
+ <delete dir="${dist.name}" />
+
+ </target>
+
+ <!-- Create the announcements and HEADER.html -->
+ <target name="announcement" depends="setup-properties">
+
+ <filter token="Name" value="${Name}"/>
+ <filter token="name" value="${name}"/>
+ <filter token="version" value="${version}"/>
+ <filter token="year" value="${year}"/>
+ <filter token="status" value="${status}"/>
+ <filter token="short-version" value="${short.version}"/>
+ <filter token="release" value="${release}"/>
+
+ <mkdir dir="${build.dir}" />
+ <mkdir dir="${dist.base}" />
+
+ <copy todir="${build.xdocs}" overwrite="true" filtering="on">
+ <fileset dir="${xdocs.dir}">
+ <exclude name="**/images/**"/>
+ </fileset>
+ </copy>
+
+ <style style="${announce2txt}" in="${build.xdocs}/announcement.xml"
out="Announcement.txt"/>
+ <style style="${announce2header}" in="${build.xdocs}/announcement.xml"
+ out="${dist.base}/HEADER.html"/>
+ <style style="${announce2readme}" in="${build.xdocs}/announcement.xml"
+ out="${dist.base}/README.html"/>
+ <style style="${announce2site}" in="${build.xdocs}/announcement.xml"
+ out="jakarta-news.xml"/>
+
+ </target>
+
+ <target name="recompile" description="Recompile the java files">
+ <delete dir="${build.classes}" />
+ <antcall target="compile"/>
+ </target>
+
+ <!-- Cleans up build and distribution directories -->
+ <target name="clean" description="Clean build dirs">
+ <delete dir="${build.dir}" />
+ <delete dir="test" /> <!-- cleanup unit test directory -->
+ <delete>
+ <fileset dir="." includes="velocity.log*"/>
+ <fileset dir="." includes="**/*~" defaultexcludes="no"/>
+ </delete>
+ </target>
+
+ <!-- Cleans absolutely everything up -->
+ <target name="distclean" depends="clean">
+ <delete dir="${docs.dir}" />
+ <delete dir="${dist.base}" />
+ </target>
+
+</project>
+
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]