<commit_before><?xml version="1.0"?>
<!-- ==========================================================================

 James build file $Revision: 1.94 $  Committed on $Date: 2002/05/30 15:17:10 $ by: $Author: danny $

Authors:
 <NAME> <<EMAIL>>
 Serge
 <NAME> <<EMAIL>>
 <NAME> <<EMAIL>>
 <NAME> <<EMAIL>>
 <NAME> <<EMAIL>>

Legal:
  Copyright (c) 1999-2001 The Apache Software Foundation. All Rights Reserved.


==============================================================================
 -->
<project 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="james"/>
	<property name="Name" value="James"/>
	<property name="version" value="2.1a1"/>
	<property name="year" value="1999-2002"/>
	<!-- There should be no need to override default compiler but need to change
    javac task to run without this -->
	<property name="build.compiler" value="classic"/>
	<!--
    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="build.compiler.depend" value="true"/>
	<property name="build.compiler.fulldepend" value="true"/>
	<property name="debug" value="on"/>
	<property name="optimize" value="on"/>
	<property name="deprecation" value="on"/>
	<!--
       ===================================================================
       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.mailetdocs" value="${build.dir}/mailetdocs"/>
	<property name="build.conf" value="${build.dir}/conf"/>
	<!--
       ===================================================================
       Set the properties for source directories
       ===================================================================
  -->
	<property name="src.dir"      value="src"/>
	<property name="java.dir"     value="${src.dir}/java"/>
	<property name="conf.dir"     value="${src.dir}/conf"/>
	<property name="scripts.dir"  value="${src.dir}/script"/>
	<property name="xdocs.dir"    value="${src.dir}/xdocs"/>
	<property name="docs.src"     value="${xdocs.dir}"/>

        <property name="dist.dir" value="dist/${name}-${version}"/>

        <property name="proposal.base"      value="proposals"/>
	<property name="java.proposal.dir"  value="${proposal.dir}/java"/>
	<property name="conf.proposal.dir"  value="${proposal.dir}/conf"/>

	<property name="lib.dir"    value="lib"/>
	<property name="tools.dir"  value="tools"/>
        <property name="phoenix" value="phoenix-bin"/>

	<property name="docs.dir" value="docs"/>
        <property name="javadocs.dir" value="${docs.dir}/api"/>
	<property name="mailetdocs.dir" value="${docs.dir}/mailet"/>
	<property name="rfcs.dir" value="${docs.dir}/rfclist"/>

        <property name="www.dir" value="www"/>

	<property name="dist.name" value="${name}-${version}"/>
	<property name="constants.file" value="org/apache/james/Constants.java"/>
	<property name="poolconn.file" value="org/apache/james/util/mordred/PoolConnEntry.java"/>
	<property name="conf.file" value="james.conf.xml"/>
	<property name="server.file" value="james.server.xml"/>

	<property name="site.dir" value="../xml-site/sources/james"/>
	<property name="site.docs" value="../xml-site/targets/james"/>
	<!--
       ===================================================================
       Set the classpath
       ===================================================================
  -->
	<property name="xerces.jar" value="${lib.dir}/xerces-1.4.3.jar"/>
	<property name="avalon-jmx.jar" value="${lib.dir}/avalon-jmx-20011230.jar"/>
	<!--
    <property name="activation.jar" value="${lib.dir}/activation.jar"/>
  -->
	<path id="project.class.path">
		<pathelement location="${xerces.jar}"/>
		<pathelement location="${framework.jar}"/>
		<pathelement location="${excalibur.jar}"/>
		<pathelement location="${scratchpad.jar}"/>
		<pathelement location="${logkit.jar}"/>
		<pathelement location="${phoenix.client.jar}"/>
		<pathelement location="${cornerstone.bar}"/>
		<pathelement path="${java.class.path}"/>
		<fileset dir="${lib.dir}">
			<include name="*.jar"/>
			<exclude name="xerces.jar"/>
		</fileset>
		<fileset dir="phoenix-bin/lib">
			<include name="*.jar"/>
		</fileset>
		<pathelement path="${build.classes}"/>
	</path>
	<taskdef name="sar" classname="org.apache.avalon.phoenix.tools.tasks.Sar">
		<classpath refid="project.class.path"/>
	</taskdef>
	<!--
       ===================================================================
                                  Main target
       ===================================================================
  -->
	<target name="main" depends="dist-lite">
        </target>

        <target name="prepare">
		<tstamp/>
		<property name="dist.bin" value="${dist.dir}/bin"/>
		<property name="dist.apps" value="${dist.dir}/apps"/>
		<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"/>
		<property name="src.dist.dir" value="dist-src"/>
		<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"/>
		<property name="src.dist.proposals" value="${src.dist.dir}/proposals"/>
		<available property="jdbc3.present" classname="java.sql.Savepoint"/>
		<mkdir dir="${build.src}"/>
		<copy todir="${build.src}">
			<fileset dir="${java.dir}">
				<include name="${constants.file}"/>
				<include name="${poolconn.file}"/>
			</fileset>
		</copy>
                <mkdir dir="${dist.dir}"/>
		<copy todir="${dist.dir}">
			<fileset dir="${phoenix}">
				<exclude name="CVS/**"/>
			</fileset>
                        <fileset dir=".">
				<include name="release-notes.txt"/>
				<include name="LICENSE.txt"/>
                        </fileset>
		</copy>

		<available classname="org.apache.velocity.anakia.AnakiaTask" property="AnakiaTask.present"/>
		<replace file="${build.src}/${constants.file}" token="@@VERSION@@" value="${version}"/>
		<replace file="${build.src}/${constants.file}" token="@@NAME@@" value="${Name}"/>
		<replace file="${build.src}/${constants.file}" token="@@DATE@@" value="${TODAY}"/>
        </target>

	<target name="prepare-jdbc3" depends="prepare" if="jdbc3.present">
		<replace file="${build.src}/${poolconn.file}" token="/* JDBC_3_ANT_KEY" value=""/>
		<replace file="${build.src}/${poolconn.file}" token="JDBC_3_ANT_KEY */" value=""/>
	</target>

	<target name="prepare-docs" depends="prepare,prepare-jdbc3" unless="AnakiaTask.present">
		<echo>
                AnakiaTask is not present! Please check to make sure that
                velocity.jar is in your classpath.
                Please read http://jakarta.apache.org/site/jakarta-site2.html and
		understand the 'How To: From Scratch' section before attempting
		to build xdocs on your local machine.
                </echo>
        </target>

	<target name="compile" depends="prepare,prepare-jdbc3">
		<available property="jndi.present" classname="javax.naming.InitialContext"/>
		<mkdir dir="${build.classes}"/>
		<javac destdir="${build.classes}" debug="${debug}" optimize="${optimize}" deprecation="${deprecation}">
			<classpath refid="project.class.path"/>
			<src path="${build.src}"/>
			<src path="${java.dir}"/>
			<exclude name="${constants.file}"/>
			<exclude name="${poolconn.file}"/>
			<exclude name="org/apache/james/userrepository/UsersLDAPRepository.java" unless="jndi.present"/>
		</javac>
		<copy todir="${build.classes}">
			<fileset dir="${java.dir}">
				<include name="**/*.properties"/>
				<include name="**/*.xinfo"/>
			</fileset>
		</copy>
	</target>
	<target name="javadocs">
		<delete dir="${build.javadocs}"/>
		<mkdir dir="${build.javadocs}"/>
		<javadoc packagenames="org.apache.*" sourcepath="${java.dir}" destdir="${build.javadocs}">
			<classpath refid="project.class.path"/>
			<doclet name="com.sun.tools.doclets.standard.Standard">
				<param name="-author"/>
				<param name="-version"/>
                                <param name="-breakiterator"/>
				<param name="-use"/>
				<param name="-doctitle" value="${Name} ${version}"/>
				<param name="-windowtitle" value="${Name} API"/>
				<param name="-bottom" value="&quot;Copyright &#169; 2001 Apache Jakarta Project. All Rights Reserved.&quot;"/>
			</doclet>
		</javadoc>
		<javadoc packagenames="org.apache.mailet.*" sourcepath="${java.dir}" destdir="${build.dir}/mailet">
			<classpath refid="project.class.path"/>
			<doclet name="com.sun.tools.doclets.standard.Standard">
				<param name="-author"/>
				<param name="-version"/>
                                <param name="-breakiterator"/>
				<param name="-use"/>
				<param name="-doctitle" value="Apache Jakarta Mailet API"/>
				<param name="-windowtitle" value="Apache Jakarta Mailet API"/>
				<param name="-bottom" value="&quot;Copyright &#169; 2002 Apache Jakarta Project. All Rights Reserved.&quot;"/>
			</doclet>
		</javadoc>
	</target>
        <target name="mailet-docs"></target>

	<target name="xdocs" depends="prepare-docs" if="AnakiaTask.present">
		<taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask"/>
		<anakia basedir="${docs.src}" destdir="${build.docs}/" extension=".html" style="./site.vsl" projectFile="stylesheets/project.xml" excludes="**/stylesheets/** empty.xml" includes="**/*.xml" lastModifiedCheck="true" templatePath="../jakarta-site2/xdocs/stylesheets"/>
		<copy todir="${build.docs}/images" filtering="no">
			<fileset dir="${docs.src}/images">
				<include name="**/*.gif"/>
				<include name="**/*.jpeg"/>
				<include name="**/*.jpg"/>
			</fileset>
		</copy>
                <mkdir dir="${dist.dir}/docs"/>
                <copy todir="${dist.dir}/docs" filtering="no">
                	<fileset dir="${build.docs}"/>
                </copy>

	</target>

        <target name="website" depends="xdocs,javadocs">
		<delete>
			<fileset dir="${www.dir}">
				<exclude name="CVS/**"/>
				<exclude name="rfclist/**"/>
                                <exclude name="javadocs/**"/>
				<exclude name="mailet/**"/>

			</fileset>
		</delete>
		<mkdir dir="${www.dir}"/>
  		<copy todir="${www.dir}" filtering="no">
                	<fileset dir="${build.docs}"/>
                </copy>
		<copy todir="${www.dir}" filtering="no">
                	<fileset dir="${build.dir}">
                        <include name="javadocs/**"/>
                        <include name="mailet/**"/>
                        </fileset>
                </copy>
	</target>
        
	<target name="everything" depends="website,dist-bin,dist-src,dist-mailet-SDK"></target>
        <target name="dist" depends="dist-bin,dist-src,dist-mailet-SDK"></target>

	<target name="sar" depends="prepare,compile">
        <!-- builds james-sar-->
		<mkdir dir="${build.lib}"/>
                <!-- Make james.jar-->
		<jar jarfile="${build.lib}/${name}.jar" basedir="${build.classes}" manifest="${src.dir}/Manifest.mf">
			<include name="org/apache/james/**"/>
			<exclude name="org/apache/mailet/**"/>
		</jar>
                <!-- Make mailet.jar-->
		<jar jarfile="${build.lib}/mailet.jar" basedir="${build.classes}" manifest="${src.dir}/Manifest.mf" includes="org/apache/mailet/**"/>
		<!-- Make sar file-->
                <sar sarfile="${build.lib}/${name}.sar" config="src/conf/james-config.xml" environment="src/conf/james-server.xml" assembly="src/conf/james-assembly.xml">
			<lib dir="${build.lib}/">
				<include name="*.jar"/>
			</lib>
			<lib dir="lib">
				<include name="cornerstone.jar"/>
				<include name="dnsjava-1.2.3.jar"/>
				<include name="activation.jar"/>
				<include name="mail_1_2.jar"/>
				<include name="jakarta-oro-2.0.1.jar"/>
			</lib>
			<zipfileset dir="${conf.dir}" fullpath="conf/sqlResources.xml">
				<include name="sqlResources.xml"/>
			</zipfileset>
		</sar>
        </target>
        <target name="dist-lite" depends="sar">
          <!--installs sar into ./dist/ ready to test-->
          <copy file="${build.lib}/${name}.sar" todir="${dist.dir}/apps"/>
        </target>

        <target name="dist-bin" depends="dist-lite,xdocs,javadocs">
        <mkdir dir="${dist.dir}/downloads/bin"/>
        <!-- binary with phoenix -->
		<zip zipfile="${dist.dir}/downloads/bin/${name}-binary-${version}.zip" >
			<fileset dir="dist">
                                <include name="${name}-${version}/**"/>
                                <exclude name="${name}-${version}/downloads/**"/>
				<include name="release-notes.txt"/>
				<include name="LICENSE.txt"/>
			</fileset>
		</zip>
		<tar longfile="gnu" tarfile="${dist.dir}/downloads/bin/${name}-binary-${version}.tar" >
			<tarfileset dir="dist" username="${name}" group="${name}">
                                <include name="${name}-${version}/**"/>
                                <exclude name="${name}-${version}/downloads/**"/>
				<include name="release-notes.txt"/>
				<include name="LICENSE.txt"/>
			</tarfileset>
		</tar>
		<gzip zipfile="${dist.dir}/downloads/bin/${name}-binary-${version}.tar.gz" src="${dist.dir}/downloads/bin/${name}-binary-${version}.tar"/>
		<delete file="${dist.dir}/downloads/bin/${name}-binary-${version}.tar"/>
		<!-- Sar only-->
		<copy file="${dist.dir}/apps/${name}.sar" todir="${dist.dir}/downloads/bin"/>
        </target>


        <target name="dist-src" depends="dist-lite,xdocs,javadocs">
        <mkdir dir="${dist.dir}/downloads/src"/>
        <zip zipfile="${dist.dir}/downloads/src/${name}-${version}-src.zip" >
			<fileset dir=".">
				<include name="src/**"/>
				<include name="lib/**"/>
				<include name="proposals/**"/>
				<include name="www/**"/>
				<include name="tools/**"/>
				<include name="*.xml"/>
				<include name="*.txt"/>
				<include name="README"/>
				<include name="KEYS"/>
				<include name="build.*"/>
			</fileset>
		</zip>
		<tar longfile="gnu" tarfile="${dist.dir}/downloads/src/${name}-${version}-src.tar"  >
			<tarfileset dir="." username="${name}" group="${name}">
				<include name="src/**"/>
				<include name="lib/**"/>
				<include name="proposals/**"/>
				<include name="www/**"/>
				<include name="tools/**"/>
				<include name="*.xml"/>
				<include name="*.txt"/>
				<include name="README"/>
				<include name="KEYS"/>
				<include name="build.*"/>
			</tarfileset>
		</tar>
	<gzip zipfile="${dist.dir}/downloads/src/${name}-${version}-src.tar.gz" src="${dist.dir}/downloads/src/${name}-${version}-src.tar"/>
	<delete file="${dist.dir}/downloads/src/${name}-${version}-src.tar"/>
        		<!--Source  With Phoenix -->
	<zip zipfile="${dist.dir}/downloads/src/${name}-with-phoenix-${version}-src.zip" >
			<fileset dir=".">
				<include name="${dist.dir}/**"/>
				<exclude name="${dist.dir}/downloads/**"/>
                                <exclude name="${dist.dir}/apps/*.sar"/>
                                <exclude name=""/>
				<include name="*.txt"/>
				<include name="*.xml"/>
				<include name="KEYS"/>
				<include name="README"/>
				<include name="build.*"/>
				<include name="lib/**"/>
				<include name="proposals/**"/>
				<include name="src/**"/>
				<include name="tools/**"/>
				<include name="www/**"/>
			</fileset>
		</zip>
		<tar longfile="gnu" tarfile="${dist.dir}/downloads/src/${name}-with-phoenix-${version}-src.tar" >
			<tarfileset dir="." username="${name}" group="${name}">
				<include name="${dist.dir}/**"/>
				<exclude name="${dist.dir}/downloads/**"/>
                                <exclude name="${dist.dir}/apps/*.sar"/>
				<include name="*.txt"/>
				<include name="*.xml"/>
				<include name="KEYS"/>
				<include name="README"/>
				<include name="build.*"/>
				<include name="lib/**"/>
				<include name="proposals/**"/>
				<include name="src/**"/>
				<include name="tools/**"/>
				<include name="www/**"/>
			</tarfileset>
		</tar>
		<gzip zipfile="${dist.dir}/downloads/src/${name}-with-phoenix-${version}-src.tar.gz" src="${dist.dir}/downloads/src/${name}-with-phoenix-${version}-src.tar"/>
		<delete file="${dist.dir}/downloads/src/${name}-with-phoenix-${version}-src.tar"/>
        </target>


        <target name="dist-mailet-SDK" depends="dist-lite,xdocs,javadocs">
                <mkdir dir="${dist.dir}/MailetSDK/src"/>
                <mkdir dir="${dist.dir}/MailetSDK/javadocs"/>
		<copy todir="${dist.dir}/MailetSDK/src">
                        <fileset dir="src">
				<include name="**/mailet/**"/>
                        </fileset>
                </copy>
                <copy todir="${dist.dir}/MailetSDK/javadocs">
                        <fileset dir="${build.dir}/mailet">
	                        <include name="**/*"/>
                        </fileset>
		</copy>
		<zip zipfile="${dist.dir}/downloads/bin/${name}-MailetSDK-${version}.zip" >
			<fileset dir="dist">
                                <include name="${name}-${version}/**"/>
                                <exclude name="${name}-${version}/downloads/**"/>
                        </fileset>

		</zip>
		<tar longfile="gnu" tarfile="${dist.dir}/downloads/bin/${name}-MailetSDK-${version}.tar" >
			<tarfileset dir="dist" username="${name}" group="${name}">
                                <include name="${name}-${version}/**"/>
                                <exclude name="${name}-${version}/downloads/**"/>

			</tarfileset>
		</tar>
		<gzip zipfile="${dist.dir}/downloads/bin/${name}-MailetSDK-${version}.tar.gz" src="${dist.dir}/downloads/bin/${name}-MailetSDK-${version}.tar"/>
		<delete file="${dist.dir}/downloads/bin/${name}-MailetSDK-${version}.tar"/>
                <delete dir="${dist.dir}/MailetSDK"/>
	</target>
        <target name="clean">
        <delete dir="${dist.dir}"/>
        <delete dir="${build.dir}"/>
        </target>

