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
jtulach@76
     1
<?xml version="1.0" encoding="UTF-8"?>
jtulach@76
     2
<project name="forjoe" default="run" basedir=".">
jtulach@76
     3
    <target name="clean">
jtulach@76
     4
        <delete dir="build"/>
jtulach@76
     5
    </target>
jtulach@76
     6
    
jtulach@76
     7
    <target name="build">
jtulach@76
     8
        <antcall target="-build-one">
jtulach@76
     9
            <param name="version" value="api1.0"/>
jtulach@76
    10
        </antcall>
jtulach@76
    11
        <echo level="info" message="Compiling the Implementation. This should succeed."/>
jtulach@76
    12
        <antcall target="-build-one">
jtulach@76
    13
            <param name="version" value="impl"/>
jtulach@76
    14
            <param name="cp" location="build/api1.0/classes"/>
jtulach@76
    15
        </antcall>
jtulach@76
    16
    </target>
jtulach@76
    17
    
jtulach@76
    18
    <target name="run" depends="build">
jtulach@76
    19
        <echo level="info" message="Instantiating and running Joe's implementation. This should succeed."/>
jtulach@76
    20
        <antcall target="-run-one">
jtulach@76
    21
            <param name="version" value="api1.0"/>
jtulach@76
    22
        </antcall>
jtulach@76
    23
    </target>
jtulach@76
    24
jtulach@76
    25
    
jtulach@76
    26
    <!-- support methods -->
jtulach@76
    27
    
jtulach@76
    28
    <target name="-run-one">
jtulach@76
    29
        <fail message="You need to specify API version number" unless="version"/>
jtulach@76
    30
        <java classpath="build/${version}/classes:build/impl/classes" classname="impl.joe.Main"
jtulach@76
    31
            failonerror="true"
jtulach@76
    32
        />
jtulach@76
    33
    </target>
jtulach@76
    34
    
jtulach@76
    35
    <target name="-build-one">
jtulach@76
    36
        <fail message="You need to specify version number" unless="version"/>
jtulach@76
    37
        
jtulach@76
    38
        <mkdir dir="build/${version}/classes"/>
jtulach@76
    39
        <property name="cp" value=""/>
jtulach@76
    40
        <javac 
jtulach@76
    41
            srcdir="src-${version}" 
jtulach@76
    42
            destdir="build/${version}/classes" 
jtulach@76
    43
            source="1.5" target="1.5"
jtulach@76
    44
            classpath="${cp}"
jtulach@76
    45
        />
jtulach@76
    46
    </target>
jtulach@76
    47
</project>