samples/componentinjection/anagram-modular/build.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 10:06:54 +0200
changeset 219 3fb53f65db57
parent 215 43b122711ae1
child 221 a89ad3d1da08
permissions -rw-r--r--
Example with registration methods is working
jtulach@215
     1
<?xml version="1.0" encoding="UTF-8"?>
jtulach@215
     2
<project name="Build Script" default="test" basedir=".">
jtulach@215
     3
    <target name="clean">
jtulach@215
     4
        <delete dir="build"/>
jtulach@215
     5
    </target>
jtulach@215
     6
    
jtulach@215
     7
    <target name="compile" depends="build"/>
jtulach@215
     8
    <target name="build" depends="-libraries">
jtulach@215
     9
        <antcall target="-build-one">
jtulach@215
    10
            <param name="version" value="api"/>
jtulach@219
    11
            <param name="cp" value=""/>
jtulach@219
    12
        </antcall>
jtulach@219
    13
        <antcall target="-build-one">
jtulach@219
    14
            <param name="version" value="word-static"/>
jtulach@219
    15
        </antcall>
jtulach@219
    16
        <antcall target="-build-one">
jtulach@219
    17
            <param name="version" value="scrambler-simple"/>
jtulach@219
    18
        </antcall>
jtulach@219
    19
        <antcall target="-build-one">
jtulach@219
    20
            <param name="version" value="gui"/>
jtulach@219
    21
        </antcall>
jtulach@219
    22
        <antcall target="-build-one">
jtulach@219
    23
            <param name="version" value="app-register"/>
jtulach@219
    24
            <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes"/>
jtulach@215
    25
        </antcall>
jtulach@215
    26
        
jtulach@215
    27
    </target>
jtulach@215
    28
    
jtulach@219
    29
    <target name="test" depends="build">
jtulach@215
    30
        <echo level="info" message="Running the tests with bridge enabled. This should succeeds."/>
jtulach@215
    31
        <antcall target="-run-one">
jtulach@219
    32
            <param name="version" value="app-register"/>
jtulach@219
    33
            <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes"/>
jtulach@219
    34
            <param name="main" value="org.apidesign.anagram.app.register.Main"/>
jtulach@215
    35
        </antcall>
jtulach@215
    36
    </target>
jtulach@215
    37
    
jtulach@215
    38
    <!-- support methods -->
jtulach@215
    39
    
jtulach@215
    40
    <target name="-libraries">
jtulach@215
    41
        <ant dir="../../libs/"/>
jtulach@215
    42
        
jtulach@215
    43
        <property name="junit.jar" location="../libs/dist/junit-4.4.jar"/>
jtulach@215
    44
    </target>
jtulach@215
    45
jtulach@219
    46
    <target name="-run-one">
jtulach@219
    47
        <java classpath="${cp}:build/${version}/classes" classname="${main}"/>
jtulach@215
    48
    </target>
jtulach@215
    49
    
jtulach@215
    50
    <target name="-build-one">
jtulach@215
    51
        <fail message="You need to specify version number" unless="version"/>
jtulach@215
    52
        
jtulach@215
    53
        <mkdir dir="build/${version}/classes"/>
jtulach@219
    54
        <property name="cp" value="build/api/classes"/>
jtulach@215
    55
        <javac 
jtulach@215
    56
            srcdir="src-${version}" 
jtulach@215
    57
            destdir="build/${version}/classes" 
jtulach@215
    58
            source="1.5" target="1.5"
jtulach@215
    59
            classpath="${cp}"
jtulach@215
    60
            debug="true" debuglevel="lines,vars,source"
jtulach@215
    61
        />
jtulach@215
    62
        <copy todir="build/${version}/classes">
jtulach@215
    63
            <fileset dir="src-${version}">
jtulach@215
    64
                <exclude name="**/*.java"/>
jtulach@215
    65
            </fileset>
jtulach@215
    66
        </copy>
jtulach@215
    67
    </target>
jtulach@215
    68
</project>