samples/extensionpoint/build.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Mon, 21 Dec 2009 16:54:12 +0100
changeset 340 9c1a298e51a9
parent 263 7e8e995065c5
permissions -rw-r--r--
Fixing dependencies since the org.openide.util and org.openide.util.lookup are now separate
jtulach@86
     1
<?xml version="1.0" encoding="UTF-8"?>
jtulach@86
     2
<project name="extensionpoint" default="run" basedir=".">
jtulach@86
     3
    <target name="clean">
jtulach@86
     4
        <delete dir="build"/>
jtulach@86
     5
    </target>
jtulach@263
     6
    <target name="test"/>
jtulach@86
     7
    
jtulach@128
     8
    <target name="compile" depends="build"/>
jtulach@86
     9
    <target name="build">
jtulach@86
    10
        <antcall target="-build-one">
jtulach@86
    11
            <param name="version" value="api"/>
jtulach@86
    12
        </antcall>
jtulach@86
    13
        <antcall target="-build-one">
jtulach@86
    14
            <param name="version" value="helloworld"/>
jtulach@86
    15
            <param name="cp" location="build/api/classes"/>
jtulach@86
    16
        </antcall>
jtulach@86
    17
        <antcall target="-build-one">
jtulach@86
    18
            <param name="version" value="hellodesign"/>
jtulach@86
    19
            <param name="cp" location="build/api/classes"/>
jtulach@86
    20
        </antcall>
jtulach@86
    21
    </target>
jtulach@86
    22
    
jtulach@86
    23
    <target name="run" depends="build">
jtulach@86
    24
        <echo level="info" message="Running without any extension points."/>
jtulach@86
    25
        <antcall target="-run-one">
jtulach@86
    26
        </antcall>
jtulach@86
    27
        <echo level="info" message="Running with 'Hello World!' extension."/>
jtulach@86
    28
        <antcall target="-run-one">
jtulach@86
    29
            <param name="version1" value="helloworld"/>
jtulach@86
    30
        </antcall>
jtulach@86
    31
        <echo level="info" message="Running with 'Hello Design!' extension."/>
jtulach@86
    32
        <antcall target="-run-one">
jtulach@86
    33
            <param name="version1" value="hellodesign"/>
jtulach@86
    34
        </antcall>
jtulach@86
    35
        <echo level="info" message="Running with both extension."/>
jtulach@86
    36
        <antcall target="-run-one">
jtulach@86
    37
            <param name="version1" value="helloworld"/>
jtulach@86
    38
            <param name="version2" value="hellodesign"/>
jtulach@86
    39
        </antcall>
jtulach@86
    40
    </target>
jtulach@86
    41
jtulach@86
    42
    
jtulach@86
    43
    <!-- support methods -->
jtulach@86
    44
    
jtulach@86
    45
    <target name="-run-one">
jtulach@86
    46
        <java 
jtulach@340
    47
            classpath="build/${version1}/classes:build/${version2}/classes:build/api/classes:../libs/dist/org-openide-util-lookup.jar"
jtulach@86
    48
            classname="org.apidesign.extensionpoint.Main"
jtulach@86
    49
            failonerror="true" 
jtulach@86
    50
        >
jtulach@86
    51
            <jvmarg value="-ea"/>
jtulach@86
    52
        </java>
jtulach@86
    53
    </target>
jtulach@86
    54
    
jtulach@86
    55
    <target name="-build-one">
jtulach@86
    56
        <fail message="You need to specify version number" unless="version"/>
jtulach@86
    57
        
jtulach@86
    58
        <mkdir dir="build/${version}/classes"/>
jtulach@86
    59
        <property name="cp" value=""/>
jtulach@86
    60
        <javac 
jtulach@86
    61
            srcdir="src-${version}" 
jtulach@86
    62
            destdir="build/${version}/classes" 
jtulach@86
    63
            source="1.5" target="1.5"
jtulach@340
    64
            classpath="${cp}:../libs/dist/org-openide-util-lookup.jar"
jtulach@86
    65
        />
jtulach@86
    66
        <copy todir="build/${version}/classes">
jtulach@86
    67
            <fileset dir="src-${version}">
jtulach@86
    68
                <exclude name="**/*.java"/>
jtulach@86
    69
            </fileset>
jtulach@86
    70
        </copy>
jtulach@86
    71
    </target>
jtulach@86
    72
</project>