xref: /trunk/main/scripting/examples/java/build.xml (revision cc697cd0)
15111cb72SAndrew Rist<!--***********************************************************
25111cb72SAndrew Rist *
35111cb72SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
45111cb72SAndrew Rist * or more contributor license agreements.  See the NOTICE file
55111cb72SAndrew Rist * distributed with this work for additional information
65111cb72SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
75111cb72SAndrew Rist * to you under the Apache License, Version 2.0 (the
85111cb72SAndrew Rist * "License"); you may not use this file except in compliance
95111cb72SAndrew Rist * with the License.  You may obtain a copy of the License at
105111cb72SAndrew Rist *
115111cb72SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
125111cb72SAndrew Rist *
135111cb72SAndrew Rist * Unless required by applicable law or agreed to in writing,
145111cb72SAndrew Rist * software distributed under the License is distributed on an
155111cb72SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
165111cb72SAndrew Rist * KIND, either express or implied.  See the License for the
175111cb72SAndrew Rist * specific language governing permissions and limitations
185111cb72SAndrew Rist * under the License.
195111cb72SAndrew Rist *
205111cb72SAndrew Rist ***********************************************************-->
21cdf0e10cSrcweir
22cdf0e10cSrcweir
23cdf0e10cSrcweir<project name="Scripting Framework Java Examples" default="all" basedir=".">
24cdf0e10cSrcweir  <!-- =================== Environmental Properties ======================= -->
25cdf0e10cSrcweir
26cdf0e10cSrcweir  <property name="prj" value="../.."/>
27cdf0e10cSrcweir  <property environment="env"/>
28cdf0e10cSrcweir  <property name="outdir" value="${out}/class/examples/java"/>
29cdf0e10cSrcweir
30cdf0e10cSrcweir  <!-- ==================== classpath setting ============================ -->
31cdf0e10cSrcweir  <path id="idlclasspath">
32cdf0e10cSrcweir    <pathelement location="${solar.jar}/unoil.jar"/>
33cdf0e10cSrcweir    <pathelement location="${solar.jar}/jurt.jar"/>
34cdf0e10cSrcweir    <pathelement location="${solar.jar}/juh.jar"/>
35cdf0e10cSrcweir    <pathelement location="${solar.jar}/ridl.jar"/>
36cdf0e10cSrcweir    <pathelement location="${out}/class/ScriptFramework.jar"/>
37cdf0e10cSrcweir  </path>
38cdf0e10cSrcweir
39cdf0e10cSrcweir  <!-- ===================== HelloWorld example =========================== -->
40cdf0e10cSrcweir  <target name="HelloWorld">
41cdf0e10cSrcweir
42cdf0e10cSrcweir    <mkdir dir="${outdir}/HelloWorld"/>
43cdf0e10cSrcweir
44cdf0e10cSrcweir    <javac srcdir="HelloWorld" destdir="${outdir}/HelloWorld"
45*cc697cd0SHerbert Dürr           includes="**/*.java" classpathref="idlclasspath" includeantruntime="false"
46cdf0e10cSrcweir           debug="${debug}" optimize="${optimize}" deprecation="on"/>
47cdf0e10cSrcweir
48cdf0e10cSrcweir    <copy file="HelloWorld/HelloWorld.java" todir="${outdir}/HelloWorld"/>
49cdf0e10cSrcweir    <copy file="HelloWorld/parcel-descriptor.xml" todir="${outdir}/HelloWorld"/>
50cdf0e10cSrcweir
51cdf0e10cSrcweir    <jar jarfile="${outdir}/HelloWorld/HelloWorld.jar"
52cdf0e10cSrcweir         basedir="${outdir}/HelloWorld"
53cdf0e10cSrcweir         includes="**/*.class"
54cdf0e10cSrcweir         excludes="${outdir}/HelloWorld/HelloWorld.jar">
55cdf0e10cSrcweir    </jar>
56cdf0e10cSrcweir
57cdf0e10cSrcweir    <delete file="${outdir}/HelloWorld/HelloWorld.class"/>
58cdf0e10cSrcweir
59cdf0e10cSrcweir  </target>
60cdf0e10cSrcweir
61cdf0e10cSrcweir  <!-- ===================== Highlight example ========================== -->
62cdf0e10cSrcweir  <target name="Highlight">
63cdf0e10cSrcweir
64cdf0e10cSrcweir    <mkdir dir="${outdir}/Highlight"/>
65cdf0e10cSrcweir
66cdf0e10cSrcweir    <javac srcdir="Highlight" destdir="${outdir}/Highlight"
67*cc697cd0SHerbert Dürr           includes="**/*.java" classpathref="idlclasspath" includeantruntime="false"
68cdf0e10cSrcweir           debug="${debug}" optimize="${optimize}" deprecation="on"/>
69cdf0e10cSrcweir
70cdf0e10cSrcweir    <copy file="Highlight/HighlightText.java" todir="${outdir}/Highlight"/>
71cdf0e10cSrcweir    <copy file="Highlight/parcel-descriptor.xml" todir="${outdir}/Highlight"/>
72cdf0e10cSrcweir
73cdf0e10cSrcweir    <jar jarfile="${outdir}/Highlight/Highlight.jar"
74cdf0e10cSrcweir         basedir="${outdir}/Highlight"
75cdf0e10cSrcweir         includes="**/*.class"
76cdf0e10cSrcweir         excludes="${outdir}/Highlight/Highlight.jar">
77cdf0e10cSrcweir    </jar>
78cdf0e10cSrcweir
79cdf0e10cSrcweir    <delete file="${outdir}/Highlight/HighlightText.class"/>
80cdf0e10cSrcweir
81cdf0e10cSrcweir  </target>
82cdf0e10cSrcweir
83cdf0e10cSrcweir  <!-- ===================== MemoryUsage example ========================== -->
84cdf0e10cSrcweir  <target name="MemoryUsage">
85cdf0e10cSrcweir
86cdf0e10cSrcweir    <mkdir dir="${outdir}/MemoryUsage"/>
87cdf0e10cSrcweir
88cdf0e10cSrcweir    <javac srcdir="MemoryUsage" destdir="${outdir}/MemoryUsage"
89*cc697cd0SHerbert Dürr           includes="**/*.java" classpathref="idlclasspath" includeantruntime="false"
90cdf0e10cSrcweir           debug="${debug}" optimize="${optimize}" deprecation="on"/>
91cdf0e10cSrcweir
92cdf0e10cSrcweir    <copy file="MemoryUsage/MemoryUsage.java" todir="${outdir}/MemoryUsage"/>
93cdf0e10cSrcweir    <copy file="MemoryUsage/parcel-descriptor.xml" todir="${outdir}/MemoryUsage"/>
94cdf0e10cSrcweir
95cdf0e10cSrcweir    <jar jarfile="${outdir}/MemoryUsage/MemoryUsage.jar"
96cdf0e10cSrcweir         basedir="${outdir}/MemoryUsage"
97cdf0e10cSrcweir         includes="**/*.class"
98cdf0e10cSrcweir         excludes="${outdir}/MemoryUsage/MemoryUsage.jar">
99cdf0e10cSrcweir    </jar>
100cdf0e10cSrcweir
101cdf0e10cSrcweir    <delete file="${outdir}/MemoryUsage/MemoryUsage.class"/>
102cdf0e10cSrcweir
103cdf0e10cSrcweir  </target>
104cdf0e10cSrcweir
105cdf0e10cSrcweir  <!-- ===================== selector example ========================== -->
106cdf0e10cSrcweir  <target name="selector">
107cdf0e10cSrcweir
108cdf0e10cSrcweir    <mkdir dir="${outdir}/selector"/>
109cdf0e10cSrcweir
110cdf0e10cSrcweir    <javac srcdir="selector" destdir="${outdir}/selector"
111cdf0e10cSrcweir       	   includes="**/*.java" classpathref="idlclasspath"
112cdf0e10cSrcweir	       debug="${debug}" optimize="${optimize}" deprecation="on"/>
113cdf0e10cSrcweir
114cdf0e10cSrcweir    <copy todir="${outdir}/selector">
115cdf0e10cSrcweir        <fileset dir="selector">
116cdf0e10cSrcweir            <include name="**/*.java"/>
117cdf0e10cSrcweir            <include name="*.xml"/>
118cdf0e10cSrcweir            <include name="*.gif"/>
119cdf0e10cSrcweir        </fileset>
120cdf0e10cSrcweir    </copy>
121cdf0e10cSrcweir
122cdf0e10cSrcweir    <jar jarfile="${outdir}/selector/selector.jar"
123cdf0e10cSrcweir         basedir="${outdir}/selector" includes="*.class,*.gif">
124cdf0e10cSrcweir    </jar>
125cdf0e10cSrcweir
126cdf0e10cSrcweir    <delete>
127cdf0e10cSrcweir        <fileset dir="${outdir}/selector" includes="*.class,*.gif"/>
128cdf0e10cSrcweir    </delete>
129cdf0e10cSrcweir
130cdf0e10cSrcweir  </target>
131cdf0e10cSrcweir
132cdf0e10cSrcweir  <!-- ========================= All In One Build ======================= -->
133cdf0e10cSrcweir  <target name="all" depends="HelloWorld,Highlight,MemoryUsage"/>
134cdf0e10cSrcweir
135cdf0e10cSrcweir</project>
136