samples/forjoe/build.xml
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 30 Oct 2014 21:30:10 +0100
changeset 409 40cabcdcd2be
parent 128 8ef997796d0a
permissions -rw-r--r--
Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
jtulach@76
     1
<?xml version="1.0" encoding="UTF-8"?>
jtulach@76
     2
<project name="forjoe" default="run" basedir=".">
jtulach@76
     3
    <target name="clean">
jtulach@76
     4
        <delete dir="build"/>
jtulach@76
     5
    </target>
jtulach@263
     6
    <target name="test"/>
jtulach@76
     7
    
jtulach@128
     8
    <target name="compile" depends="build"/>
jtulach@76
     9
    <target name="build">
jtulach@76
    10
        <antcall target="-build-one">
jtulach@76
    11
            <param name="version" value="api1.0"/>
jtulach@76
    12
        </antcall>
jtulach@76
    13
        <echo level="info" message="Compiling the Implementation. This should succeed."/>
jtulach@76
    14
        <antcall target="-build-one">
jtulach@76
    15
            <param name="version" value="impl"/>
jtulach@76
    16
            <param name="cp" location="build/api1.0/classes"/>
jtulach@76
    17
        </antcall>
jtulach@76
    18
    </target>
jtulach@76
    19
    
jtulach@76
    20
    <target name="run" depends="build">
jtulach@76
    21
        <echo level="info" message="Instantiating and running Joe's implementation. This should succeed."/>
jtulach@76
    22
        <antcall target="-run-one">
jtulach@76
    23
            <param name="version" value="api1.0"/>
jtulach@76
    24
        </antcall>
jtulach@76
    25
    </target>
jtulach@76
    26
jtulach@76
    27
    
jtulach@76
    28
    <!-- support methods -->
jtulach@76
    29
    
jtulach@76
    30
    <target name="-run-one">
jtulach@76
    31
        <fail message="You need to specify API version number" unless="version"/>
jtulach@76
    32
        <java classpath="build/${version}/classes:build/impl/classes" classname="impl.joe.Main"
jtulach@76
    33
            failonerror="true"
jtulach@76
    34
        />
jtulach@76
    35
    </target>
jtulach@76
    36
    
jtulach@76
    37
    <target name="-build-one">
jtulach@76
    38
        <fail message="You need to specify version number" unless="version"/>
jtulach@76
    39
        
jtulach@76
    40
        <mkdir dir="build/${version}/classes"/>
jtulach@76
    41
        <property name="cp" value=""/>
jtulach@76
    42
        <javac 
jtulach@76
    43
            srcdir="src-${version}" 
jtulach@76
    44
            destdir="build/${version}/classes" 
jtulach@76
    45
            source="1.5" target="1.5"
jtulach@76
    46
            classpath="${cp}"
jtulach@76
    47
        />
jtulach@76
    48
    </target>
jtulach@76
    49
</project>