xref: /aoo42x/main/l10ntools/java/jpropex/build.xml (revision 5111cb72)
1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2*5111cb72SAndrew Rist<!--***********************************************************
3*5111cb72SAndrew Rist *
4*5111cb72SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
5*5111cb72SAndrew Rist * or more contributor license agreements.  See the NOTICE file
6*5111cb72SAndrew Rist * distributed with this work for additional information
7*5111cb72SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
8*5111cb72SAndrew Rist * to you under the Apache License, Version 2.0 (the
9*5111cb72SAndrew Rist * "License"); you may not use this file except in compliance
10*5111cb72SAndrew Rist * with the License.  You may obtain a copy of the License at
11*5111cb72SAndrew Rist *
12*5111cb72SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
13*5111cb72SAndrew Rist *
14*5111cb72SAndrew Rist * Unless required by applicable law or agreed to in writing,
15*5111cb72SAndrew Rist * software distributed under the License is distributed on an
16*5111cb72SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17*5111cb72SAndrew Rist * KIND, either express or implied.  See the License for the
18*5111cb72SAndrew Rist * specific language governing permissions and limitations
19*5111cb72SAndrew Rist * under the License.
20*5111cb72SAndrew Rist *
21*5111cb72SAndrew Rist ***********************************************************-->
22*5111cb72SAndrew Rist
23*5111cb72SAndrew Rist
24cdf0e10cSrcweir<project name="jpropex" default="main" basedir=".">
25cdf0e10cSrcweir
26cdf0e10cSrcweir    <!-- ================================================================= -->
27cdf0e10cSrcweir    <!-- settings                                                          -->
28cdf0e10cSrcweir    <!-- ================================================================= -->
29cdf0e10cSrcweir
30cdf0e10cSrcweir    <!-- name of this sub target used in recursive builds -->
31cdf0e10cSrcweir    <property name="target" value="jpropex"/>
32cdf0e10cSrcweir
33cdf0e10cSrcweir    <!-- name of jar file created, without .jar extension -->
34cdf0e10cSrcweir    <property name="jarname" value="jpropex"/>
35cdf0e10cSrcweir
36cdf0e10cSrcweir    <!-- relative path to project directory -->
37cdf0e10cSrcweir    <property name="prj" value="."/>
38cdf0e10cSrcweir
39cdf0e10cSrcweir    <!-- build output directory -->
40cdf0e10cSrcweir    <property name="out" value="build"/>
41cdf0e10cSrcweir
42cdf0e10cSrcweir    <!-- build directories -->
43cdf0e10cSrcweir    <property name="build.dir" value="${out}"/>
44cdf0e10cSrcweir    <property name="build.class" value="${build.dir}/class/jpropex"/>
45cdf0e10cSrcweir    <property name="build.misc"  value="${build.dir}/misc/jpropex"/>
46cdf0e10cSrcweir
47cdf0e10cSrcweir    <!-- start of java source code package structure -->
48cdf0e10cSrcweir    <property name="java.dir" value="java"/>
49cdf0e10cSrcweir
50cdf0e10cSrcweir    <!-- define how to handle CLASSPATH environment -->
51cdf0e10cSrcweir    <property name="build.sysclasspath" value="ignore"/>
52cdf0e10cSrcweir
53cdf0e10cSrcweir    <!-- classpath settings for compile and javadoc tasks -->
54cdf0e10cSrcweir    <path id="classpath">
55cdf0e10cSrcweir        <pathelement location="."/>
56cdf0e10cSrcweir        <pathelement location="${build.class}"/>
57cdf0e10cSrcweir    </path>
58cdf0e10cSrcweir
59cdf0e10cSrcweir    <!-- name to display in documentation -->
60cdf0e10cSrcweir    <!--    <property name="docname" value="l10n converter"/> -->
61cdf0e10cSrcweir
62cdf0e10cSrcweir    <!-- set "modern" java compiler -->
63cdf0e10cSrcweir    <property name="build.compiler" value="modern"/>
64cdf0e10cSrcweir
65cdf0e10cSrcweir    <!-- set wether we want to compile with debug information -->
66cdf0e10cSrcweir    <property name="debug" value="on"/>
67cdf0e10cSrcweir
68cdf0e10cSrcweir    <!-- set wether we want to compile with optimisation -->
69cdf0e10cSrcweir    <property name="optimize" value="off"/>
70cdf0e10cSrcweir
71cdf0e10cSrcweir    <!-- set wether we want to compile with or without deprecation -->
72cdf0e10cSrcweir    <property name="deprecation" value="on"/>
73cdf0e10cSrcweir
74cdf0e10cSrcweir    <target name="info">
75cdf0e10cSrcweir        <echo message="--------------------"/>
76cdf0e10cSrcweir        <echo message="${target}"/>
77cdf0e10cSrcweir        <echo message="--------------------"/>
78cdf0e10cSrcweir    </target>
79cdf0e10cSrcweir
80cdf0e10cSrcweir    <!-- ================================================================= -->
81cdf0e10cSrcweir    <!-- custom targets                                                    -->
82cdf0e10cSrcweir    <!-- ================================================================= -->
83cdf0e10cSrcweir
84cdf0e10cSrcweir    <!-- the main target, called in recursive builds -->
85cdf0e10cSrcweir    <target name="main" depends="info,prepare,compile,jar"/>
86cdf0e10cSrcweir
87cdf0e10cSrcweir    <!-- prepare output directories -->
88cdf0e10cSrcweir    <target name="prepare">
89cdf0e10cSrcweir        <mkdir dir="${build.dir}"/>
90cdf0e10cSrcweir        <mkdir dir="${build.class}"/>
91cdf0e10cSrcweir        <mkdir dir="${build.misc}"/>
92cdf0e10cSrcweir    </target>
93cdf0e10cSrcweir
94cdf0e10cSrcweir
95cdf0e10cSrcweir    <target name="res" depends="prepare">
96cdf0e10cSrcweir        <copy todir="${build.class}">
97cdf0e10cSrcweir             <fileset dir="${java.dir}">
98cdf0e10cSrcweir                 <include name="**/*.properties"/>
99cdf0e10cSrcweir                 <include name="**/*.css"/>
100cdf0e10cSrcweir                 <include name="**/*.dtd"/>
101cdf0e10cSrcweir                 <include name="**/*.form"/>
102cdf0e10cSrcweir                 <include name="**/*.gif "/>
103cdf0e10cSrcweir                 <include name="**/*.htm"/>
104cdf0e10cSrcweir                 <include name="**/*.html"/>
105cdf0e10cSrcweir                 <include name="**/*.js"/>
106cdf0e10cSrcweir                 <include name="**/*.mod"/>
107cdf0e10cSrcweir                 <include name="**/*.sql"/>
108cdf0e10cSrcweir                 <include name="**/*.xml"/>
109cdf0e10cSrcweir                 <include name="**/*.xsl"/>
110cdf0e10cSrcweir                 <include name="**/*.map"/>
111cdf0e10cSrcweir
112cdf0e10cSrcweir             </fileset>
113cdf0e10cSrcweir	    </copy>
114cdf0e10cSrcweir    </target>
115cdf0e10cSrcweir
116cdf0e10cSrcweir
117cdf0e10cSrcweir    <target name="compile" depends="prepare,res">
118cdf0e10cSrcweir	<javac destdir="${build.class}"
119cdf0e10cSrcweir	       debug="${debug}"
120cdf0e10cSrcweir               deprecation="${deprication}"
121cdf0e10cSrcweir	       optimize="${optimize}"
122cdf0e10cSrcweir	       classpathref="classpath">
123cdf0e10cSrcweir            <src path="${java.dir}"/>
124cdf0e10cSrcweir	    <include name="**/*.java"/>
125cdf0e10cSrcweir	</javac>
126cdf0e10cSrcweir    </target>
127cdf0e10cSrcweir
128cdf0e10cSrcweir    <!-- clean up -->
129cdf0e10cSrcweir    <target name="clean" depends="prepare">
130cdf0e10cSrcweir        <delete includeEmptyDirs="true">
131cdf0e10cSrcweir            <fileset dir="${build.class}">
132cdf0e10cSrcweir                <patternset>
133cdf0e10cSrcweir                    <include name="${package}/**/*.class"/>
134cdf0e10cSrcweir                </patternset>
135cdf0e10cSrcweir            </fileset>
136cdf0e10cSrcweir        </delete>
137cdf0e10cSrcweir    </target>
138cdf0e10cSrcweir
139cdf0e10cSrcweir    <!-- create jar file -->
140cdf0e10cSrcweir    <target name="jar" depends="prepare,compile" if="build.class">
141cdf0e10cSrcweir        <jar jarfile="${build.class}/${jarname}.jar"
142cdf0e10cSrcweir             basedir="${build.class}"
143cdf0e10cSrcweir             manifest="${jarname}.MF">
144cdf0e10cSrcweir                 <include name="**/*.class"/>
145cdf0e10cSrcweir                 <include name="**/*.properties"/>
146cdf0e10cSrcweir                 <include name="**/*.css"/>
147cdf0e10cSrcweir                 <include name="**/*.dtd"/>
148cdf0e10cSrcweir                 <include name="**/*.form"/>
149cdf0e10cSrcweir                 <include name="**/*.gif "/>
150cdf0e10cSrcweir                 <include name="**/*.htm"/>
151cdf0e10cSrcweir                 <include name="**/*.html"/>
152cdf0e10cSrcweir                 <include name="**/*.js"/>
153cdf0e10cSrcweir                 <include name="**/*.mod"/>
154cdf0e10cSrcweir                 <include name="**/*.sql"/>
155cdf0e10cSrcweir                 <include name="**/*.xml"/>
156cdf0e10cSrcweir                 <include name="**/*.xsl"/>
157cdf0e10cSrcweir                 <include name="**/*.map"/>
158cdf0e10cSrcweir        </jar>
159cdf0e10cSrcweir    </target>
160cdf0e10cSrcweir
161cdf0e10cSrcweir    <target name="test" depends="prepare">
162cdf0e10cSrcweir    </target>
163cdf0e10cSrcweir
164cdf0e10cSrcweir</project>
165cdf0e10cSrcweir
166