<?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>