<?xml version="1.0" ?>
<!--
Taken from Core Servlets and JavaServer Pages Volume II
from Prentice Hall and Sun Microsystems Press,
http://volume2.coreservlets.com/.
(C) 2007 Marty Hall, Larry Brown, and Yaakov Chaikin;
may be freely used or adapted.
-->
<project name="Boats" default="compile" basedir=".">
  <description>Web Application: Online Boat Shop</description>
  <property name="javac.deprecation" value="true"/>
  <property name="javac.listfiles" value="false"/>

  <!-- Properties for project directories. -->
  <property name="src.dir" location="${basedir}/src"/>
  <property name="lib.dir" location="${basedir}/lib"/>
  <property name="build.dir" location="${basedir}/build"/>
  <property name="build.webinf.classes.dir"
    location="${build.dir}/WEB-INF/classes"/>

  <!-- The clean target removes all files from the
       WEB-INF/classes directory and subdirectories.
  -->
  <target name="clean"
          description="Remove all .class files">
    <delete quiet="true">
      <fileset dir="${build.webinf.classes.dir}">
        <filename name="**/*.class"/>
      </fileset>
    </delete>
  </target>

  <!-- Create a path element declaring the directories/files
       to include on the CLASSPATH. Then, define a property to
       the path information.
  -->
  <path id="project.classpath">
    <pathelement location="${lib.dir}/servlet-api.jar"/>
    <pathelement location="${lib.dir}/jsp-api.jar"/>
  </path>
  <property name="classpath" refid="project.classpath"/>

  <!-- Default target that compiles all the source files
       to the build/WEB-INF/classes directory. Ant compiles
       only those .class files that have a different time stamp
       than their corresponding .java files. To compile all
       classes, first run the "clean" target to delete all the
       .class files, then run the "compile" target to recreate
       them.
  -->
  <target name="compile"
      description="Compile files to WEB-INF/classes directory">
    <mkdir dir="${build.webinf.classes.dir}"/>
    <javac srcdir="${src.dir}"
           destdir="${build.webinf.classes.dir}"
           deprecation="${javac.deprecation}"
           listfiles="${javac.listfiles}">
      <classpath>
        <pathelement path="${classpath}"/>
      </classpath>
    </javac>
  </target>
</project>