<?xml version="1.0"?>

<!-- This is the ant build file for the bedework uber project.

     Authors: Mike Douglass   douglm @ rpi.edu
-->

<project name="bedework.build" default="usage" basedir=".">
  <property environment="env"/>

  <!-- This affects some of the build process in the projects -->
  <property name="org.bedework.quickstart.build" value="true" />

  <!-- this project -->
  <property name="org.bedework.project.bedework"
            location="${basedir}" />

    <property name="org.bedework.libcache.dir"
              location="${org.bedework.project.bedework}/libcache"/>

  <!-- Where we put other projects -->
  <property name="org.bedework.projects"
            location="${org.bedework.project.bedework}/projects" />

  <property name="org.bedework.project.access"
            location="${org.bedework.projects}/access" />

  <property name="org.bedework.project.bwtools"
            location="${org.bedework.projects}/bwtools" />

  <property name="org.bedework.project.bwtzsvr"
            location="${org.bedework.projects}/bwtzsvr" />

  <property name="org.bedework.project.caldav"
            location="${org.bedework.projects}/caldav" />

  <property name="org.bedework.project.caldavTest"
            location="${org.bedework.projects}/caldavTest" />

  <property name="org.bedework.project.calendarapi"
            location="${org.bedework.projects}/calendarapi" />

  <property name="org.bedework.project.davutil"
            location="${org.bedework.projects}/davutil" />

  <property name="org.bedework.project.dumprestore"
            location="${org.bedework.projects}/dumprestore" />

  <property name="org.bedework.project.rpiutil"
            location="${org.bedework.projects}/rpiutil" />

  <property name="org.bedework.project.testsuite"
            location="${org.bedework.projects}/testsuite" />

  <property name="org.bedework.project.webapps"
            location="${org.bedework.projects}/webapps" />

  <property name="org.bedework.project.webdav"
            location="${org.bedework.projects}/webdav" />

  <target name="README" depends="init"
          description="Describe targets and their usage">
    <loadfile property="org.bedework.README"
              srcFile="${org.bedework.project.bedework}/docs/README"/>
    <echo message="${org.bedework.README}" />
  </target>

  <target name="usage" depends="init"
          description="Describe targets and their usage">
    <echo message="As distributed the package should be ready to go."/>
    <echo message="Ensure ant is on your path, (a version is in the" />
    <echo message="package)"/>
    <echo message=""/>
    <echo message="First in one window do"/>
    <echo message="    ant hsqldb"/>
    <echo message="This will start the hsqldb server ready for the "/>
    <echo message="application."/>
    <echo message=""/>
    <echo message="In another window do"/>
    <echo message="    ant tomcatstart"/>
    <echo message=""/>
    <echo message="Once tomcat is running you should be able to go to a"/>
    <echo message="browser and connect to"/>
    <echo message="    http://localhost:8080/bedework"/>
    <echo message="and follow the instructions."/>
    <echo message=""/>
    <echo message="To build the calendar do"/>
    <echo message="    ant deploy    or "/>
    <echo message="    ant deploy.debug "/>
    <echo message="which does a build and deploy of all components"/>
    <echo message=""/>
    <echo message="To rebuild the calendar do"/>
    <echo message="    ant clean.deploy    or "/>
    <echo message="    ant clean.deploy.debug "/>
    <echo message="which does a clean, build and deploy of all components"/>
    <echo message=""/>
    <echo message="See documentation in the docs directory or on bedework.org"/>
    <echo message="for instructions on creating a locally configured calendar application"/>
    <echo message=""/>
  </target>

  <target name="init" >
    <!-- Overriding this when invoking ant allows different user property
         files to be included e.g.
            ant -Dorg.bedework.user.build.properties=/home/me/bedework.properties ...
            -->
    <property name="org.bedework.user.build.properties"
              location="${user.home}/bedework.build.properties" />

    <echo message="Load user properties from ${org.bedework.user.build.properties}" />

    <!-- Load user property definition overrides -->
    <property file="${org.bedework.user.build.properties}" />

    <!-- ===============================================================
              Default properties.
         =============================================================== -->

    <property name="bw.project.home" location="${org.bedework.project.bedework}"/>

    <property file="${bw.project.home}/build.properties" />

    <property name="project.name" value="${org.bedework.package.name}"/>
    <property name="project.version" value="${org.bedework.version}"/>

    <property name="dist.home" location="${bw.project.home}/dist"/>
    <property name="lib.dir" location="${bw.project.home}/lib"/>
    <property name="resources.dir" location="${bw.project.home}/resources"/>
    <property name="bin.home" location="${bw.project.home}/bin"/>

    <property name="build.dir" location="${bw.project.home}/build"/>
    <property name="buildjar" location="${build.dir}/buildTools/buildjar.xml"/>
    <property name="buildsh" location="${build.dir}/buildsh.xml"/>
    <property name="buildwar" location="${build.dir}/buildwar.xml"/>

    <property name="org.bedework.build.caldav" value="yes" />

    <condition property="org.bedework.qs.build.caldav">
      <equals arg1="yes" arg2="${org.bedework.build.caldav}"/>
    </condition>

    <mkdir dir="${dist.home}" />

    <mkdir dir="${bin.home}" />

    <property name="org.bedework.empty.dir"
              location="${dist.home}/empty-dir" />
    <mkdir dir="${org.bedework.empty.dir}" />

    <fileset id="empty.fileset" dir="${org.bedework.empty.dir}"
             excludes="*" />
    <!-- default to empty -->
    <fileset id="buildjar.resource.files" refid="empty.fileset" />
    <fileset id="buildjar.generated.java.sources" refid="empty.fileset" />

    <!-- ==================== Subcomponent Compilation Classpath ====================

    <path id="compile.classpath">
      <fileset dir="${lib.dir}">
         <include name="*.jar"/>
      </fileset>
      <fileset dir="${dist.home}">
         <include name="*.jar"/>
      </fileset>
    </path>
