1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/samples/forjoe/build.xml Sat Jun 14 09:53:37 2008 +0200
1.3 @@ -0,0 +1,47 @@
1.4 +<?xml version="1.0" encoding="UTF-8"?>
1.5 +<project name="forjoe" default="run" basedir=".">
1.6 + <target name="clean">
1.7 + <delete dir="build"/>
1.8 + </target>
1.9 +
1.10 + <target name="build">
1.11 + <antcall target="-build-one">
1.12 + <param name="version" value="api1.0"/>
1.13 + </antcall>
1.14 + <echo level="info" message="Compiling the Implementation. This should succeed."/>
1.15 + <antcall target="-build-one">
1.16 + <param name="version" value="impl"/>
1.17 + <param name="cp" location="build/api1.0/classes"/>
1.18 + </antcall>
1.19 + </target>
1.20 +
1.21 + <target name="run" depends="build">
1.22 + <echo level="info" message="Instantiating and running Joe's implementation. This should succeed."/>
1.23 + <antcall target="-run-one">
1.24 + <param name="version" value="api1.0"/>
1.25 + </antcall>
1.26 + </target>
1.27 +
1.28 +
1.29 + <!-- support methods -->
1.30 +
1.31 + <target name="-run-one">
1.32 + <fail message="You need to specify API version number" unless="version"/>
1.33 + <java classpath="build/${version}/classes:build/impl/classes" classname="impl.joe.Main"
1.34 + failonerror="true"
1.35 + />
1.36 + </target>
1.37 +
1.38 + <target name="-build-one">
1.39 + <fail message="You need to specify version number" unless="version"/>
1.40 +
1.41 + <mkdir dir="build/${version}/classes"/>
1.42 + <property name="cp" value=""/>
1.43 + <javac
1.44 + srcdir="src-${version}"
1.45 + destdir="build/${version}/classes"
1.46 + source="1.5" target="1.5"
1.47 + classpath="${cp}"
1.48 + />
1.49 + </target>
1.50 +</project>