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