<?xml version="1.0"?>

<!--
  - Licensed to the Apache Software Foundation (ASF) under one or more
  - contributor license agreements.  See the NOTICE file distributed with
  - this work for additional information regarding copyright ownership.
  - The ASF licenses this file to You under the Apache License, Version 2.0
  - (the "License"); you may not use this file except in compliance with
  - the License.  You may obtain a copy of the License at
  -
  -     http://www.apache.org/licenses/LICENSE-2.0
  -
  - Unless required by applicable law or agreed to in writing, software
  - distributed under the License is distributed on an "AS IS" BASIS,
  - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - See the License for the specific language governing permissions and
  - limitations under the License.
  -
  - $Id$
  -->

<!--
  - Build file for the solemnis Scratchpad Project.
  -
  - This script should be started with the following command line :
  -
  -     ant <target>
  -
  - Jakarta Ant can be downloaded from <http://jakarta.apache.org/ant>
  -
  - Run "ant -projecthelp" to get a list of available targets.
  -
  - Version: $Revision$ $Date$
  - Author: Vladimir R. Bossicard (vladimir@bossicard.com)
  -->

<project name="xml-xindice-solemnis" default="compile" basedir=".">

   <property name="xindice.classes" value="../classes" />

   <property name="src.dir" value="src"/>
   <property name="jar.dir" value="lib"/>
   <property name="src.build.dir" value="classes"/>
   <property name="dist.dir" value="dist"/>

   <property name="compile.debug" value="on"/>
   <property name="compile.optimize" value="off"/>
   <property name="compile.nowarn" value="off"/>
   <property name="compile.deprecation" value="on"/>
   <property name="compile.verbose" value="off"/>

   <!-- Scratchpad classpath -->
   <path id="project.class.path">
      <pathelement location="${src.build.dir}"/>	
      <fileset dir="../../lib">
         <include name="*.jar"/>
      </fileset>
   </path>

   <target name="init">
      <tstamp/>
      <mkdir dir="${src.build.dir}"/>
      <mkdir dir="${dist.dir}"/>
   </target>

   <target name="compile"
           depends="init">
      <javac srcdir="${src.dir}"
             destdir="${src.build.dir}"
             debug="${compile.debug}"
             optimize="${compile.optimize}"
             nowarn="${compile.nowarn}"
             deprecation="${compile.deprecation}"
             verbose="${compile.verbose}">
         <!--classpath>
            <fileset dir="${jar.dir}">
               <include name="*.jar"/>
            </fileset>
            <fileset dir="../../lib">
               <include name="*.jar"/>
            </fileset>
            <fileset dir="../../dist">
               <include name="*.jar"/>
            </fileset>
         </classpath-->
      </javac>
   </target>

    <target name="test"
            depends="compile">
        <junit fork="yes" printsummary="yes" haltonfailure="no">
            <jvmarg value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog" />
            <jvmarg value="-Dorg.apache.commons.logging.simplelog.defaultlog=debug" />
            <test name="org.apache.xindice.core.file.PageTestSuite" />
            <formatter type="plain" usefile="no" />
            <classpath>
                <path refid="project.class.path"/>
                <pathelement location="${test.build.dir}"/>
            </classpath>
        </junit>
    </target>
    
   <target name="clean">
      <delete dir="${src.build.dir}"/>
      <delete dir="${dist.dir}"/>
   </target>

</project>