3 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 Copyright 2008 by Sun Microsystems, Inc.
7 OpenOffice.org - a multi-platform office productivity suite
9 $RCSfile: build.xml,v $
13 This file is part of OpenOffice.org.
15 OpenOffice.org is free software: you can redistribute it and/or modify
16 it under the terms of the GNU Lesser General Public License version 3
17 only, as published by the Free Software Foundation.
19 OpenOffice.org is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU Lesser General Public License version 3 for more details
23 (a copy is included in the LICENSE file that accompanied this code).
25 You should have received a copy of the GNU Lesser General Public License
26 version 3 along with OpenOffice.org. If not, see
27 <http://www.openoffice.org/license.html>
28 for a copy of the LGPLv3 License.
31 <project name="Scripting Framework Java Examples" default="all" basedir=".">
32 <!-- =================== Environmental Properties ======================= -->
34 <property name="prj" value="../.."/>
35 <property environment="env"/>
36 <property name="outdir" value="${out}/class/examples/java"/>
38 <!-- ==================== classpath setting ============================ -->
39 <path id="idlclasspath">
40 <pathelement location="${solar.jar}/unoil.jar"/>
41 <pathelement location="${solar.jar}/jurt.jar"/>
42 <pathelement location="${solar.jar}/juh.jar"/>
43 <pathelement location="${solar.jar}/ridl.jar"/>
44 <pathelement location="${out}/class/ScriptFramework.jar"/>
47 <!-- ===================== HelloWorld example =========================== -->
48 <target name="HelloWorld">
50 <mkdir dir="${outdir}/HelloWorld"/>
52 <javac srcdir="HelloWorld" destdir="${outdir}/HelloWorld"
53 includes="**/*.java" classpathref="idlclasspath"
54 debug="${debug}" optimize="${optimize}" deprecation="on"/>
56 <copy file="HelloWorld/HelloWorld.java" todir="${outdir}/HelloWorld"/>
57 <copy file="HelloWorld/parcel-descriptor.xml" todir="${outdir}/HelloWorld"/>
59 <jar jarfile="${outdir}/HelloWorld/HelloWorld.jar"
60 basedir="${outdir}/HelloWorld"
62 excludes="${outdir}/HelloWorld/HelloWorld.jar">
65 <delete file="${outdir}/HelloWorld/HelloWorld.class"/>
69 <!-- ===================== Highlight example ========================== -->
70 <target name="Highlight">
72 <mkdir dir="${outdir}/Highlight"/>
74 <javac srcdir="Highlight" destdir="${outdir}/Highlight"
75 includes="**/*.java" classpathref="idlclasspath"
76 debug="${debug}" optimize="${optimize}" deprecation="on"/>
78 <copy file="Highlight/HighlightText.java" todir="${outdir}/Highlight"/>
79 <copy file="Highlight/parcel-descriptor.xml" todir="${outdir}/Highlight"/>
81 <jar jarfile="${outdir}/Highlight/Highlight.jar"
82 basedir="${outdir}/Highlight"
84 excludes="${outdir}/Highlight/Highlight.jar">
87 <delete file="${outdir}/Highlight/HighlightText.class"/>
91 <!-- ===================== MemoryUsage example ========================== -->
92 <target name="MemoryUsage">
94 <mkdir dir="${outdir}/MemoryUsage"/>
96 <javac srcdir="MemoryUsage" destdir="${outdir}/MemoryUsage"
97 includes="**/*.java" classpathref="idlclasspath"
98 debug="${debug}" optimize="${optimize}" deprecation="on"/>
100 <copy file="MemoryUsage/MemoryUsage.java" todir="${outdir}/MemoryUsage"/>
101 <copy file="MemoryUsage/parcel-descriptor.xml" todir="${outdir}/MemoryUsage"/>
103 <jar jarfile="${outdir}/MemoryUsage/MemoryUsage.jar"
104 basedir="${outdir}/MemoryUsage"
105 includes="**/*.class"
106 excludes="${outdir}/MemoryUsage/MemoryUsage.jar">
109 <delete file="${outdir}/MemoryUsage/MemoryUsage.class"/>
113 <!-- ===================== selector example ========================== -->
114 <target name="selector">
116 <mkdir dir="${outdir}/selector"/>
118 <javac srcdir="selector" destdir="${outdir}/selector"
119 includes="**/*.java" classpathref="idlclasspath"
120 debug="${debug}" optimize="${optimize}" deprecation="on"/>
122 <copy todir="${outdir}/selector">
123 <fileset dir="selector">
124 <include name="**/*.java"/>
125 <include name="*.xml"/>
126 <include name="*.gif"/>
130 <jar jarfile="${outdir}/selector/selector.jar"
131 basedir="${outdir}/selector" includes="*.class,*.gif">
135 <fileset dir="${outdir}/selector" includes="*.class,*.gif"/>
140 <!-- ========================= All In One Build ======================= -->
141 <target name="all" depends="HelloWorld,Highlight,MemoryUsage"/>