samples/forjoe/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="forjoe" 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         <echo level="info" message="Compiling the Implementation. This should succeed."/>
    14         <antcall target="-build-one">
    15             <param name="version" value="impl"/>
    16             <param name="cp" location="build/api1.0/classes"/>
    17         </antcall>
    18     </target>
    19     
    20     <target name="run" depends="build">
    21         <echo level="info" message="Instantiating and running Joe's implementation. This should succeed."/>
    22         <antcall target="-run-one">
    23             <param name="version" value="api1.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.joe.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>