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