samples/growingparameters/build.xml
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Fri, 03 Apr 2020 16:32:36 +0200
changeset 416 9ed8788a1a4e
parent 128 8ef997796d0a
permissions -rw-r--r--
Using HTTPS to download the libraries
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@263
     6
    <target name="test"/>
jtulach@77
     7
    
jtulach@128
     8
    <target name="compile" depends="build"/>
jtulach@77
     9
    <target name="build">
jtulach@77
    10
        <antcall target="-build-one">
jtulach@77
    11
            <param name="version" value="api1.0"/>
jtulach@77
    12
        </antcall>
jtulach@77
    13
        <antcall target="-build-one">
jtulach@77
    14
            <param name="version" value="api2.0"/>
jtulach@77
    15
        </antcall>
jtulach@77
    16
        <antcall target="-build-one">
jtulach@77
    17
            <param name="version" value="impl"/>
jtulach@77
    18
            <param name="cp" location="build/api2.0/classes"/>
jtulach@77
    19
        </antcall>
jtulach@77
    20
    </target>
jtulach@77
    21
    
jtulach@77
    22
    <target name="run" depends="build">
jtulach@77
    23
        <echo level="info" message="Running the Implementation against Version 2.0 of the API. This should succeeds."/>
jtulach@77
    24
        <antcall target="-run-one">
jtulach@77
    25
            <param name="version" value="api2.0"/>
jtulach@77
    26
        </antcall>
jtulach@77
    27
    </target>
jtulach@77
    28
jtulach@77
    29
    
jtulach@77
    30
    <!-- support methods -->
jtulach@77
    31
    
jtulach@77
    32
    <target name="-run-one">
jtulach@77
    33
        <fail message="You need to specify API version number" unless="version"/>
jtulach@77
    34
        <java classpath="build/${version}/classes:build/impl/classes" classname="impl.Impl"
jtulach@77
    35
            failonerror="true" 
jtulach@77
    36
        >
jtulach@77
    37
            <jvmarg value="-ea"/>
jtulach@77
    38
        </java>
jtulach@77
    39
    </target>
jtulach@77
    40
    
jtulach@77
    41
    <target name="-build-one">
jtulach@77
    42
        <fail message="You need to specify version number" unless="version"/>
jtulach@77
    43
        
jtulach@77
    44
        <mkdir dir="build/${version}/classes"/>
jtulach@77
    45
        <property name="cp" value=""/>
jtulach@77
    46
        <javac 
jtulach@77
    47
            srcdir="src-${version}" 
jtulach@77
    48
            destdir="build/${version}/classes" 
jtulach@77
    49
            source="1.5" target="1.5"
jtulach@77
    50
            classpath="${cp}"
jtulach@77
    51
        />
jtulach@77
    52
    </target>
jtulach@77
    53
</project>