rmihello/build.xml
author Markus Bröker <mbroeker@largo.dyndns.tv>
Thu, 28 May 2009 16:51:52 +0200
changeset 96 810acedf60d8
parent 92 0bc2646daa82
permissions -rw-r--r--
alpha_beta: memory leaks After fixing all the memory leaks in this piece code, i can finally go further to implement a better KI. committer: Markus Bröker <mbroeker@largo.homelinux.org>

<?xml version="1.0"?>
<project name="Hello" basedir="." default="jar">
	<property name="project" value="Hello" />
	<property name="package.name" value="example.hello" />
	<property name="package.dir" value="example/hello" />
	<property name="jar.file" value="bin/hello.jar" />
	<property name="classpath.dir" value="/usr/local/lib/classes" />
	<property name="www.dir" value="/var/www/localhost/htdocs/classes" />

	<property name="distributable.exts"
		value="**/*.class,**/*.gif,**/*.html,**/*.jar,**/*.jnlp,**/*.jpg,**/*.png" />
	<path id="classpath">
		<pathelement location="." />
	</path>

	<!-- Targets -->
	<target name="clean">
		<echo
			message="deleting all class- and jar-files  in ${package.dir} tree" />
		<delete>
			<fileset dir="${package.dir}" includes="**/*.class" />
			<fileset dir="." includes="**/*.*~" defaultexcludes="no" />
		</delete>

		<delete file="${jar.file}" />
	</target>

	<target name="compile">
		<echo message="compiling ${package.dir} tree." />
		<javac source="1.5" target="1.5" srcdir="${package.dir}"
			sourcepath="${basedir}" debug="on">
			<classpath refid="classpath" />
		</javac>
	</target>

	<target name="jar" depends="compile">
		<property environment="env" />
		<jar destfile="${jar.file}" basedir="${basedir}"
			includes="example/"
			manifest="${project}.manifest" />
	</target>

	<target name="post" depends="jar">
		<signjar jar="${jar.file}" alias="spectre" storepass="${env.jsp}" />
		<copy file="${jar.file}" todir="${www.dir}"/>
	</target>

	<target name="client" depends="compile">
		<java classname="${package.name}.Client"
			failonerror="true" fork="yes">
			<classpath refid="classpath" />
		</java>
	</target>

	<target name="server" depends="compile">
		<java classname="${package.name}.Server"
			failonerror="true" fork="yes">
			<classpath refid="classpath" />
		</java>
	</target>
</project>