<project name="js57toosm" default="dist" basedir=".">
  <property name="src" location="src"/>
  <property name="srcmain" location="../src"/>
  <property name="build" location="build"/>
  <property name="jarfile" location="./js57toosm.jar"/>
  <property name="lang.dir" value="../libs/"/>
  <path id="classpath">
    <fileset dir="${lang.dir}" includes="**/commons-lang3-3.4.jar"/>
  </path>

  <target name="init">
    <mkdir dir="${build}"/>
  </target>

  <target name="compile" depends="init" description="compile the source">
    <javac includeantruntime="false" sourcepath="${srcmain}" srcdir="${src}" destdir="${build}" classpathref="classpath" encoding="UTF-8" />
  </target>
  
  <target name="dist" depends="compile" description="generate the distribution">
    <jar jarfile="${jarfile}" basedir="${build}" manifestencoding="UTF-8">
      <manifest>
        <attribute name="Main-Class" value="js57toosm.Js57toosm"/>
        <attribute name="Class-Path" value="${jarfile}"/>
      </manifest>
      <zipgroupfileset dir="${lang.dir}" includes="**/commons-lang3-3.4.jar" />
    </jar>
  </target>

  <target name="clean" description="clean up">
    <delete dir="${build}"/>
    <delete file="${jarfile}"/>
  </target>
</project>