</project>
<commit_msg>added cvs to the version number<commit_after><?xml version="1.0"?>
<!-- ==========================================================================

 James build file $Revision: 1.95 $  Committed on $Date: 2002/05/30 15:37:26 $ by: $Author: danny $

Authors:
 <NAME> <<EMAIL>>
 Serge
 <NAME> <<EMAIL>>
 <NAME> <<EMAIL>>
 <NAME> <<EMAIL>>
 <NAME> <<EMAIL>>

Legal:
  Copyright (c) 1999-2001 The Apache Software Foundation. All Rights Reserved.


==============================================================================
 -->
<project 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="james"/>
	<property name="Name" value="James"/>
	<property name="version" value="2.1a1-cvs"/>
	<property name="year" value="1999-2002"/>
	<!-- There should be no need to override default compiler but need to change
    javac task to run without this -->
	<property name="build.compiler" value="classic"/>
	<!--
    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="build.compiler.depend" value="true"/>
	<property name="build.compiler.fulldepend" value="true"/>
	<property name="debug" value="on"/>
	<property name="optimize" value="on"/>
	<property name="deprecation" value="on"/>
	<!--
       ===================================================================
       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.mailetdocs" value="${build.dir}/mailetdocs"/>
	<property name="build.conf" value="${build.dir}/conf"/>
	<!--
       ===================================================================
       Set the properties for source directories
       ===================================================================
  -->
	<property name="src.dir"      value="src"/>
	<property name="java.dir"     value="${src.dir}/java"/>
	<property name="conf.dir"     value="${src.dir}/conf"/>
	<property name="scripts.dir"  value="${src.dir}/script"/>
	<property name="xdocs.dir"    value="${src.dir}/xdocs"/>
	<property name="docs.src"     value="${xdocs.dir}"/>

        <property name="dist.dir" value="dist/${name}-${version}"/>

        <property name="proposal.base"      value="proposals"/>
	<property name="java.proposal.dir"  value="${proposal.dir}/java"/>
	<property name="conf.proposal.dir"  value="${proposal.dir}/conf"/>

	<property name="lib.dir"    value="lib"/>
	<property name="tools.dir"  value="tools"/>
        <property name="phoenix" value="phoenix-bin"/>

	<property name="docs.dir" value="docs"/>
        <property name="javadocs.dir" value="${docs.dir}/api"/>
	<property name="mailetdocs.dir" value="${docs.dir}/mailet"/>
	<property name="rfcs.dir" value="${docs.dir}/rfclist"/>

        <property name="www.dir" value="www"/>

	<property name="dist.name" value="${name}-${version}"/>
	<property name="constants.file" value="org/apache/james/Constants.java"/>
	<property name="poolconn.file" value="org/apache/james/util/mordred/PoolConnEntry.java"/>
	<property name="conf.file" value="james.conf.xml"/>
	<property name="server.file" value="james.server.xml"/>

	<property name="site.dir" value="../xml-site/sources/james"/>
	<property name="site.docs" value="../xml-site/targets/james"/>
	<!--
       ===================================================================
       Set the classpath
       ===================================================================
  -->
	<property name="xerces.jar" value="${lib.dir}/xerces-1.4.3.jar"/>
	<property name="avalon-jmx.jar" value="${lib.dir}/avalon-jmx-20011230.jar"/>
	<!--
    <property name="activation.jar" value="${lib.dir}/activation.jar"/>
  -->
	<path id="project.class.path">
		<pathelement location="${xerces.jar}"/>
		<pathelement location="${framework.jar}"/>
		<pathelement location="${excalibur.jar}"/>
		<pathelement location="${scratchpad.jar}"/>
		<pathelement location="${logkit.jar}"/>
		<pathelement location="${phoenix.client.jar}"/>
		<pathelement location="${cornerstone.bar}"/>
		<pathelement path="${java.class.path}"/>
		<fileset dir="${lib.dir}">
			<include name="*.jar"/>
			<exclude name="xerces.jar"/>
		</fileset>
		<fileset dir="phoenix-bin/lib">
			<include name="*.jar"/>
		</fileset>
		<pathelement path="${build.classes}"/>
	</path>
	<taskdef name="sar" classname="org.apache.avalon.phoenix.tools.tasks.Sar">
		<classpath refid="project.class.path"/>
	</taskdef>
	<!--
       ===================================================================
                                  Main target
       ===================================================================
  -->
	<target name="main" depends="dist-lite">
        </target>

        <target name="prepare">
		<tstamp/>
		<property name="dist.bin" value="${dist.dir}/bin"/>
		<property name="dist.apps" value="${dist.dir}/apps"/>
		<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"/>
		<property name="src.dist.dir" value="dist-src"/>
		<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"/>
		<property name="src.dist.proposals" value="${src.dist.dir}/proposals"/>
		<available property="jdbc3.present" classname="java.sql.Savepoint"/>
		<mkdir dir="${build.src}"/>
		<copy todir="${build.src}">
			<fileset dir="${java.dir}">
				<include name="${constants.file}"/>
				<include name="${poolconn.file}"/>
			</fileset>
		</copy>
                <mkdir dir="${dist.dir}"/>
		<copy todir="${dist.dir}">
			<fileset dir="${phoenix}">
				<exclude name="CVS/**"/>
			</fileset>
                        <fileset dir=".">
				<include name="release-notes.txt"/>
				<include name="LICENSE.txt"/>
                        </fileset>
		</copy>

		<available classname="org.apache.velocity.anakia.AnakiaTask" property="AnakiaTask.present"/>
		<replace file="${build.src}/${constants.file}" token="@@VERSION@@" value="${version}"/>
		<replace file="${build.src}/${constants.file}" token="@@NAME@@" value="${Name}"/>
		<replace file="${build.src}/${constants.file}" token="@@DATE@@" value="${TODAY}"/>
        </target>

	<target name="prepare-jdbc3" depends="prepare" if="jdbc3.present">
		<replace file="${build.src}/${poolconn.file}" token="/* JDBC_3_ANT_KEY" value=""/>
		<replace file="${build.src}/${poolconn.file}" token="JDBC_3_ANT_KEY */" value=""/>
	</target>

	<target name="prepare-docs" depends="prepare,prepare-jdbc3" unless="AnakiaTask.present">
		<echo>
                AnakiaTask is not present! Please check to make sure that
                velocity.jar is in your classpath.
                Please read http://jakarta.apache.org/site/jakarta-site2.html and
		understand the 'How To: From Scratch' section before attempting
		to build xdocs on your local machine.
                </echo>
        </target>

	<target name="compile" depends="prepare,prepare-jdbc3">
		<available property="jndi.present" classname="javax.naming.InitialContext"/>
		<mkdir dir="${build.classes}"/>
		<javac destdir="${build.classes}" debug="${debug}" optimize="${optimize}" deprecation="${deprecation}">
			<classpath refid="project.class.path"/>
			<src path="${build.src}"/>
			<src path="${java.dir}"/>
			<exclude name="${constants.file}"/>
			<exclude name="${poolconn.file}"/>
			<exclude name="org/apache/james/userrepository/UsersLDAPRepository.java" unless="jndi.present"/>
		</javac>
		<copy todir="${build.classes}">
			<fileset dir="${java.dir}">
				<include name="**/*.properties"/>
				<include name="**/*.xinfo"/>
			</fileset>
		</copy>
	</target>
	<target name="javadocs">
		<delete dir="${build.javadocs}"/>
		<mkdir dir="${build.javadocs}"/>
		<javadoc packagenames="org.apache.*" sourcepath="${java.dir}" destdir="${build.javadocs}">
			<classpath refid="project.class.path"/>
			<doclet name="com.sun.tools.doclets.standard.Standard">
				<param name="-author"/>
				<param name="-version"/>
                                <param name="-breakiterator"/>
				<param name="-use"/>
				<param name="-doctitle" value="${Name} ${version}"/>
				<param name="-windowtitle" value="${Name} API"/>
				<param name="-bottom" value="&quot;Copyright &#169; 2001 Apache Jakarta Project. All Rights Reserved.&quot;"/>
			</doclet>
		</javadoc>
		<javadoc packagenames="org.apache.mailet.*" sourcepath="${java.dir}" destdir="${build.dir}/mailet">
			<classpath refid="project.class.path"/>
			<doclet name="com.sun.tools.doclets.standard.Standard">
				<param name="-author"/>
				<param name="-version"/>
                                <param name="-breakiterator"/>
				<param name="-use"/>
				<param name="-doctitle" value="Apache Jakarta Mailet API"/>
				<param name="-windowtitle" value="Apache Jakarta Mailet API"/>
				<param name="-bottom" value="&quot;Copyright &#169; 2002 Apache Jakarta Project. All Rights Reserved.&quot;"/>
			</doclet>
		</javadoc>
	</target>
        <target name="mailet-docs"></target>

	<target name="xdocs" depends="prepare-docs" if="AnakiaTask.present">
		<taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask"/>
		<anakia basedir="${docs.src}" destdir="${build.docs}/" extension=".html" style="./site.vsl" projectFile="stylesheets/project.xml" excludes="**/stylesheets/** empty.xml" includes="**/*.xml" lastModifiedCheck="true" templatePath="../jakarta-site2/xdocs/stylesheets"/>
		<copy todir="${build.docs}/images" filtering="no">
			<fileset dir="${docs.src}/images">
				<include name="**/*.gif"/>
				<include name="**/*.jpeg"/>
				<include name="**/*.jpg"/>
			</fileset>
		</copy>
                <mkdir dir="${dist.dir}/docs"/>
                <copy todir="${dist.dir}/docs" filtering="no">
                	<fileset dir="${build.docs}"/>
                </copy>

	</target>

        <target name="website" depends="xdocs,javadocs">
		<delete>
			<fileset dir="${www.dir}">
				<exclude name="CVS/**"/>
				<exclude name="rfclist/**"/>
                                <exclude name="javadocs/**"/>
				<exclude name="mailet/**"/>

			</fileset>
		</delete>
		<mkdir dir="${www.dir}"/>
  		<copy todir="${www.dir}" filtering="no">
                	<fileset dir="${build.docs}"/>
                </copy>
		<copy todir="${www.dir}" filtering="no">
                	<fileset dir="${build.dir}">
                        <include name="javadocs/**"/>
                        <include name="mailet/**"/>
                        </fileset>
                </copy>
	</target>
        
	<target name="everything" depends="website,dist-bin,dist-src,dist-mailet-SDK"></target>
        <target name="dist" depends="dist-bin,dist-src,dist-mailet-SDK"></target>

	<target name="sar" depends="prepare,compile">
        <!-- builds james-sar-->
		<mkdir dir="${build.lib}"/>
                <!-- Make james.jar-->
		<jar jarfile="${build.lib}/${name}.jar" basedir="${build.classes}" manifest="${src.dir}/Manifest.mf">
			<include name="org/apache/james/**"/>
			<exclude name="org/apache/mailet/**"/>
		</jar>
                <!-- Make mailet.jar-->
		<jar jarfile="${build.lib}/mailet.jar" basedir="${build.classes}" manifest="${src.dir}/Manifest.mf" includes="org/apache/mailet/**"/>
		<!-- Make sar file-->
                <sar sarfile="${build.lib}/${name}.sar" config="src/conf/james-config.xml" environment="src/conf/james-server.xml" assembly="src/conf/james-assembly.xml">
			<lib dir="${build.lib}/">
				<include name="*.jar"/>
			</lib>
			<lib dir="lib">
				<include name="cornerstone.jar"/>
				<include name="dnsjava-1.2.3.jar"/>
				<include name="activation.jar"/>
				<include name="mail_1_2.jar"/>
				<include name="jakarta-oro-2.0.1.jar"/>
			</lib>
			<zipfileset dir="${conf.dir}" fullpath="conf/sqlResources.xml">
				<include name="sqlResources.xml"/>
			</zipfileset>
		</sar>
        </target>
        <target name="dist-lite" depends="sar">
          <!--installs sar into ./dist/ ready to test-->
          <copy file="${build.lib}/${name}.sar" todir="${dist.dir}/apps"/>
        </target>

        <target name="dist-bin" depends="dist-lite,xdocs,javadocs">
        <mkdir dir="${dist.dir}/downloads/bin"/>
        <!-- binary with phoenix -->
		<zip zipfile="${dist.dir}/downloads/bin/${name}-binary-${version}.zip" >
			<fileset dir="dist">
                                <include name="${name}-${version}/**"/>
                                <exclude name="${name}-${version}/downloads/**"/>
				<include name="release-notes.txt"/>
				<include name="LICENSE.txt"/>
			</fileset>
		</zip>
		<tar longfile="gnu" tarfile="${dist.dir}/downloads/bin/${name}-binary-${version}.tar" >
			<tarfileset dir="dist" username="${name}" group="${name}">
                                <include name="${name}-${version}/**"/>
                                <exclude name="${name}-${version}/downloads/**"/>
				<include name="release-notes.txt"/>
				<include name="LICENSE.txt"/>
			</tarfileset>
		</tar>
		<gzip zipfile="${dist.dir}/downloads/bin/${name}-binary-${version}.tar.gz" src="${dist.dir}/downloads/bin/${name}-binary-${version}.tar"/>
		<delete file="${dist.dir}/downloads/bin/${name}-binary-${version}.tar"/>
		<!-- Sar only-->
		<copy file="${dist.dir}/apps/${name}.sar" todir="${dist.dir}/downloads/bin"/>
        </target>


        <target name="dist-src" depends="dist-lite,xdocs,javadocs">
        <mkdir dir="${dist.dir}/downloads/src"/>
        <zip zipfile="${dist.dir}/downloads/src/${name}-${version}-src.zip" >
			<fileset dir=".">
				<include name="src/**"/>
				<include name="lib/**"/>
				<include name="proposals/**"/>
				<include name="www/**"/>
				<include name="tools/**"/>
				<include name="*.xml"/>
				<include name="*.txt"/>
				<include name="README"/>
				<include name="KEYS"/>
				<include name="build.*"/>
			</fileset>
		</zip>
		<tar longfile="gnu" tarfile="${dist.dir}/downloads/src/${name}-${version}-src.tar"  >
			<tarfileset dir="." username="${name}" group="${name}">
				<include name="src/**"/>
				<include name="lib/**"/>
				<include name="proposals/**"/>
				<include name="www/**"/>
				<include name="tools/**"/>
				<include name="*.xml"/>
				<include name="*.txt"/>
				<include name="README"/>
				<include name="KEYS"/>
				<include name="build.*"/>
			</tarfileset>
		</tar>
	<gzip zipfile="${dist.dir}/downloads/src/${name}-${version}-src.tar.gz" src="${dist.dir}/downloads/src/${name}-${version}-src.tar"/>
	<delete file="${dist.dir}/downloads/src/${name}-${version}-src.tar"/>
        		<!--Source  With Phoenix -->
	<zip zipfile="${dist.dir}/downloads/src/${name}-with-phoenix-${version}-src.zip" >
			<fileset dir=".">
				<include name="${dist.dir}/**"/>
				<exclude name="${dist.dir}/downloads/**"/>
                                <exclude name="${dist.dir}/apps/*.sar"/>
                                <exclude name=""/>
				<include name="*.txt"/>
				<include name="*.xml"/>
				<include name="KEYS"/>
				<include name="README"/>
				<include name="build.*"/>
				<include name="lib/**"/>
				<include name="proposals/**"/>
				<include name="src/**"/>
				<include name="tools/**"/>
				<include name="www/**"/>
			</fileset>
		</zip>
		<tar longfile="gnu" tarfile="${dist.dir}/downloads/src/${name}-with-phoenix-${version}-src.tar" >
			<tarfileset dir="." username="${name}" group="${name}">
				<include name="${dist.dir}/**"/>
				<exclude name="${dist.dir}/downloads/**"/>
                                <exclude name="${dist.dir}/apps/*.sar"/>
				<include name="*.txt"/>
				<include name="*.xml"/>
				<include name="KEYS"/>
				<include name="README"/>
				<include name="build.*"/>
				<include name="lib/**"/>
				<include name="proposals/**"/>
				<include name="src/**"/>
				<include name="tools/**"/>
				<include name="www/**"/>
			</tarfileset>
		</tar>
		<gzip zipfile="${dist.dir}/downloads/src/${name}-with-phoenix-${version}-src.tar.gz" src="${dist.dir}/downloads/src/${name}-with-phoenix-${version}-src.tar"/>
		<delete file="${dist.dir}/downloads/src/${name}-with-phoenix-${version}-src.tar"/>
        </target>


        <target name="dist-mailet-SDK" depends="dist-lite,xdocs,javadocs">
                <mkdir dir="${dist.dir}/MailetSDK/src"/>
                <mkdir dir="${dist.dir}/MailetSDK/javadocs"/>
		<copy todir="${dist.dir}/MailetSDK/src">
                        <fileset dir="src">
				<include name="**/mailet/**"/>
                        </fileset>
                </copy>
                <copy todir="${dist.dir}/MailetSDK/javadocs">
                        <fileset dir="${build.dir}/mailet">
	                        <include name="**/*"/>
                        </fileset>
		</copy>
		<zip zipfile="${dist.dir}/downloads/bin/${name}-MailetSDK-${version}.zip" >
			<fileset dir="dist">
                                <include name="${name}-${version}/**"/>
                                <exclude name="${name}-${version}/downloads/**"/>
                        </fileset>

		</zip>
		<tar longfile="gnu" tarfile="${dist.dir}/downloads/bin/${name}-MailetSDK-${version}.tar" >
			<tarfileset dir="dist" username="${name}" group="${name}">
                                <include name="${name}-${version}/**"/>
                                <exclude name="${name}-${version}/downloads/**"/>

			</tarfileset>
		</tar>
		<gzip zipfile="${dist.dir}/downloads/bin/${name}-MailetSDK-${version}.tar.gz" src="${dist.dir}/downloads/bin/${name}-MailetSDK-${version}.tar"/>
		<delete file="${dist.dir}/downloads/bin/${name}-MailetSDK-${version}.tar"/>
                <delete dir="${dist.dir}/MailetSDK"/>
	</target>
        <target name="clean">
        <delete dir="${dist.dir}"/>
        <delete dir="${build.dir}"/>
        </target>

</project>

{'fraction_non_alphanumeric': 0.25504670890153547, 'fraction_numerical': 0.004295071405562118, 'mean_word_length': 3.216525183927561, 'pattern_counts': {'":': 0, '<': 785, '<?xml version=': 2, '>': 785, 'https://': 0, 'lorem ipsum': 0, 'www.': 20, 'xml': 34}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 60, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '605131', 'n_tokens_mistral': 12778, 'n_tokens_neox': 11427, 'n_words': 1971}