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