<!--===========================================================================
  - Licensed Materials - Property of IBM
  - "Restricted Materials of IBM"
  - 
  - IBM SDK, Java(tm) Technology Edition, v8
  - (C) Copyright IBM Corp. 2014, 2020. All Rights Reserved
  -
  - US Government Users Restricted Rights - Use, duplication or disclosure
  - restricted by GSA ADP Schedule Contract with IBM Corp.
  -===========================================================================
-->
<project name="app1" default="war" basedir=".">

  <target name="compile" depends="">
    <mkdir dir="build/classes"/>
    <javac srcdir="src/java" destdir="build/classes"/>
    <copy todir="build/classes">
      <fileset dir="src/res"/>
    </copy>
  </target>
  
  <target name="jar" depends="compile">
    <mkdir dir="build/lib"/>
    <jar destfile="build/lib/pie.jar">
      <fileset file="build/classes/Pie.class" />
      <fileset file="build/classes/key-lime.jpg" />
      <manifest>
        <attribute name="Main-Class" value="Pie"/>
      </manifest>
    </jar>
  </target>

  <target name="war" depends="jar">
    <mkdir dir="dist"/>
    <war warfile="dist/${ant.project.name}.war" webxml="src/meta/web.xml">
      <fileset dir="src/docs"/>
      <fileset dir="build/lib"/>
    </war>
  </target>

  <target name="clean">
    <delete dir="build"/>
    <delete file="dist/${ant.project.name}.war"/>
  </target>

</project>
