xref: /aoo41x/main/l10ntools/java/l10nconv/build.xml (revision cdf0e10c)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3
4  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
6  Copyright 2000, 2010 Oracle and/or its affiliates.
7
8  OpenOffice.org - a multi-platform office productivity suite
9
10  This file is part of OpenOffice.org.
11
12  OpenOffice.org is free software: you can redistribute it and/or modify
13  it under the terms of the GNU Lesser General Public License version 3
14  only, as published by the Free Software Foundation.
15
16  OpenOffice.org is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  GNU Lesser General Public License version 3 for more details
20  (a copy is included in the LICENSE file that accompanied this code).
21
22  You should have received a copy of the GNU Lesser General Public License
23  version 3 along with OpenOffice.org.  If not, see
24  <http://www.openoffice.org/license.html>
25  for a copy of the LGPLv3 License.
26
27-->
28<project name="l10nconv" default="main" basedir=".">
29
30    <!-- ================================================================= -->
31    <!-- settings                                                          -->
32    <!-- ================================================================= -->
33
34    <!-- name of this sub target used in recursive builds -->
35    <property name="target" value="l10nconv"/>
36
37    <!-- name of jar file created, without .jar extension -->
38    <property name="jarname" value="converter"/>
39
40    <!-- relative path to project directory -->
41    <property name="prj" value="."/>
42
43    <!-- build output directory -->
44    <property name="out" value="build"/>
45
46    <!-- build directories -->
47    <property name="build.dir" value="${out}"/>
48    <property name="build.class" value="${build.dir}/class/converter"/>
49    <property name="build.misc" value="${build.dir}/misc/converter"/>
50
51    <!-- start of java source code package structure -->
52    <property name="java.dir" value="java"/>
53
54    <!-- define how to handle CLASSPATH environment -->
55    <property name="build.sysclasspath" value="ignore"/>
56
57    <!-- classpath settings for compile and javadoc tasks -->
58    <path id="classpath">
59        <pathelement location="."/>
60        <pathelement location="${build.class}"/>
61    </path>
62
63    <!-- name to display in documentation -->
64    <property name="docname" value="l10n converter"/>
65
66    <!-- set "modern" java compiler -->
67    <property name="build.compiler" value="modern"/>
68
69    <!-- set wether we want to compile with debug information -->
70    <property name="debug" value="on"/>
71
72    <!-- set wether we want to compile with optimisation -->
73    <property name="optimize" value="off"/>
74
75    <!-- set wether we want to compile with or without deprecation -->
76    <property name="deprecation" value="on"/>
77
78    <target name="info">
79        <echo message="--------------------"/>
80        <echo message="${target}"/>
81        <echo message="--------------------"/>
82    </target>
83
84    <!-- ================================================================= -->
85    <!-- custom targets                                                    -->
86    <!-- ================================================================= -->
87
88    <!-- the main target, called in recursive builds -->
89    <target name="main" depends="info,prepare,compile,jar,javadoc,zipdoc"/>
90
91    <!-- prepare output directories -->
92    <target name="prepare">
93        <mkdir dir="${build.dir}"/>
94        <mkdir dir="${build.dir}/doc"/>
95        <mkdir dir="${build.dir}/doc/javadoc"/>
96        <mkdir dir="${build.class}"/>
97        <mkdir dir="${build.misc}"/>
98    </target>
99
100
101    <target name="res" depends="prepare">
102        <copy todir="${build.class}">
103             <fileset dir="${java.dir}">
104                 <include name="**/*.properties"/>
105                 <include name="**/*.css"/>
106                 <include name="**/*.dtd"/>
107                 <include name="**/*.form"/>
108                 <include name="**/*.gif "/>
109                 <include name="**/*.htm"/>
110                 <include name="**/*.html"/>
111                 <include name="**/*.js"/>
112                 <include name="**/*.mod"/>
113                 <include name="**/*.sql"/>
114                 <include name="**/*.xml"/>
115                 <include name="**/*.xsl"/>
116                 <include name="**/*.map"/>
117
118             </fileset>
119	    </copy>
120    </target>
121
122
123    <target name="compile" depends="prepare,res">
124	<javac destdir="${build.class}"
125	       debug="${debug}"
126               deprecation="${deprication}"
127	       optimize="${optimize}"
128	       classpathref="classpath">
129            <src path="${java.dir}"/>
130	    <include name="**/*.java"/>
131	</javac>
132    </target>
133
134    <!-- check if javadoc is up to date -->
135    <target name="javadoc_check" depends="prepare" if="build.dir">
136	<uptodate property="javadocBuild.notRequired" value="true"
137            targetfile="${build.dir}/doc/converter_javadoc.zip">
138		<srcfiles dir="${java.dir}" includes="**/*.java"/>
139	</uptodate>
140    </target>
141
142    <!-- generate java documentation -->
143    <target name="javadoc" depends="prepare,javadoc_check,compile"
144         unless="javadocBuild.notRequired"
145         if="build.dir">
146
147        <javadoc destdir="${build.dir}/doc/javadoc"
148                 verbose="false"
149                 author="false"
150                 nodeprecated="true"
151                 nodeprecatedlist="true"
152                 use="true"
153                 Doctitle="${docname}"
154                 windowtitle="${docname}"
155                 classpathref="classpath">
156
157            <packageset dir="${java.dir}" defaultexcludes="yes">
158                <include name="com/**"/>
159            </packageset>
160
161            <link offline="true" href="http://java.sun.com/j2se/1.4.2/docs/api"
162                  packagelistLoc="${common.doc}/jdk1.4.2"/>
163            <link offline="true"
164                  href="http://java.sun.com/products/servlet/2.3/javadoc"
165                  packagelistLoc="${common.doc}/servlet2.3"/>
166            <link offline="true"
167                  href="http://logging.apache.org/log4j/docs/api"
168                  packagelistLoc="${common.doc}/log4j-1.2.8"/>
169            <link offline="true"
170                  href="http://java.sun.com/products/javabeans/glasgow/javadocs"
171                  packagelistLoc="${common.doc}/jaf-1.0.2"/>
172            <link offline="true"
173                  href="http://java.sun.com/products/javamail/javadocs"
174                  packagelistLoc="${common.doc}/javamail-1.3.1"/>
175            <link offline="true"
176                  href="http://ws.apache.org/soap/docs"
177                  packagelistLoc="${common.doc}/soap-2.3.1"/>
178
179            <bottom>&lt;i&gt;Copyright &amp;#169; 2004 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA&lt;/i&gt;</bottom>
180            <header>${docname}</header>
181
182       </javadoc>
183    </target>
184
185    <!-- zip documentation and store in build/misc -->
186    <target name="zipdoc" depends="javadoc" if="build.dir" unless="javadocBuild.notRequired">
187	<zip zipfile="${build.dir}/doc/converter_javadoc.zip"
188      basedir="${build.dir}/doc/javadoc"
189      update="true"/>
190    </target>
191
192    <!-- clean up -->
193    <target name="clean" depends="prepare">
194        <delete includeEmptyDirs="true">
195            <fileset dir="${build.class}">
196                <patternset>
197                    <include name="${package}/**/*.class"/>
198                </patternset>
199            </fileset>
200        </delete>
201    </target>
202
203    <!-- create jar file -->
204    <target name="jar" depends="prepare,compile" if="build.class">
205        <jar jarfile="${build.class}/${jarname}.jar"
206             basedir="${build.class}"
207             manifest="${jarname}.MF">
208                 <include name="**/*.class"/>
209                 <include name="**/*.properties"/>
210                 <include name="**/*.css"/>
211                 <include name="**/*.dtd"/>
212                 <include name="**/*.form"/>
213                 <include name="**/*.gif "/>
214                 <include name="**/*.htm"/>
215                 <include name="**/*.html"/>
216                 <include name="**/*.js"/>
217                 <include name="**/*.mod"/>
218                 <include name="**/*.sql"/>
219                 <include name="**/*.xml"/>
220                 <include name="**/*.xsl"/>
221                 <include name="**/*.map"/>
222        </jar>
223    </target>
224
225    <target name="test" depends="prepare">
226    </target>
227
228</project>
229
230