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