<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="release" name="postgis">

  <property file="build.ant.properties"/>
  <property name="dir.module" value="${basedir}"/>           

  <!-- Runs default build; don't modify this target and run it as default -->
  <target if="cond.Uninitialized" name="init">
    <condition property="cond.Uninitialized" value="false"/>           
    <ant antfile="common.xml" dir="../gtbuild" inheritAll="true" target="externalInit"/>
  </target>

  <!-- Runs default build; don't modify this target and run it as default -->
  <target name="release">
    <ant antfile="common.xml" dir="../gtbuild" inheritAll="true" target="all"/>
  </target>

  <!-- Runs default build; don't modify this target and run it as default -->
  <target name="clean">
    <ant antfile="common.xml" dir="../gtbuild" inheritAll="true" target="clean"/>
  </target>

  <!-- Now, set your module-specific build targets here -->
  <target depends="init" name="testme">
    <echo message="dir.test = ${dir.test}"/>
  </target>

  <!-- Tests the feature flat stuff -->
  <target depends="release" name="test">
    <property name="dir.module" value="${basedir}"/>           
    <ant antfile="common.xml" dir="../gtbuild" inheritAll="true" target="taskdefs"/>
    <ant antfile="common.xml" dir="../gtbuild" inheritAll="true" target="compile-test"/>
    <junit fork="true" printsummary="withOutAndErr">
      <formatter type="plain" usefile="false"/>
      <sysproperty key="dataFolder" value="${basedir}/tests/unit/testData"/>
      <classpath>
        <pathelement path="./tests/unit"/>
        <pathelement path="../../extbin/core/lib/JTS.jar"/>
        <pathelement path="../../extbin/core/lib/log4j.jar"/>
        <pathelement path="../../extbin/gtbuild/lib/junit.jar"/>
        <pathelement path="../core/src"/>
        <pathelement path="../../extbin/postgis/lib/junit.jar"/>
        <pathelement path="src"/>
        <fileset dir="release"/>
      </classpath>
      <test fork="false" name="org.geotools.data.postgis.PostgisTestSuite"/>
    </junit>
  </target>


</project>
