Bob pointed out that the extends bound is not necessary in Listable. Enough to have it in List.
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="primitiveconstants" 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 <antcall target="-build-one">
17 <param name="version" value="impl"/>
18 <param name="cp" location="build/api1.0/classes"/>
22 <target name="run" depends="build">
23 <echo level="info" message="Running the Implementation against Version 1.0 of the API. This should succeeds."/>
24 <antcall target="-run-one">
25 <param name="version" value="api1.0"/>
26 <param name="result" value="0"/>
28 <echo level="info" message="Running the Implementation against Version 2.0 of the API. This should fail."/>
29 <antcall target="-run-one">
30 <param name="version" value="api2.0"/>
31 <param name="result" value="1"/>
36 <!-- support methods -->
38 <target name="-run-one">
39 <fail message="You need to specify API version number" unless="version"/>
40 <java classpath="build/${version}/classes:build/impl/classes" classname="impl.Impl"
41 resultproperty="result.real" failonerror="false" fork="true"
43 <fail message="Unexpected failure for ${version}: ${result.real}">
46 <equals arg1="${result}" arg2="${result.real}"/>
52 <target name="-build-one">
53 <fail message="You need to specify version number" unless="version"/>
55 <mkdir dir="build/${version}/classes"/>
56 <property name="cp" value=""/>
58 srcdir="src-${version}"
59 destdir="build/${version}/classes"
60 source="1.4" target="1.4"