samples/growingparameters/build.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:53:37 +0200
changeset 77 22c1953e372c
child 119 8147cafd007a
permissions -rw-r--r--
Compute with added method converted to separate project
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@77
     7
    <target name="build">
jtulach@77
     8
        <antcall target="-build-one">
jtulach@77
     9
            <param name="version" value="api1.0"/>
jtulach@77
    10
        </antcall>
jtulach@77
    11
        <antcall target="-build-one">
jtulach@77
    12
            <param name="version" value="api2.0"/>
jtulach@77
    13
        </antcall>
jtulach@77
    14
        <antcall target="-build-one">
jtulach@77
    15
            <param name="version" value="impl"/>
jtulach@77
    16
            <param name="cp" location="build/api2.0/classes"/>
jtulach@77
    17
        </antcall>
jtulach@77
    18
    </target>
jtulach@77
    19
    
jtulach@77
    20
    <target name="run" depends="build">
jtulach@77
    21
        <echo level="info" message="Running the Implementation against Version 2.0 of the API. This should succeeds."/>
jtulach@77
    22
        <antcall target="-run-one">
jtulach@77
    23
            <param name="version" value="api2.0"/>
jtulach@77
    24
        </antcall>
jtulach@77
    25
    </target>
jtulach@77
    26
jtulach@77
    27
    
jtulach@77
    28
    <!-- support methods -->
jtulach@77
    29
    
jtulach@77
    30
    <target name="-run-one">
jtulach@77
    31
        <fail message="You need to specify API version number" unless="version"/>
jtulach@77
    32
        <java classpath="build/${version}/classes:build/impl/classes" classname="impl.Impl"
jtulach@77
    33
            failonerror="true" 
jtulach@77
    34
        >
jtulach@77
    35
            <jvmarg value="-ea"/>
jtulach@77
    36
        </java>
jtulach@77
    37
    </target>
jtulach@77
    38
    
jtulach@77
    39
    <target name="-build-one">
jtulach@77
    40
        <fail message="You need to specify version number" unless="version"/>
jtulach@77
    41
        
jtulach@77
    42
        <mkdir dir="build/${version}/classes"/>
jtulach@77
    43
        <property name="cp" value=""/>
jtulach@77
    44
        <javac 
jtulach@77
    45
            srcdir="src-${version}" 
jtulach@77
    46
            destdir="build/${version}/classes" 
jtulach@77
    47
            source="1.5" target="1.5"
jtulach@77
    48
            classpath="${cp}"
jtulach@77
    49
        />
jtulach@77
    50
    </target>
jtulach@77
    51
</project>