xref: /trunk/main/scripting/examples/java/build.xml (revision cdf0e10c)
1*cdf0e10cSrcweir<!--
2*cdf0e10cSrcweir
3*cdf0e10cSrcweir  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir
5*cdf0e10cSrcweir  Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir
7*cdf0e10cSrcweir  OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir
9*cdf0e10cSrcweir  This file is part of OpenOffice.org.
10*cdf0e10cSrcweir
11*cdf0e10cSrcweir  OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir
15*cdf0e10cSrcweir  OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir
21*cdf0e10cSrcweir  You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir
26*cdf0e10cSrcweir-->
27*cdf0e10cSrcweir<project name="Scripting Framework Java Examples" default="all" basedir=".">
28*cdf0e10cSrcweir  <!-- =================== Environmental Properties ======================= -->
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir  <property name="prj" value="../.."/>
31*cdf0e10cSrcweir  <property environment="env"/>
32*cdf0e10cSrcweir  <property name="outdir" value="${out}/class/examples/java"/>
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir  <!-- ==================== classpath setting ============================ -->
35*cdf0e10cSrcweir  <path id="idlclasspath">
36*cdf0e10cSrcweir    <pathelement location="${solar.jar}/unoil.jar"/>
37*cdf0e10cSrcweir    <pathelement location="${solar.jar}/jurt.jar"/>
38*cdf0e10cSrcweir    <pathelement location="${solar.jar}/juh.jar"/>
39*cdf0e10cSrcweir    <pathelement location="${solar.jar}/ridl.jar"/>
40*cdf0e10cSrcweir    <pathelement location="${out}/class/ScriptFramework.jar"/>
41*cdf0e10cSrcweir  </path>
42*cdf0e10cSrcweir
43*cdf0e10cSrcweir  <!-- ===================== HelloWorld example =========================== -->
44*cdf0e10cSrcweir  <target name="HelloWorld">
45*cdf0e10cSrcweir
46*cdf0e10cSrcweir    <mkdir dir="${outdir}/HelloWorld"/>
47*cdf0e10cSrcweir
48*cdf0e10cSrcweir    <javac srcdir="HelloWorld" destdir="${outdir}/HelloWorld"
49*cdf0e10cSrcweir           includes="**/*.java" classpathref="idlclasspath"
50*cdf0e10cSrcweir           debug="${debug}" optimize="${optimize}" deprecation="on"/>
51*cdf0e10cSrcweir
52*cdf0e10cSrcweir    <copy file="HelloWorld/HelloWorld.java" todir="${outdir}/HelloWorld"/>
53*cdf0e10cSrcweir    <copy file="HelloWorld/parcel-descriptor.xml" todir="${outdir}/HelloWorld"/>
54*cdf0e10cSrcweir
55*cdf0e10cSrcweir    <jar jarfile="${outdir}/HelloWorld/HelloWorld.jar"
56*cdf0e10cSrcweir         basedir="${outdir}/HelloWorld"
57*cdf0e10cSrcweir         includes="**/*.class"
58*cdf0e10cSrcweir         excludes="${outdir}/HelloWorld/HelloWorld.jar">
59*cdf0e10cSrcweir    </jar>
60*cdf0e10cSrcweir
61*cdf0e10cSrcweir    <delete file="${outdir}/HelloWorld/HelloWorld.class"/>
62*cdf0e10cSrcweir
63*cdf0e10cSrcweir  </target>
64*cdf0e10cSrcweir
65*cdf0e10cSrcweir  <!-- ===================== Highlight example ========================== -->
66*cdf0e10cSrcweir  <target name="Highlight">
67*cdf0e10cSrcweir
68*cdf0e10cSrcweir    <mkdir dir="${outdir}/Highlight"/>
69*cdf0e10cSrcweir
70*cdf0e10cSrcweir    <javac srcdir="Highlight" destdir="${outdir}/Highlight"
71*cdf0e10cSrcweir           includes="**/*.java" classpathref="idlclasspath"
72*cdf0e10cSrcweir           debug="${debug}" optimize="${optimize}" deprecation="on"/>
73*cdf0e10cSrcweir
74*cdf0e10cSrcweir    <copy file="Highlight/HighlightText.java" todir="${outdir}/Highlight"/>
75*cdf0e10cSrcweir    <copy file="Highlight/parcel-descriptor.xml" todir="${outdir}/Highlight"/>
76*cdf0e10cSrcweir
77*cdf0e10cSrcweir    <jar jarfile="${outdir}/Highlight/Highlight.jar"
78*cdf0e10cSrcweir         basedir="${outdir}/Highlight"
79*cdf0e10cSrcweir         includes="**/*.class"
80*cdf0e10cSrcweir         excludes="${outdir}/Highlight/Highlight.jar">
81*cdf0e10cSrcweir    </jar>
82*cdf0e10cSrcweir
83*cdf0e10cSrcweir    <delete file="${outdir}/Highlight/HighlightText.class"/>
84*cdf0e10cSrcweir
85*cdf0e10cSrcweir  </target>
86*cdf0e10cSrcweir
87*cdf0e10cSrcweir  <!-- ===================== MemoryUsage example ========================== -->
88*cdf0e10cSrcweir  <target name="MemoryUsage">
89*cdf0e10cSrcweir
90*cdf0e10cSrcweir    <mkdir dir="${outdir}/MemoryUsage"/>
91*cdf0e10cSrcweir
92*cdf0e10cSrcweir    <javac srcdir="MemoryUsage" destdir="${outdir}/MemoryUsage"
93*cdf0e10cSrcweir           includes="**/*.java" classpathref="idlclasspath"
94*cdf0e10cSrcweir           debug="${debug}" optimize="${optimize}" deprecation="on"/>
95*cdf0e10cSrcweir
96*cdf0e10cSrcweir    <copy file="MemoryUsage/MemoryUsage.java" todir="${outdir}/MemoryUsage"/>
97*cdf0e10cSrcweir    <copy file="MemoryUsage/parcel-descriptor.xml" todir="${outdir}/MemoryUsage"/>
98*cdf0e10cSrcweir
99*cdf0e10cSrcweir    <jar jarfile="${outdir}/MemoryUsage/MemoryUsage.jar"
100*cdf0e10cSrcweir         basedir="${outdir}/MemoryUsage"
101*cdf0e10cSrcweir         includes="**/*.class"
102*cdf0e10cSrcweir         excludes="${outdir}/MemoryUsage/MemoryUsage.jar">
103*cdf0e10cSrcweir    </jar>
104*cdf0e10cSrcweir
105*cdf0e10cSrcweir    <delete file="${outdir}/MemoryUsage/MemoryUsage.class"/>
106*cdf0e10cSrcweir
107*cdf0e10cSrcweir  </target>
108*cdf0e10cSrcweir
109*cdf0e10cSrcweir  <!-- ===================== selector example ========================== -->
110*cdf0e10cSrcweir  <target name="selector">
111*cdf0e10cSrcweir
112*cdf0e10cSrcweir    <mkdir dir="${outdir}/selector"/>
113*cdf0e10cSrcweir
114*cdf0e10cSrcweir    <javac srcdir="selector" destdir="${outdir}/selector"
115*cdf0e10cSrcweir       	   includes="**/*.java" classpathref="idlclasspath"
116*cdf0e10cSrcweir	       debug="${debug}" optimize="${optimize}" deprecation="on"/>
117*cdf0e10cSrcweir
118*cdf0e10cSrcweir    <copy todir="${outdir}/selector">
119*cdf0e10cSrcweir        <fileset dir="selector">
120*cdf0e10cSrcweir            <include name="**/*.java"/>
121*cdf0e10cSrcweir            <include name="*.xml"/>
122*cdf0e10cSrcweir            <include name="*.gif"/>
123*cdf0e10cSrcweir        </fileset>
124*cdf0e10cSrcweir    </copy>
125*cdf0e10cSrcweir
126*cdf0e10cSrcweir    <jar jarfile="${outdir}/selector/selector.jar"
127*cdf0e10cSrcweir         basedir="${outdir}/selector" includes="*.class,*.gif">
128*cdf0e10cSrcweir    </jar>
129*cdf0e10cSrcweir
130*cdf0e10cSrcweir    <delete>
131*cdf0e10cSrcweir        <fileset dir="${outdir}/selector" includes="*.class,*.gif"/>
132*cdf0e10cSrcweir    </delete>
133*cdf0e10cSrcweir
134*cdf0e10cSrcweir  </target>
135*cdf0e10cSrcweir
136*cdf0e10cSrcweir  <!-- ========================= All In One Build ======================= -->
137*cdf0e10cSrcweir  <target name="all" depends="HelloWorld,Highlight,MemoryUsage"/>
138*cdf0e10cSrcweir
139*cdf0e10cSrcweir</project>
140