<project name="myantserver" default="compile" basedir=".">
	<property name="src" location="src"/>
	<property name="build" location="build"/>

	<!--
	You must change this according to your ant installation!
	-->
	<property name="ant_home" location="/opt/ant"/>

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

	<target name="compile" depends="init">
		<javac srcdir="${src}" destdir="${build}">
			<classpath>
				<pathelement location="${ant_home}/lib/ant.jar"/>
			</classpath>
		</javac>
	</target>

	<target name="build" depends="compile">
		<copy
			file="${src}/hu/risko/antserver/antserver.properties"
			todir="${build}/hu/risko/antserver"
		/>
		<jar jarfile="antserver.jar">
			<fileset dir="${build}"/>
		</jar>
	</target>

	<target name="clean">
		<delete dir="${build}"/>
	</target>

	<taskdef resource="hu/risko/antserver/antserver.properties">
		<classpath>
			<pathelement path="antserver.jar"/>
		</classpath>
	</taskdef>

	<target name="startserver">
		<antserver port="12345" />
	</target>

</project>
