samples/forjoe/build.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:53:37 +0200
changeset 76 ee4e8d38093e
child 119 8147cafd007a
permissions -rw-r--r--
Finished review of "are abstract classes useful?", up to line 1600
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <project name="forjoe" 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         <echo level="info" message="Compiling the Implementation. This should succeed."/>
    12         <antcall target="-build-one">
    13             <param name="version" value="impl"/>
    14             <param name="cp" location="build/api1.0/classes"/>
    15         </antcall>
    16     </target>
    17     
    18     <target name="run" depends="build">
    19         <echo level="info" message="Instantiating and running Joe's implementation. This should succeed."/>
    20         <antcall target="-run-one">
    21             <param name="version" value="api1.0"/>
    22         </antcall>
    23     </target>
    24 
    25     
    26     <!-- support methods -->
    27     
    28     <target name="-run-one">
    29         <fail message="You need to specify API version number" unless="version"/>
    30         <java classpath="build/${version}/classes:build/impl/classes" classname="impl.joe.Main"
    31             failonerror="true"
    32         />
    33     </target>
    34     
    35     <target name="-build-one">
    36         <fail message="You need to specify version number" unless="version"/>
    37         
    38         <mkdir dir="build/${version}/classes"/>
    39         <property name="cp" value=""/>
    40         <javac 
    41             srcdir="src-${version}" 
    42             destdir="build/${version}/classes" 
    43             source="1.5" target="1.5"
    44             classpath="${cp}"
    45         />
    46     </target>
    47 </project>