<project name="tvark" default="all">
    <property file="build.properties" />
	
	
	<fileset dir="${web.dir}/WEB-INF/lib" id="lib.fs.id">
	    <include name="**/*.jar"/>
	</fileset>
    <path id="lib.id">
    	<fileset refid="lib.fs.id"></fileset>
    </path>

	
	<target name="clean">
		<delete dir="${build.dir}" />
		<delete dir="${dist.dir}" />	
	</target>
	
	<target name="prepare">
		<mkdir dir="${build.dir}"/>
		<mkdir dir="${build.dir}/WEB-INF/classes"/>
		<mkdir dir="${dist.dir}"/>
	</target>

	<target name="compile">
	    <copy todir="${build.dir}">
	    	   <fileset dir="${web.dir}">
	    	   	</fileset>
	    </copy>
		
		
		<javac srcdir="${src.dir}" destdir="${build.dir}/WEB-INF/classes" source="1.5" target="1.5" debug="true">
			<classpath refid="lib.id"></classpath>
		</javac>	
		
	</target>
	
	<target name="war">
		
	</target>
	
	
	<target name="all" depends="clean,prepare,compile,war">
		<war destfile="${dist.dir}/tvark.war" webxml="${build.dir}/WEB-INF/web.xml">
			  <fileset dir="${build.dir}"/>
		</war>
	</target>
</project>