head	1.1;
access;
symbols
	TIGRIS_1_0_5:1.1.2.1
	TIGRIS_1_0:1.1.0.2;
locks; strict;
comment	@# @;


1.1
date	2001.06.04.05.10.46;	author jrobbins;	state dead;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2001.06.04.05.10.46;	author jrobbins;	state Exp;
branches;
next	;


desc
@@


1.1
log
@file build.xml was initially added on branch TIGRIS_1_0.
@
text
@@


1.1.2.1
log
@added java and build dirs so that tirgisinst can override standard properties files: made upload size bigger, removed click-through
@
text
@a0 195
<?xml version="1.0"?>

<!-- Build file for tigrisinst -->

<project name="TigrisInst" default="jar" basedir="..">
	
        <property environment="ENV" />

        <property file="${ENV.SANDBOX}/conf/ant.properties"/>
        <property file="conf/tigrisinst.ant.properties"/>
        <property file="${user.home}/.ant.properties"/>
        <property name="ant.home" value="/usr/lib/java"/>

        <property name="build.dir" value="dest"/>
        <property name="build.src" value="${build.dir}/src"/>
        <property name="build.dest" value="${build.dir}/class"/>
        <property name="conf.dir" value="conf"/>
        <property name="sql.dir" value="${ENV.SANDBOX}/${project}/sql"/>
        <property name="lib.dir" value="lib"/>
        <property name="site.dir" value="${ENV.SANDBOX}/site"/>
        <property name="site.lib.dir" value="${site.dir}/lib"/>
        <property name="site.sql.dir" value="${site.dir}/sql"/>
        <property name="src.java.dir" value="java"/>
        <property name="project.package" value="org/tigris/${project}"/>
        <property name="javadoc.destdir" value="www/apidocs"/>
        <property name="final.name" value="${project}-${version}"/>

        <path id="classpath">
            <fileset dir="${lib.dir}">
                <include name="**/*.jar"/>
            </fileset>
        </path>

    <target name="init">
<!--
        <uptodate property="baseom.uptodate"
                  targetfile="${sql.dir}/output/${project}.generation.report">
            <srcfiles dir="${sql.dir}/schema" includes="${project}-schema.xml"/>
        </uptodate>
-->
    </target>
    <!-- =================================================================== -->
    <!-- Prepares the build directory                                        -->
    <!-- =================================================================== -->
    <target name="prepare">
        <mkdir dir="${build.dir}"/>
        <mkdir dir="${build.dest}"/>
    </target>

    <!-- =================================================================== -->
    <!-- Compiles the source directory                                       -->
    <!-- =================================================================== -->
    <target name="compile" depends="prepare">
        <javac srcdir="${src.java.dir}"
            destdir="${build.dest}"
            debug="${debug}"
            deprecation="${deprecation}"
            optimize="${optimize}">
        <classpath>
            <fileset dir="${site.lib.dir}">
                <include name="**/*.jar"/>
            </fileset>
        </classpath>
	</javac>
        <copy todir="${build.dest}/org">
            <fileset dir="${src.java.dir}/org" includes="**/*.properties"/>
        </copy>
    </target>

    <!-- =================================================================== -->
    <!-- Compiles the source directory and creates a .jar file               -->
    <!-- =================================================================== -->
    <target name="jar" depends="compile">
	<!-- TODO: Use manifest attribute -->
        <jar jarfile="${build.dir}/${project}.jar"
            basedir="${build.dest}"
            excludes="**/package.html"/>
    </target>

    <target name="install" depends="jar">
        <copy file="${build.dir}/${project}.jar"
              tofile="${site.lib.dir}/${project}.jar"/>
        <copy todir="${site.lib.dir}">
            <fileset dir="${lib.dir}" includes="**/*.jar"/>
        </copy>
    </target>

    <!-- =================================================================== -->
    <!-- Runs a 'clean' compile                                              -->
    <!-- =================================================================== -->
    <target name="most" depends="clean,jar"/>
    
    <!-- =================================================================== -->
    <!-- Makes everything including install                                  -->
    <!-- =================================================================== -->
    <target name="all" depends="most,install"/>


    <!-- =================================================================== -->
    <!-- Creates the API documentation                                       -->
    <!-- =================================================================== -->
    <target name="javadocs" depends="prepare">
        <mkdir dir="${javadoc.destdir}"/>
        <javadoc
            sourcepath="${src.java.dir}"
            packagenames="org.tigris.${project}.*"
            destdir="${javadoc.destdir}"
            author="true"
            private="true"
            version="true"
            use="true"
            windowtitle="${Name} ${version} API"
            doctitle="${Name} ${version} API"
            bottom="Copyright &#169; ${year} Tigris.org. All Rights Reserved."
        />
    </target>
    
    <!-- =================================================================== -->
    <!-- Cleans up the build directory                                       -->
    <!-- =================================================================== -->
    <target name="clean">
        <delete dir="${build.dir}"/>
        <delete dir="${sql.dir}/output"/>
    </target>
  
<!--    
    <target name="torque" depends="init,torque-init" unless="baseom.uptodate">
        <taskdef name="torque-om" 
                classname="org.apache.turbine.torque.TorqueObjectModelTask">
            <classpath refid="classpath"/>
        </taskdef>
        <taskdef name="torque-sql"
                 classname="org.apache.turbine.torque.TorqueSQLTask">
            <classpath refid="classpath"/>
        </taskdef>

        <antcall target="project-sql"/>
        <antcall target="project-om"/> 

        <copy file="${torque.home}/output/${project}-schema.sql"
              todir="${sql.dir}/${project.package}"/>

        <copy todir="${src.java.dir}/${project.package}/om">
            <fileset dir="${torque.home}/output/${project.package}/om">
                <include name="**/Base**.java"/>
            </fileset>
        </copy>

        <copy todir="${src.java.dir}/${project.package}/om/map">
            <fileset dir="${torque.home}/output/${project.package}/om/map">
                <include name="**/*.java"/>
            </fileset>
        </copy>
    </target>

    <target name="torque-init">
        <property name="torque.home" value="${sql.dir}"/>
        <property name="torque.config" value="${torque.home}/config"/>
        <property name="torque.props" value="${torque.config}/torque.props"/>
        <property name="torque.macros" value="${torque.config}/torque.macros"/>

        <property file="${torque.props}"/>

    </target>

    <target name="project-sql" depends="torque-init">
        <torque-sql
                 contextProperties="${torque.props}"
                 projectName="${project}"
                 xmlfile="${torque.home}/${schemaDirectory}/${project}-schema.xml"
                 controlTemplate="${SQLControlTemplate}"
                 outputDirectory="${torque.home}/${outputDirectory}"
                 templatePath="${torque.home}/${templatePath}"
                 outputFile="report.${project}.sql.generation"
                 targetDatabase="${database}"
                 />
    </target>
    <target name="project-om" depends="torque-init">
        <torque-om
             contextProperties="${torque.props}"
             xmlFile="${torque.home}/${schemaDirectory}/${project}-schema.xml"
             controlTemplate="${OMControlTemplate}"
             outputDirectory="${torque.home}/${outputDirectory}"
             templatePath="${torque.home}/${templatePath}"
             targetPackage="${targetPackage}"
             outputFile="${project}.generation.report"
             addSaveMethod="${addSaveMethod}"
             addGetByNameMethod="${addGetByNameMethod}"
             objectModelType="${objectModelType}"
             />
    </target>

-->

</project>
@