-->
    <!-- ===============================================================
              Locations and jar files built by this project.
         =============================================================== -->

    <property name="org.bedework.temp.dir"
              location="${dist.home}/temp" />

    <property name="org.bedework.config.base"
              location="${org.bedework.project.bedework}/config" />

    <property name="org.bedework.default.lib"
              location="${org.bedework.project.bedework}/lib" />

    <property name="org.bedework.deployment.base"
              location="${org.bedework.project.bedework}/deployment" />

    <property name="org.bedework.deployutil.jar"
              location="${bin.home}/${org.bedework.deployutil.jar.name}-${project.version}.jar" />
  </target>

  <target name="init.build" depends="init">
    <mkdir dir="${dist.home}" />

    <mkdir dir="${bin.home}" />

    <mkdir dir="${org.bedework.empty.dir}" />
  </target>

  <!-- =================================================================
       "build" and "clean" targets for the project
       ================================================================= -->

  <target name="build" depends="init.build,build.rpiutil,build.bwtzsvr,
                                build.access,build.davutil,
                                build.calendarapi,build.dumprestore,
                                build.webdav,build.caldav,build.caldavTest,
                                build.bwtools,build.webapps,
                                build.testsuite,build.deployutil"
          description="builds the project">
    <copy toDir="${dist.home}" >
      <fileset dir="${org.bedework.project.bwtools}/dist" includes="*.jar" />
    </copy>
  </target>

  <target name="clean" depends="init,clean.rpiutil,clean.bwtzsvr,
                                clean.access,clean.davutil,
                                clean.calendarapi,clean.dumprestore,
                                clean.webdav,clean.caldav,clean.caldavTest,
                                clean.bwtools,clean.webapps,
                                clean.testsuite"
          description="Remove all generated files.">
    <delete dir="${dist.home}" />
    <delete dir="${bin.home}" />
  </target>

  <target name="quickstart-clean" depends="init,clean.rpiutil,clean.bwtzsvr,
                                           clean.access,clean.davutil,
                                           clean.calendarapi,clean.dumprestore,
                                           clean.webdav,clean.caldav,clean.caldavTest,
                                           clean.bwtools,clean.webapps,
                                           clean.testsuite"
          description="partial clean up for quickstart.">
    <delete dir="${bin.home}" />
    <delete dir="${org.bedework.temp.dir}" />
    <delete dir="${org.bedework.empty.dir}" />

    <delete>
      <fileset dir="${dist.home}" includes="*.war"/>
    </delete>
  </target>

  <target name="clean.build" depends="clean, build"
          description="cleans then builds the project"/>

  <!-- =================================================================
       The "deploy" and "deploy.all" target builds and deploys the applications
       ================================================================= -->

  <target name="deploy.debug" depends="build"
          description="builds and deploys the applications">
    <ant antfile="${org.bedework.project.bedework}/deployment/build.xml" inheritrefs="true"
         target="deploy"  >
      <property name="app.debug.val" value="9" />
    </ant>
  </target>

  <target name="deploy" depends="build"
          description="builds and deploys the applications">
    <ant antfile="${org.bedework.project.bedework}/deployment/build.xml" inheritrefs="true"
         target="deploy" />
  </target>

  <!-- =================================================================
       The "clean.deploy" target cleans, builds and deploys the applications
       ================================================================= -->

  <target name="clean.deploy" depends="clean,deploy" />

  <target name="clean.deploy.debug" depends="clean,deploy.debug" />

  <!-- =================================================================
       The "build.configured" target builds configured applications
       ================================================================= -->

  <target name="build.configured" depends="build"
          description="Build configured applications" >
    <ant antfile="${org.bedework.project.bedework}/deployment/build.xml" inheritrefs="true"
         target="build.configured"  >
      <property name="app.debug.val" value="9" />
    </ant>
  </target>

  <target name="build.configured.debug" depends="build"
          description="Build configured applications" >
    <ant antfile="${org.bedework.project.bedework}/deployment}/build.xml" inheritrefs="true"
         target="build.configured" />
  </target>

  <target name="clean.build.configured" depends="clean,build.configured" />

  <target name="clean.build.configured.debug" depends="clean,build.configured.debug"/>

  <!-- ======================== javadoc target =======================
       We build these and copy in turn into the main bedework docs directory.

       The org.bedework.projectdocs.home property allows each project to
       locate the previously built javadocs so they can link to it.

       We also assume access to the java api docs.
       ================================================================= -->

  <target name="javadoc" depends="init" description="Generate javadoc">
    <property name="docs.home" location="${bw.project.home}/docs"/>
    <property name="org.bedework.projectdocs.home" location="${docs.home}/projectdocs"/>
    <delete dir="${org.bedework.projectdocs.home}" />
    <mkdir dir="${org.bedework.projectdocs.home}" />

    <ant antfile="${org.bedework.project.rpiutil}/build.xml" inheritall="false"
         target="javadoc" >
      <property name="destdir"
                location="${org.bedework.projectdocs.home}/rpiutil/api" />
    </ant>

    <ant antfile="${org.bedework.project.access}/build.xml" inheritall="false"
         target="javadoc" >
      <property name="destdir"
                location="${org.bedework.projectdocs.home}/access/api" />
    </ant>

    <ant antfile="${org.bedework.project.davutil}/build.xml" inheritall="false"
         target="javadoc" >
      <property name="destdir"
                location="${org.bedework.projectdocs.home}/davutil/api" />
    </ant>

    <ant antfile="${org.bedework.project.calendarapi}/build.xml" inheritall="false"
         target="javadoc" >
      <property name="destdir"
                location="${org.bedework.projectdocs.home}/calendarapi/api" />
    </ant>

    <ant antfile="${org.bedework.project.dumprestore}/build.xml" inheritall="false"
         target="javadoc" >
      <property name="destdir"
                location="${org.bedework.projectdocs.home}/dumprestore/api" />
    </ant>

    <ant antfile="${org.bedework.project.webdav}/build.xml" inheritall="false"
         target="javadoc" >
      <property name="destdir"
                location="${org.bedework.projectdocs.home}/webdav/api" />
    </ant>

    <ant antfile="${org.bedework.project.caldav}/build.xml" inheritall="false"
         target="javadoc" >
      <property name="destdir"
                location="${org.bedework.projectdocs.home}/caldav/api" />
    </ant>

    <ant antfile="${org.bedework.project.caldavTest}/build.xml" inheritall="false"
         target="javadoc" >
      <property name="destdir"
                location="${org.bedework.projectdocs.home}/caldavTest/api" />
    </ant>

    <ant antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
         target="javadoc" >
      <property name="destdir"
                location="${org.bedework.projectdocs.home}/bwtools/api" />
    </ant>

    <ant antfile="${org.bedework.project.webapps}/build.xml" inheritall="false"
         target="javadoc" >
      <property name="destdir"
                location="${org.bedework.projectdocs.home}/webapps/api" />
    </ant>

    <ant antfile="${org.bedework.project.testsuite}/build.xml" inheritall="false"
         target="javadoc" >
      <property name="destdir"
                location="${org.bedework.projectdocs.home}/testsuite/api" />
    </ant>
  </target>

  <!-- =================================================================
       Targets to build sub-projects.
       ================================================================= -->

  <!-- .................................................................
                          access
       .................................................................. -->
  <target name="build.access" depends="init"
          description="builds the access project">
    <ant antfile="${org.bedework.project.access}/build.xml" inheritall="false"
           target="build-all" >
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="clean.access" depends="init"
          description="cleans the access project">
    <ant antfile="${org.bedework.project.access}/build.xml" inheritall="false"
           target="deep-clean" />
  </target>

  <target name="clean.build.access" depends="clean.access,build.access"
          description="builds the access project"/>

  <!-- .................................................................
                          bwtools
       .................................................................. -->
  <target name="build.bwtools" depends="init"
          description="builds the bwtools project">
    <ant antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
           target="build-all"  >
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="clean.bwtools" depends="init"
          description="clean the bwtools project">
    <ant antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
           target="deep-clean" />
  </target>

  <target name="clean.build.bwtools" depends="clean.bwtools,build.bwtools"
          description="builds the bwtools project"/>

  <!-- .................................................................
                          bwtzsvr
       .................................................................. -->
  <target name="build.bwtzsvr" depends="init"
          description="builds the bwtzsvr project">
    <ant antfile="${org.bedework.project.bwtzsvr}/build.xml" inheritall="false"
           target="build-all"  >
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="clean.bwtzsvr" depends="init"
          description="clean the bwtzsvr project">
    <ant antfile="${org.bedework.project.bwtzsvr}/build.xml" inheritall="false"
           target="deep-clean" />
  </target>

  <target name="clean.build.bwtzsvr" depends="clean.bwtzsvr,build.bwtzsvr"
          description="builds the bwtzsvr project"/>

  <!-- .................................................................
                          caldav
       .................................................................. -->
  <target name="build.caldav" depends="init"
          description="builds the caldav project">
    <ant antfile="${org.bedework.project.caldav}/build.xml" inheritall="false"
       target="build-all"  >
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="clean.caldav" depends="init"
          description="clean the caldav project">
    <ant antfile="${org.bedework.project.caldav}/build.xml" inheritall="false"
         target="deep-clean" />
  </target>

  <target name="clean.build.caldav" depends="clean.caldav,build.caldav"
          description="clean builds the caldav project"/>

  <!-- .................................................................
                          caldavTest
       .................................................................. -->
  <target name="build.caldavTest" depends="init"
          description="builds the caldavTest project">
    <ant antfile="${org.bedework.project.caldavTest}/build.xml" inheritall="false"
         target="build-all"  >
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="clean.caldavTest" depends="init"
          description="clean the caldavTest project">
    <ant antfile="${org.bedework.project.caldavTest}/build.xml" inheritall="false"
         target="deep-clean" />
  </target>

  <target name="clean.build.caldavTest" depends="clean.caldavTest,build.caldavTest"
          description="clean builds the caldavTest project"/>

  <!-- .................................................................
                          calendarapi
       .................................................................. -->
  <target name="build.calendarapi" depends="init"
          description="builds the calendar project">
    <ant antfile="${org.bedework.project.calendarapi}/build.xml" inheritall="false"
           target="build-all"  >
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="clean.calendarapi" depends="init"
          description="clean the calendar project">
    <ant antfile="${org.bedework.project.calendarapi}/build.xml" inheritall="false"
           target="deep-clean" />
  </target>

  <target name="clean.build.calendarapi" depends="clean.calendarapi,build.calendarapi"
          description="clean builds the caldavTest project"/>

  <!-- .................................................................
                          davutil
       .................................................................. -->
  <target name="build.davutil" depends="init"
          description="builds the davutil project">
    <ant antfile="${org.bedework.project.davutil}/build.xml" inheritall="false"
           target="build-all"  >
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="clean.davutil" depends="init"
          description="cleans the davutil project">
    <ant antfile="${org.bedework.project.davutil}/build.xml" inheritall="false"
           target="deep-clean" />
  </target>

  <target name="clean.build.davutil" depends="clean.davutil,build.davutil"
          description="clean builds the davutil project"/>

  <!-- .................................................................
                          dumprestore
       .................................................................. -->
  <target name="build.dumprestore" depends="init"
          description="builds the dumprestore project">
    <ant antfile="${org.bedework.project.dumprestore}/build.xml" inheritall="false"
           target="build-all"  >
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="clean.dumprestore" depends="init"
          description="clean the dumprestore project">
    <ant antfile="${org.bedework.project.dumprestore}/build.xml" inheritall="false"
           target="deep-clean" />
  </target>

  <target name="clean.build.dumprestore" depends="clean.dumprestore,build.dumprestore"
          description="builds the dumprestore project"/>

  <!-- .................................................................
                          rpiutil
       .................................................................. -->
  <target name="build.rpiutil" depends="init"
          description="builds the rpiutil project">
    <ant antfile="${org.bedework.project.rpiutil}/build.xml" inheritall="false"
           target="build-all"  >
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="clean.rpiutil" depends="init"
          description="cleans the rpiutil project">
    <ant antfile="${org.bedework.project.rpiutil}/build.xml" inheritall="false"
           target="deep-clean" />
  </target>

  <target name="clean.build.rpiutil" depends="clean.rpiutil,build.rpiutil"
          description="builds the rpiutil project"/>

  <!-- .................................................................
                          testsuite
       .................................................................. -->
  <target name="build.testsuite" depends="init"
          description="builds the testsuite project">
    <ant antfile="${org.bedework.project.testsuite}/build.xml" inheritall="false"
         target="build-all"  >
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="clean.testsuite" depends="init"
          description="clean the testsuite project">
    <ant antfile="${org.bedework.project.testsuite}/build.xml" inheritall="false"
         target="deep-clean" />
  </target>

  <target name="clean.build.testsuite" depends="clean.testsuite,clean.testsuite"
          description="builds the testsuite project"/>

  <!-- .................................................................
                          webapps
       .................................................................. -->
  <target name="build.webapps" depends="init"
          description="builds the webapps project">
    <ant antfile="${org.bedework.project.webapps}/build.xml" inheritall="false"
           target="build-all"  >
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="clean.webapps" depends="init"
          description="clean the webapps project">
    <ant antfile="${org.bedework.project.webapps}/build.xml" inheritall="false"
           target="deep-clean" />
  </target>

  <target name="clean.build.webapps" depends="clean.webapps,build.webapps"
          description="builds the webapps project"/>

  <!-- .................................................................
                          webdav
       .................................................................. -->
  <target name="build.webdav" depends="init"
          description="builds the webdav project">
    <ant antfile="${org.bedework.project.webdav}/build.xml" inheritall="false"
         target="build-all"  >
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="clean.webdav" depends="init"
          description="cleans the webdav project">
    <ant antfile="${org.bedework.project.webdav}/build.xml" inheritall="false"
         target="deep-clean" />
  </target>

  <target name="clean.build.webdav" depends="clean.webdav,build.webdav"
          description="builds the webdav project"/>

  <!-- =================================================================
       Targets to build sub-components of this project.
       ================================================================= -->

  <target name="build.deployutil" depends="init"
          description="builds the deployutil component">
    <ant antfile="${org.bedework.project.bedework}/deployutil/build.xml" inheritrefs="true"
           target="build" >
      <property name="build.jar.file" location="${org.bedework.deployutil.jar}" />
    </ant>
  </target>

  <!-- =================================================================
       Build and run the directory tools
       ================================================================= -->

  <target name="initDir" depends="init"
          description="Build and run directory init">
    <antfetch antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
              target="initDir"
              return="org.bedework.directory.init.status" >
      <propertyset>
        <propertyref prefix="org.bedework.directory."/>
      </propertyset>
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </antfetch>
  </target>

  <target name="initDirForQuickstart" depends="init.build,build.rpiutil"
          description="Build and run directory tool to initialise a quickstart system">
    <antfetch antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
              target="initDirForQuickstart"
              return="org.bedework.directory.init.status" >
      <propertyset>
        <propertyref prefix="org.bedework.directory."/>
      </propertyset>
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </antfetch>
  </target>

  <target name="addUser" depends="init.build,build.rpiutil"
          description="Build and run directory tools to add a user">
    <ant antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
           target="addUser" >
      <propertyset>
        <propertyref prefix="org.bedework.directory."/>
      </propertyset>
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="addGroup" depends="init.build,build.rpiutil"
          description="Build and run directory tools to add a group">
    <ant antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
           target="addGroup" >
      <propertyset>
        <propertyref prefix="org.bedework.directory."/>
      </propertyset>
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <target name="addGroupMember" depends="init.build,build.rpiutil"
          description="Build and run directory tools to add a group member">
    <ant antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
           target="addGroupMember" >
      <propertyset>
        <propertyref prefix="org.bedework.directory."/>
      </propertyset>
      <property name="org.bedework.libcache.dir"
                location="${org.bedework.project.bedework}/libcache"/>
    </ant>
  </target>

  <!-- =================================================================
       Build and run the unit test suite
       ================================================================= -->

  <target name="bld.test" depends="init"
          description="Build and run tests">
    <ant antfile="${calendar.build.file}" inheritrefs="true"
         target="bld.test" />
  </target>

  <target name="run.test" depends="init"
          description="Build and run tests">
    <ant antfile="${calendar.build.file}" inheritrefs="true"
         target="run.test" />
  </target>

  <target name="run.test.debug" depends="init"
          description="Build and run tests">
    <ant antfile="${calendar.build.file}" inheritrefs="true"
         target="run.test"  >
      <property name="org.bedework.debug" value="yes" />
    </ant>
  </target>

  <!-- Rebuild the http test suite only -->
  <target name="httptest" depends="init"
          description="Run httptest suite" >
    <input message="httptest may destroy this calendar db. Proceed with test"
           validargs="y,n"
           addproperty="do.httptest" />
    <condition property="do.abort">
      <equals arg1="n" arg2="${do.httptest}"/>
    </condition>
    <fail if="do.abort">httptest aborted by user.</fail>

    <ant antfile="${calendar.build.file}" inheritrefs="true"
           target="bld.httptest" />

    <ant antfile="${calendar.build.file}" inheritrefs="true"
           target="run.httptest" />
  </target>
</project>
