samples/forjoe/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@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@76
     6
    
jtulach@128
     7
    <target name="compile" depends="build"/>
jtulach@76
     8
    <target name="build">
jtulach@76
     9
        <antcall target="-build-one">
jtulach@76
    10
            <param name="version" value="api1.0"/>
jtulach@76
    11
        </antcall>
jtulach@76
    12
        <echo level="info" message="Compiling the Implementation. This should succeed."/>
jtulach@76
    13
        <antcall target="-build-one">
jtulach@76
    14
            <param name="version" value="impl"/>
jtulach@76
    15
            <param name="cp" location="build/api1.0/classes"/>
jtulach@76
    16
        </antcall>
jtulach@76
    17
    </target>
jtulach@76
    18
    
jtulach@76
    19
    <target name="run" depends="build">
jtulach@76
    20
        <echo level="info" message="Instantiating and running Joe's implementation. This should succeed."/>
jtulach@76
    21
        <antcall target="-run-one">
jtulach@76
    22
            <param name="version" value="api1.0"/>
jtulach@76
    23
        </antcall>
jtulach@76
    24
    </target>
jtulach@76
    25
jtulach@76
    26
    
jtulach@76
    27
    <!-- support methods -->
jtulach@76
    28
    
jtulach@76
    29
    <target name="-run-one">
jtulach@76
    30
        <fail message="You need to specify API version number" unless="version"/>
jtulach@76
    31
        <java classpath="build/${version}/classes:build/impl/classes" classname="impl.joe.Main"
jtulach@76
    32
            failonerror="true"
jtulach@76
    33
        />
jtulach@76
    34
    </target>
jtulach@76
    35
    
jtulach@76
    36
    <target name="-build-one">
jtulach@76
    37
        <fail message="You need to specify version number" unless="version"/>
jtulach@76
    38
        
jtulach@76
    39
        <mkdir dir="build/${version}/classes"/>
jtulach@76
    40
        <property name="cp" value=""/>
jtulach@76
    41
        <javac 
jtulach@76
    42
            srcdir="src-${version}" 
jtulach@76
    43
            destdir="build/${version}/classes" 
jtulach@76
    44
            source="1.5" target="1.5"
jtulach@76
    45
            classpath="${cp}"
jtulach@76
    46
        />
jtulach@76
    47
    </target>
jtulach@76
    48
</project>