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