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