xref: /aoo41x/main/l10ntools/java/jpropex/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="jpropex" default="main" basedir=".">
29
30    <!-- ================================================================= -->
31    <!-- settings                                                          -->
32    <!-- ================================================================= -->
33
34    <!-- name of this sub target used in recursive builds -->
35    <property name="target" value="jpropex"/>
36
37    <!-- name of jar file created, without .jar extension -->
38    <property name="jarname" value="jpropex"/>
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/jpropex"/>
49    <property name="build.misc"  value="${build.dir}/misc/jpropex"/>
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"/>
90
91    <!-- prepare output directories -->
92    <target name="prepare">
93        <mkdir dir="${build.dir}"/>
94        <mkdir dir="${build.class}"/>
95        <mkdir dir="${build.misc}"/>
96    </target>
97
98
99    <target name="res" depends="prepare">
100        <copy todir="${build.class}">
101             <fileset dir="${java.dir}">
102                 <include name="**/*.properties"/>
103                 <include name="**/*.css"/>
104                 <include name="**/*.dtd"/>
105                 <include name="**/*.form"/>
106                 <include name="**/*.gif "/>
107                 <include name="**/*.htm"/>
108                 <include name="**/*.html"/>
109                 <include name="**/*.js"/>
110                 <include name="**/*.mod"/>
111                 <include name="**/*.sql"/>
112                 <include name="**/*.xml"/>
113                 <include name="**/*.xsl"/>
114                 <include name="**/*.map"/>
115
116             </fileset>
117	    </copy>
118    </target>
119
120
121    <target name="compile" depends="prepare,res">
122	<javac destdir="${build.class}"
123	       debug="${debug}"
124               deprecation="${deprication}"
125	       optimize="${optimize}"
126	       classpathref="classpath">
127            <src path="${java.dir}"/>
128	    <include name="**/*.java"/>
129	</javac>
130    </target>
131
132    <!-- clean up -->
133    <target name="clean" depends="prepare">
134        <delete includeEmptyDirs="true">
135            <fileset dir="${build.class}">
136                <patternset>
137                    <include name="${package}/**/*.class"/>
138                </patternset>
139            </fileset>
140        </delete>
141    </target>
142
143    <!-- create jar file -->
144    <target name="jar" depends="prepare,compile" if="build.class">
145        <jar jarfile="${build.class}/${jarname}.jar"
146             basedir="${build.class}"
147             manifest="${jarname}.MF">
148                 <include name="**/*.class"/>
149                 <include name="**/*.properties"/>
150                 <include name="**/*.css"/>
151                 <include name="**/*.dtd"/>
152                 <include name="**/*.form"/>
153                 <include name="**/*.gif "/>
154                 <include name="**/*.htm"/>
155                 <include name="**/*.html"/>
156                 <include name="**/*.js"/>
157                 <include name="**/*.mod"/>
158                 <include name="**/*.sql"/>
159                 <include name="**/*.xml"/>
160                 <include name="**/*.xsl"/>
161                 <include name="**/*.map"/>
162        </jar>
163    </target>
164
165    <target name="test" depends="prepare">
166    </target>
167
168</project>
169
170