<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="pack" name="GO4J">
  <property name="src.dir" value="src"/>
  <property name="dest.dir" value="classes"/>
  <property name="doc.dir" value="doc"/>
  <property name="lib.dir" value="lib"/>
  <property name="xercesImpl.file" value="xercesImpl.jar"/>
  <property name="xmlParserAPIs.file" value="xmlParserAPIs.jar"/>
  <property name="xalan.file" value="xalan.jar"/>
  <property name="jgrapht.file" value="jgrapht-0.5.3.jar"/>
  <property name="jgraphaddons.file" value="jgraphaddons-1.0.6.jar"/>
  <property name="jgraph.file" value="jgraph5.4.jar"/>
  <property name="jar.classpath" value="${lib.dir}/${xercesImpl.file} ${lib.dir}/${xmlParserAPIs.file} ${lib.dir}/${xalan.file} ${lib.dir}/${jgrapht.file} ${lib.dir}/${jgraphaddons.file} ${lib.dir}/${jgraph.file}"/>
  <path id="build.classpath">
    <pathelement location="classes"/>
    <fileset dir="${lib.dir}">
      <include name="**/*.jar"/>
    </fileset>
  </path>
  <property name="build.classpath" refid="build.classpath"/>
  <target name="init">
    <mkdir dir="${dest.dir}"/>
  </target>
  <target name="compile" depends="init">
    <javac srcdir="${src.dir}" debug="true" deprecation="true" optimize="true" destdir="${dest.dir}">
      <classpath refid="build.classpath"/>
    </javac>
  </target>
  <target name="javadoc">
    <javadoc destdir="${doc.dir}" package="true" use="true" version="true">
      <fileset dir="${src.dir}"/>
    </javadoc>
  </target>
  <target name="pack" depends="compile,javadoc">
    <jar destfile="go4j.jar" basedir="${dest.dir}">
      <manifest>
        <attribute name="Main-Class" value="example.GUIExample"/>
        <attribute name="Class-Path" value="${jar.classpath}"/>
      </manifest>
    </jar>
    <jar destfile="go4j_parser.jar" basedir="${dest.dir}">
      <manifest>
        <attribute name="Main-Class" value="example.ParserExample"/>
        <attribute name="Class-Path" value="${jar.classpath}"/>
      </manifest>
    </jar>
    <jar destfile="go4j_model.jar" basedir="${dest.dir}">
      <manifest>
        <attribute name="Main-Class" value="example.GraphModelExample"/>
        <attribute name="Class-Path" value="${jar.classpath}"/>
      </manifest>
    </jar>
  </target>
</project>
