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