<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="compile" name="org.etsi.common">
    <property name="src" value="src"/>
    <property name="bin" value="bin"/>
    <property name="lib" value="lib"/>
    <property name="dist" value="dist"/>
    <property name="antlib" value="antlib"/>
    <property name="nsis" value="nsis"/>
	<property name="cp" value="${lib}/xstream-1.3.1.jar:${lib}/commons-cli-1.2.jar:"/>

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

    <target name="clean" description="Removes previous build">
      <delete includeEmptyDirs="true">
        <fileset dir="${bin}"/>
      </delete>
    </target>

   	<target name="compile" depends="init">
        <javac srcdir="${src}" destdir="${bin}" classpath="${cp}"/>
    </target>
	
    <target name="make-dist" depends="compile" description="Creates an ETSI MiscTools distribution directory">
        <echo>Building ETSI MiscTools Distribution in ${dist}...</echo>
        <delete includeEmptyDirs="true">
            <fileset dir="${dist}"/>
        </delete>
        <jar destfile="${lib}/org.etsi.common.jar" basedir="${bin}/"/> 
        <mkdir dir="${dist}"/>
        <mkdir dir="${dist}/lib"/>
        <copy todir="${dist}/lib">
        	<fileset dir="${lib}"/>
        </copy>
    </target>


</project>
