<?xml version="1.0"?>

<!--
 Copyright 2002 Sun Microsystems, Inc. All rights reserved.
 SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
-->

<project basedir="." default="run">
    
    <path id="classpath">
        <fileset dir="/home/inf/k/kb181029/jars" includes="*.jar" excludes="ant.jar"/>
        <pathelement location="."/>
    </path>

    <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
        <classpath refid="classpath" />
    </taskdef>
    
    <!-- compile Java source files -->
    <target name="compile">
    
        <!-- generate the Java content classes from the schema -->
        <echo message="Compiling the schema..."/>
        <xjc schema="po.xsd" target="." package="primer.po"/>

        <!-- generate the javadocs from the content classes -->
        <mkdir dir="docs/api"/>
        <javadoc packagenames="primer.po"
                 sourcepath="."
                 destdir="docs/api"
                 windowtitle="Generated Interfaces for po.xsd">
            <classpath refid="classpath" />
    	</javadoc>

        <!-- compile all of the java sources -->
        <echo message="Compiling the java source files..."/>
        <javac srcdir="." destdir="." debug="on">
            <classpath refid="classpath" />
        </javac>
    </target>
    
    <target name="run" depends="compile">
        <echo message="Running the sample application..."/>
        <java classname="Main" fork="true">
            <classpath refid="classpath" />
        </java>
    </target>
</project>
