samples/instanceofclass/build.xml
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 30 Oct 2014 21:30:10 +0100
changeset 409 40cabcdcd2be
parent 128 8ef997796d0a
permissions -rw-r--r--
Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <project name="instanceofclass" default="run" basedir=".">
     3     <target name="clean">
     4         <delete dir="build"/>
     5     </target>
     6     <target name="test"/>
     7     
     8     <target name="compile" depends="build"/>
     9     <target name="build">
    10         <antcall target="-build-one">
    11             <param name="version" value="api1.0"/>
    12         </antcall>
    13         <antcall target="-build-one">
    14             <param name="version" value="api2.0"/>
    15         </antcall>
    16     </target>
    17     
    18     <target name="run" depends="build">
    19         <echo level="info" message="Running the Implementation against Version 1.0 of the API. This should succeed."/>
    20         <antcall target="-run-one">
    21             <param name="version" value="api1.0"/>
    22         </antcall>
    23         <echo level="info" message="Running the Implementation against Version 2.0 of the API. This should succeed."/>
    24         <antcall target="-run-one">
    25             <param name="version" value="api2.0"/>
    26         </antcall>
    27     </target>
    28 
    29     
    30     <!-- support methods -->
    31     
    32     <target name="-run-one">
    33         <fail message="You need to specify API version number" unless="version"/>
    34         <java classpath="build/${version}/classes:build/impl/classes" classname="impl.Main"
    35             failonerror="true"
    36         />
    37     </target>
    38     
    39     <target name="-build-one">
    40         <fail message="You need to specify version number" unless="version"/>
    41         
    42         <mkdir dir="build/${version}/classes"/>
    43         <property name="cp" value=""/>
    44         <javac 
    45             srcdir="src-${version}" 
    46             destdir="build/${version}/classes" 
    47             source="1.5" target="1.5"
    48             classpath="${cp}"
    49         />
    50     </target>
    51 </project>