samples/instanceofclass/build.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:53:34 +0200
changeset 75 aa07c59612ac
child 119 8147cafd007a
permissions -rw-r--r--
Moving class based InstanceProvider to own project
     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     
     7     <target name="build">
     8         <antcall target="-build-one">
     9             <param name="version" value="api1.0"/>
    10         </antcall>
    11         <antcall target="-build-one">
    12             <param name="version" value="api2.0"/>
    13         </antcall>
    14     </target>
    15     
    16     <target name="run" depends="build">
    17         <echo level="info" message="Running the Implementation against Version 1.0 of the API. This should succeed."/>
    18         <antcall target="-run-one">
    19             <param name="version" value="api1.0"/>
    20         </antcall>
    21         <echo level="info" message="Running the Implementation against Version 2.0 of the API. This should succeed."/>
    22         <antcall target="-run-one">
    23             <param name="version" value="api2.0"/>
    24         </antcall>
    25     </target>
    26 
    27     
    28     <!-- support methods -->
    29     
    30     <target name="-run-one">
    31         <fail message="You need to specify API version number" unless="version"/>
    32         <java classpath="build/${version}/classes:build/impl/classes" classname="impl.Main"
    33             failonerror="true"
    34         />
    35     </target>
    36     
    37     <target name="-build-one">
    38         <fail message="You need to specify version number" unless="version"/>
    39         
    40         <mkdir dir="build/${version}/classes"/>
    41         <property name="cp" value=""/>
    42         <javac 
    43             srcdir="src-${version}" 
    44             destdir="build/${version}/classes" 
    45             source="1.5" target="1.5"
    46             classpath="${cp}"
    47         />
    48     </target>
    49 </project>