4 Licensed to the Apache Software Foundation (ASF) under one or more
5 contributor license agreements. See the NOTICE file distributed with
6 this work for additional information regarding copyright ownership.
7 The ASF licenses this file to You under the Apache License, Version 2.0
8 the "License"); you may not use this file except in compliance with
9 the License. You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
20 <project name="icu" default="default">
23 Provides integration with ICU (International Components for Unicode) for
24 stronger Unicode and internationalization support.
28 <path id="additional.dependencies">
29 <fileset dir="lib" includes="icu4j-*.jar"/>
32 <pathconvert property="project.classpath"
34 refid="additional.dependencies"
37 <import file="../contrib-build.xml"/>
39 <property name="gennorm2.src.dir" value="src/data/utr30"/>
40 <property name="gennorm2.src.files"
41 value="nfkc.txt nfkc_cf.txt BasicFoldings.txt DiacriticFolding.txt DingbatFolding.txt HanRadicalFolding.txt NativeDigitFolding.txt"/>
42 <property name="gennorm2.tmp" value="${build.dir}/gennorm2/utr30.tmp"/>
43 <property name="gennorm2.dst" value="src/resources/org/apache/lucene/analysis/icu/utr30.nrm"/>
44 <target name="gennorm2">
45 <echo>Note that the gennorm2 and icupkg tools must be on your PATH. These tools
46 are part of the ICU4C package. See http://site.icu-project.org/ </echo>
47 <mkdir dir="${build.dir}/gennorm2"/>
48 <exec executable="gennorm2" failonerror="true">
51 <arg value="${gennorm2.src.dir}"/>
52 <arg line="${gennorm2.src.files}"/>
54 <arg value="${gennorm2.tmp}"/>
56 <!-- now convert binary file to big-endian -->
57 <exec executable="icupkg" failonerror="true">
59 <arg value="${gennorm2.tmp}"/>
60 <arg value="${gennorm2.dst}"/>
62 <delete file="${gennorm2.tmp}"/>
65 <property name="rbbi.src.dir" location="src/data/uax29"/>
66 <property name="rbbi.dst.dir" location="src/resources/org/apache/lucene/analysis/icu/segmentation"/>
68 <target name="genrbbi" depends="compile-tools">
69 <mkdir dir="${rbbi.dst.dir}"/>
71 classname="org.apache.lucene.analysis.icu.RBBIRuleCompiler"
76 <path refid="additional.dependencies"/>
77 <pathelement location="${build.dir}/classes/tools"/>
79 <arg value="${rbbi.src.dir}"/>
80 <arg value="${rbbi.dst.dir}"/>
84 <property name="uax29.supp.macros.output.file"
85 location="../../src/java/org/apache/lucene/analysis/standard/SUPPLEMENTARY.jflex-macro"/>
87 <target name="gen-uax29-supp-macros" depends="compile-tools">
89 classname="org.apache.lucene.analysis.icu.GenerateJFlexSupplementaryMacros"
93 output="${uax29.supp.macros.output.file}">
95 <path refid="additional.dependencies"/>
96 <pathelement location="${build.dir}/classes/tools"/>
101 <target name="compile-tools" depends="common.compile-tools">
103 srcdir="src/tools/java"
104 destdir="${build.dir}/classes/tools">
105 <classpath refid="classpath"/>