1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="insertsuperclass" default="run" basedir=".">
6 <target name="test" depends="run"/>
8 <target name="compile" depends="build"/>
10 <antcall target="-build-one">
11 <param name="version" value="api1.0"/>
13 <antcall target="-build-one">
14 <param name="version" value="api2.0"/>
16 <echo level="info" message="Compiling the Implementation against Version 1.0 of the API. This should succeed."/>
17 <antcall target="-build-one">
18 <param name="version" value="impl"/>
19 <param name="cp" location="build/api1.0/classes"/>
23 <target name="run" depends="build">
24 <echo level="info" message="Running the Implementation against Version 1.0 of the API. This should succeed."/>
25 <antcall target="-run-one">
26 <param name="version" value="api1.0"/>
28 <echo level="info" message="Running the Implementation against Version 2.0 of the API. This should succeed."/>
29 <antcall target="-run-one">
30 <param name="version" value="api2.0"/>
35 <!-- support methods -->
37 <target name="-run-one">
38 <fail message="You need to specify API version number" unless="version"/>
39 <java classpath="build/${version}/classes:build/impl/classes" classname="org.apidesign.insertsuperclass.test.Main"
40 failonerror="true" fork="true">
45 <target name="-build-one">
46 <fail message="You need to specify version number" unless="version"/>
48 <mkdir dir="build/${version}/classes"/>
49 <property name="cp" value=""/>
51 srcdir="src-${version}"
52 destdir="build/${version}/classes"
53 source="1.5" target="1.5"