author | Jaroslav Tulach <jtulach@netbeans.org> |
Sat, 14 Jun 2008 09:50:51 +0200 | |
changeset 8 | 82ff02d7f861 |
parent 7 | 041165540a13 |
child 9 | 45a6b338a903 |
permissions | -rw-r--r-- |
jtulach@7 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
jtulach@7 | 2 |
<project name="primitiveconstants" default="run" basedir="."> |
jtulach@7 | 3 |
<target name="clean"> |
jtulach@7 | 4 |
<delete dir="build"/> |
jtulach@7 | 5 |
</target> |
jtulach@7 | 6 |
|
jtulach@7 | 7 |
<target name="build"> |
jtulach@7 | 8 |
<antcall target="-build-one"> |
jtulach@7 | 9 |
<param name="version" value="api1.0"/> |
jtulach@7 | 10 |
</antcall> |
jtulach@7 | 11 |
<antcall target="-build-one"> |
jtulach@7 | 12 |
<param name="version" value="api2.0"/> |
jtulach@7 | 13 |
</antcall> |
jtulach@7 | 14 |
<antcall target="-build-one"> |
jtulach@7 | 15 |
<param name="version" value="impl"/> |
jtulach@7 | 16 |
<param name="cp" location="build/api1.0/classes"/> |
jtulach@7 | 17 |
</antcall> |
jtulach@7 | 18 |
</target> |
jtulach@7 | 19 |
|
jtulach@7 | 20 |
<target name="run" depends="build"> |
jtulach@7 | 21 |
<echo message="Running the Implementation against Version 1.0 of the API. This should succeeds."/> |
jtulach@7 | 22 |
<antcall target="-run-one"> |
jtulach@7 | 23 |
<param name="version" value="api1.0"/> |
jtulach@7 | 24 |
</antcall> |
jtulach@7 | 25 |
<echo message="Running the Implementation against Version 2.0 of the API. This should fail."/> |
jtulach@7 | 26 |
<antcall target="-run-one"> |
jtulach@8 | 27 |
<param name="version" value="api2.0"/> |
jtulach@7 | 28 |
</antcall> |
jtulach@7 | 29 |
</target> |
jtulach@7 | 30 |
|
jtulach@7 | 31 |
|
jtulach@7 | 32 |
<!-- support methods --> |
jtulach@7 | 33 |
|
jtulach@7 | 34 |
<target name="-run-one"> |
jtulach@7 | 35 |
<fail message="You need to specify API version number" unless="version"/> |
jtulach@7 | 36 |
<java classpath="build/${version}/classes:build/impl/classes" classname="impl.Impl" |
jtulach@7 | 37 |
failonerror="true" |
jtulach@7 | 38 |
/> |
jtulach@7 | 39 |
</target> |
jtulach@7 | 40 |
|
jtulach@7 | 41 |
<target name="-build-one"> |
jtulach@7 | 42 |
<fail message="You need to specify version number" unless="version"/> |
jtulach@7 | 43 |
|
jtulach@7 | 44 |
<mkdir dir="build/${version}/classes"/> |
jtulach@7 | 45 |
<property name="cp" value=""/> |
jtulach@7 | 46 |
<javac |
jtulach@8 | 47 |
srcdir="src-${version}" |
jtulach@7 | 48 |
destdir="build/${version}/classes" |
jtulach@7 | 49 |
source="1.4" target="1.4" |
jtulach@7 | 50 |
classpath="${cp}" |
jtulach@7 | 51 |
/> |
jtulach@7 | 52 |
</target> |
jtulach@7 | 53 |
</project> |