<?xml version="1.0" encoding="UTF-8"?>
<project name="acord_schema" default="runxjc" basedir=".">
    <description>Builds the objects for the ACORD schema.</description>
	
	<property name="jaxb.home" value="../.." />
  <path id="classpath">
    <pathelement path="src" />
    <pathelement path="classes" />
    <pathelement path="schemas" />
  	<fileset dir="${jaxb.home}" includes="lib/*.jar" /> 
  </path>
  <taskdef name="xjc" classname="com.sun.tools.xjc.XJC2Task">
    <classpath refid="classpath" />
  </taskdef>

  <!--compile Java source files-->
  <target name="runxjc" description="Compile all Java source files">
    <echo message="Compiling the schema..." />
    <mkdir dir="gen-src" />
    <xjc schema="TXLife2.15.00.xsd" binding="binding.xjb" destdir="gen-src">
      <produces dir="gen-src" includes="**/*.java" />
    </xjc>
    <echo message="Compiling the java source files..." />
    <mkdir dir="classes" />
    <javac destdir="classes" debug="on">
      <src path="src" />
      <src path="gen-src" />
      <classpath refid="classpath" />
    </javac>
  </target>

</project>
