1<!--
2*******************************************************************************
3* Copyright (C) 1997-2015, International Business Machines Corporation and    *
4* others. All Rights Reserved.                                                *
5*******************************************************************************
6-->
7<project name="icu4j" default="jar" basedir="."
8    xmlns:jacoco="antlib:org.jacoco.ant">
9
10    <property file="build-local.properties"/>
11    <property file="build.properties"/>
12
13    <property name="shared.dir" value="main/shared"/>
14    <import file="${shared.dir}/build/common-targets.xml"/>
15
16    <property environment="env"/>
17
18    <!-- icu4j binaries -->
19    <property name="icu4j.jar.file" value="icu4j.jar"/>
20    <property name="icu4jtests.jar.file" value="icu4jtests.jar"/>
21    <property name="icu4j-charset.jar.file" value="icu4j-charset.jar"/>
22    <property name="icu4j-localespi.jar.file" value="icu4j-localespi.jar"/>
23
24    <property name="icu4jdemos.jar.file" value="icu4jdemos.jar"/>
25
26    <!-- icu4j API doc jar file -->
27    <property name="icu4jdocs.jar.file" value="icu4j-docs.jar"/>
28
29    <!-- icu4j src jar files -->
30    <property name="icu4j-src.jar.file" value="icu4j-src.jar"/>
31    <property name="icu4j-charset-src.jar.file" value="icu4j-charset-src.jar"/>
32    <property name="icu4j-localespi-src.jar.file" value="icu4j-localespi-src.jar"/>
33
34    <!-- icu4j source package archive files -->
35    <property name="icu4jsrc.zip.file" value="icu4j.zip"/>
36    <property name="icu4jsrc.tgz.file" value="icu4j.tgz"/>
37
38    <!-- icu4j versioned release files -->
39    <property name="icu4j.jar.versioned.file" value="icu4j-${release.file.ver}.jar"/>
40    <property name="icu4j-charset.jar.versioned.file" value="icu4j-charset-${release.file.ver}.jar"/>
41    <property name="icu4j-localespi.jar.versioned.file" value="icu4j-localespi-${release.file.ver}.jar"/>
42
43    <property name="icu4j-src.jar.versioned.file" value="icu4j-${release.file.ver}-src.jar"/>
44    <property name="icu4j-charset-src.jar.versioned.file" value="icu4j-charset-${release.file.ver}-src.jar"/>
45    <property name="icu4j-localespi-src.jar.versioned.file" value="icu4j-localespi-${release.file.ver}-src.jar"/>
46
47    <property name="icu4jdocs.jar.versioned.file" value="icu4j-${release.file.ver}-docs.jar"/>
48
49    <!-- <property name="icu4jsrc.zip.versioned.file" value="icu4j-${release.file.ver}.zip"/> -->
50    <property name="icu4jsrc.tgz.versioned.file" value="icu4j-${release.file.ver}.tgz"/>
51
52    <!-- API doc -->
53    <property name="icu4j.api.doc.title" value="ICU4J ${api.doc.version} API Specification"/>
54    <property name="icu4j.api.doc.window.title" value="ICU4J ${api.doc.version}"/>
55    <property name="icu4j.api.doc.header" value="ICU4J ${api.doc.version}"/>
56    <property name="icu4j.api.doc.jdk.link" value="http://docs.oracle.com/javase/7/docs/api/"/>
57
58    <!-- directories -->
59    <property name="release.dir" value="release"/>
60    <property name="doc.dir" value="doc"/>
61    <property name="cldr.util.out.dir" value="${out.dir}/cldr_util"/>
62    <property name="cldr.release.dir" value="release_cldr"/>
63
64    <!-- Java version check -->
65    <condition property="is.java6.plus">
66        <or>
67            <contains string="${java.version}" substring="1.6."/>
68            <contains string="${java.version}" substring="1.7."/>
69            <contains string="${java.version}" substring="1.8."/>
70        </or>
71    </condition>
72    <condition property="is.java5">
73        <contains string="${java.version}" substring="1.5."/>
74    </condition>
75    <fail message="The JDK version is too old or unknown.">
76        <condition>
77            <not>
78                <or>
79                    <isset property="is.java6.plus"/>
80                    <isset property="is.java5"/>
81                </or>
82             </not>
83        </condition>
84    </fail>
85
86    <condition property="is.java7.plus">
87        <or>
88            <contains string="${java.version}" substring="1.7."/>
89            <contains string="${java.version}" substring="1.8."/>
90        </or>
91    </condition>
92
93    <!-- Build environment info -->
94    <property name="env.COMPUTERNAME" value="${env.HOSTNAME}"/>
95    <target name="info" description="Display the build environment information">
96        <echo message="----- Build Environment Information -------------------"/>
97        <echo message="Java Home:    ${java.home}"/>
98        <echo message="Java Version: ${java.version}"/>
99        <echo message="Ant Home:     ${ant.home}"/>
100        <echo message="Ant Version:  ${ant.version}"/>
101        <echo message="OS:           ${os.name}"/>
102        <echo message="OS Version:   ${os.version}"/>
103        <echo message="OS Arch:      ${os.arch}"/>
104        <echo message="Host:         ${env.COMPUTERNAME}"/>
105        <echo message="-------------------------------------------------------"/>
106    </target>
107
108    <target name="clean" description="Clean up build outputs">
109        <ant dir="${icu4j.core.dir}" target="clean" inheritAll="false"/>
110        <ant dir="${icu4j.collate.dir}" target="clean" inheritAll="false"/>
111        <ant dir="${icu4j.charset.dir}" target="clean" inheritAll="false"/>
112        <ant dir="${icu4j.currdata.dir}" target="clean" inheritAll="false"/>
113        <ant dir="${icu4j.langdata.dir}" target="clean" inheritAll="false"/>
114        <ant dir="${icu4j.localespi.dir}" target="clean" inheritAll="false"/>
115        <ant dir="${icu4j.regiondata.dir}" target="clean" inheritAll="false"/>
116        <ant dir="${icu4j.translit.dir}" target="clean" inheritAll="false"/>
117        <ant dir="${icu4j.test-framework.dir}" target="clean" inheritAll="false"/>
118        <ant dir="${icu4j.core-tests.dir}" target="clean" inheritAll="false"/>
119        <ant dir="${icu4j.collate-tests.dir}" target="clean" inheritAll="false"/>
120        <ant dir="${icu4j.charset-tests.dir}" target="clean" inheritAll="false"/>
121        <ant dir="${icu4j.localespi-tests.dir}" target="clean" inheritAll="false"/>
122        <ant dir="${icu4j.packaging-tests.dir}" target="clean" inheritAll="false"/>
123        <ant dir="${icu4j.translit-tests.dir}" target="clean" inheritAll="false"/>
124        <ant dir="${icu4j.testall.dir}" target="clean" inheritAll="false"/>
125        <ant dir="${icu4j.build-tools.dir}" target="clean" inheritAll="false"/>
126        <ant dir="${icu4j.tools.dir}" target="clean" inheritAll="false"/>
127        <ant dir="${icu4j.demos.dir}" target="clean" inheritAll="false"/>
128        <ant dir="${icu4j.samples.dir}" target="clean" inheritAll="false"/>
129        <ant dir="${icu4j.perf-tests.dir}" target="clean" inheritAll="false"/>
130
131        <!-- delete all .jar files root directory -->
132        <delete>
133            <fileset dir="." includes="icu4j*.jar"/>
134        </delete>
135
136        <delete dir="${release.dir}"/>
137        <delete dir="${doc.dir}"/>
138        <delete dir="${out.dir}"/>
139        <delete dir="${module.dir}"/>
140        <delete dir="${cldr.release.dir}"/>
141
142        <available file="eclipse-build" type="dir" property="eclipse-build.dir.present"/>
143        <antcall target="_clean.eclipse-build"/>
144    </target>
145
146    <target name="_clean.eclipse-build" if="eclipse-build.dir.present">
147        <ant dir="eclipse-build" target="clean" inheritAll="false"/>
148    </target>
149
150    <!-- meta build targets -->
151    <target name="all" depends="info, main, tests, build-tools, tools, demos, samples, perf-tests, jar, docs" description="Build all primary targets"/>
152    <target name="main" depends="info, core, collate, charset, currdata, langdata, regiondata, translit, localespi" description="Build ICU4J runtime library classes"/>
153    <target name="tests" depends="info, core-tests, charset-tests, collate-tests, packaging-tests, translit-tests, testall, localespi-tests" description="Build ICU4J test classes"/>
154
155    <target name="secure" depends="icu4jJar" description="(Deprecated)Build ICU4J API and test classes for running the ICU4J test suite with Java security manager enabled"/>
156
157    <!-- Check to see if JVM_OPTIONS enviroment variable is set. This can be use to set the heap size. -->
158    <property name="env.JVM_OPTIONS" value=""/>
159    <property name="jvm_options" value="${env.JVM_OPTIONS}"/>
160    <target name="check" description="Run the standard ICU4J test suite">
161        <antcall target="_runCheck">
162            <param name="runcheck.arg" value=""/>
163            <param name="runcheck.jvmarg" value="${jvm_options} -ea"/>
164        </antcall>
165    </target>
166
167    <target name="exhaustiveCheck" description="Run the standard ICU4J test suite in exhaustive mode">
168        <antcall target="_runCheck">
169            <param name="runcheck.arg" value="-e10"/>
170            <param name="runcheck.jvmarg" value="${jvm_options} -ea"/>
171        </antcall>
172    </target>
173
174    <target name="timeZoneCheck" description="Run the complete test for TimeZoneRoundTripAll">
175        <antcall target="_runCheck">
176            <param name="runcheck.arg" value="-prop:TimeZoneRoundTripAll=true Core/Format/DateFormat/TimeZoneFormatTest -v"/>
177            <param name="runcheck.jvmarg" value="${jvm_options}"/>
178        </antcall>
179    </target>
180
181    <target name="jdktzCheck" description="Run the standard ICU4J test suite with JDK TimeZone">
182        <antcall target="_runCheck">
183            <param name="runcheck.arg" value=""/>
184            <param name="runcheck.jvmarg" value="${jvm_options} -Dcom.ibm.icu.util.TimeZone.DefaultTimeZoneType=JDK"/>
185        </antcall>
186    </target>
187
188    <target name="_runCheck" depends="main, tests">
189        <echo message="JVM argument:   ${runcheck.jvmarg} -Djava.awt.headless=true"/>
190        <echo message="Test argument:   ${runcheck.arg}"/>
191
192        <java classname="com.ibm.icu.dev.test.TestAll" fork="yes" failonerror="true">
193            <arg line="${runcheck.arg}"/>
194            <jvmarg line="${runcheck.jvmarg} -Djava.awt.headless=true"/>
195            <classpath>
196                <pathelement location="${icu4j.core.jar}"/>
197                <pathelement location="${icu4j.collate.jar}"/>
198                <pathelement location="${icu4j.charset.jar}"/>
199                <pathelement location="${icu4j.currdata.jar}"/>
200                <pathelement location="${icu4j.langdata.jar}"/>
201                <pathelement location="${icu4j.regiondata.jar}"/>
202                <pathelement location="${icu4j.translit.jar}"/>
203                <pathelement location="${icu4j.test-framework.jar}"/>
204                <pathelement location="${icu4j.core-tests.jar}"/>
205                <pathelement location="${icu4j.collate-tests.jar}"/>
206                <pathelement location="${icu4j.charset-tests.jar}"/>
207                <pathelement location="${icu4j.translit-tests.jar}"/>
208                <pathelement location="${icu4j.testall.jar}"/>
209            </classpath>
210        </java>
211    </target>
212
213    <target name="_runTestArgCheck" unless="testarg">
214        <echo message="No test arguments are supplied."/>
215        <echo message="For specifying test arguments, use '-Dtestarg=[test args]' as"/>
216        <echo message="ant command line argument. For example:"/>
217        <echo message="  &#x3E;ant runTest -Dtestarg=&#x22;Core/Format -e10&#x22;"/>
218        <echo message="for running ICU4J core format test suite in exhaustive mode."/>
219    </target>
220
221    <target name="runTest" depends="_runTestArgCheck" description="Run a ICU4J test case, without calling any other build targets">
222        <echo message="JVM argument:   ${jvm_options} -Djava.awt.headless=true"/>
223        <echo message="Test argument:   ${testarg}"/>
224
225        <java classname="com.ibm.icu.dev.test.TestAll" fork="yes" failonerror="true">
226            <arg line="${testarg}"/>
227            <jvmarg line="${jvm_options} -Djava.awt.headless=true"/>
228            <classpath>
229                <pathelement location="${icu4j.core.jar}"/>
230                <pathelement location="${icu4j.collate.jar}"/>
231                <pathelement location="${icu4j.charset.jar}"/>
232                <pathelement location="${icu4j.currdata.jar}"/>
233                <pathelement location="${icu4j.langdata.jar}"/>
234                <pathelement location="${icu4j.regiondata.jar}"/>
235                <pathelement location="${icu4j.translit.jar}"/>
236                <pathelement location="${icu4j.test-framework.jar}"/>
237                <pathelement location="${icu4j.core-tests.jar}"/>
238                <pathelement location="${icu4j.collate-tests.jar}"/>
239                <pathelement location="${icu4j.charset-tests.jar}"/>
240                <pathelement location="${icu4j.translit-tests.jar}"/>
241                <pathelement location="${icu4j.testall.jar}"/>
242            </classpath>
243        </java>
244    </target>
245
246    <target name="packagingCheck" depends="info, core, packaging-tests" description="Run packaging tests">
247        <!-- region data but no language data -->
248        <java classname="com.ibm.icu.dev.test.TestPackaging" fork="yes" failonerror="true">
249            <arg line="-w"/>
250            <classpath>
251                <pathelement location="${icu4j.core.jar}"/>
252                <pathelement location="${icu4j.charset.jar}"/>
253                <pathelement location="${icu4j.test-framework.jar}"/>
254                <pathelement location="${icu4j.packaging-tests.jar}"/>
255                <pathelement location="${icu4j.regiondata.jar}"/>
256            </classpath>
257        </java>
258        <!-- language data but no region data -->
259        <java classname="com.ibm.icu.dev.test.TestPackaging" fork="yes" failonerror="true">
260            <arg line="-w"/>
261            <classpath>
262                <pathelement location="${icu4j.core.jar}"/>
263                <pathelement location="${icu4j.charset.jar}"/>
264                <pathelement location="${icu4j.test-framework.jar}"/>
265                <pathelement location="${icu4j.packaging-tests.jar}"/>
266                <pathelement location="${icu4j.langdata.jar}"/>
267            </classpath>
268        </java>
269        <!-- neither region nor language data -->
270        <java classname="com.ibm.icu.dev.test.TestPackaging" fork="yes" failonerror="true">
271            <arg line="-w"/>
272            <classpath>
273                <pathelement location="${icu4j.core.jar}"/>
274                <pathelement location="${icu4j.charset.jar}"/>
275                <pathelement location="${icu4j.test-framework.jar}"/>
276                <pathelement location="${icu4j.packaging-tests.jar}"/>
277            </classpath>
278        </java>
279    </target>
280
281    <target name="coreCheck" depends="info, core, currdata, langdata, regiondata, core-tests" description="Run only the core tests">
282        <java classname="com.ibm.icu.dev.test.TestAllCore" fork="yes" failonerror="true">
283            <classpath>
284                <pathelement location="${icu4j.core.jar}"/>
285                <pathelement location="${icu4j.currdata.jar}"/>
286                <pathelement location="${icu4j.langdata.jar}"/>
287                <pathelement location="${icu4j.regiondata.jar}"/>
288                <pathelement location="${icu4j.test-framework.jar}"/>
289                <pathelement location="${icu4j.core-tests.jar}"/>
290            </classpath>
291        </java>
292    </target>
293
294    <target name="collateCheck" depends="info, core, collate, currdata, langdata, regiondata, core-tests, collate-tests" description="Run only the collation tests">
295        <java classname="com.ibm.icu.dev.test.TestAllCollate" fork="yes" failonerror="true">
296            <classpath>
297                <pathelement location="${icu4j.core.jar}"/>
298                <pathelement location="${icu4j.collate.jar}"/>
299                <pathelement location="${icu4j.test-framework.jar}"/>
300                <pathelement location="${icu4j.collate-tests.jar}"/>
301
302                <!-- for now, collateCheck needs currdata, langdata and regiondata, because of GlobalizationPreferencesTest" -->
303                <pathelement location="${icu4j.currdata.jar}"/>
304                <pathelement location="${icu4j.langdata.jar}"/>
305                <pathelement location="${icu4j.regiondata.jar}"/>
306                <pathelement location="${icu4j.core-tests.jar}"/>
307            </classpath>
308        </java>
309    </target>
310
311    <target name="translitCheck" depends="info, core, translit, translit-tests" description="Run the ICU4J Translit test suite">
312        <java classname="com.ibm.icu.dev.test.TestAllTranslit" fork="yes" failonerror="true">
313            <classpath>
314                <pathelement location="${icu4j.core.jar}"/>
315                <pathelement location="${icu4j.translit.jar}"/>
316                <pathelement location="${icu4j.test-framework.jar}"/>
317                <pathelement location="${icu4j.translit-tests.jar}"/>
318            </classpath>
319        </java>
320    </target>
321
322    <target name="localespiCheck" if="is.java6.plus" depends="info" description="Run the ICU4J Locale SPI test suite">
323        <antcall target="_runLocalespiCheck"/>
324    </target>
325
326    <target name="_runLocalespiCheck" depends="localespi, localespi-tests">
327        <java classname="com.ibm.icu.dev.test.localespi.TestAll" fork="yes" failonerror="true">
328            <jvmarg line="-Djava.ext.dirs=${icu4j.core.dir}/${jar.dir}${path.separator}${icu4j.localespi.dir}/${jar.dir}${path.separator}${icu4j.collate.dir}/${jar.dir}${path.separator}${icu4j.currdata.dir}/${jar.dir}${path.separator}${icu4j.langdata.dir}/${jar.dir}${path.separator}${icu4j.regiondata.dir}/${jar.dir}${path.separator}${java.ext.dirs}"/>
329            <classpath>
330                <pathelement location="${icu4j.localespi-tests.jar}"/>
331                <pathelement location="${icu4j.test-framework.jar}"/>
332            </classpath>
333        </java>
334    </target>
335
336    <target name="secureCheck" depends="main, jar, icu4jtestsJar" description="Run the secure (applet-like) ICU4J test suite">
337        <property name="securecheck.arg" value="-w"/>
338        <property name="securecheck.jvmarg"
339                value="${jvm_options} -Djava.security.manager -Djava.security.policy=${shared.dir}/data/security.policy -Djava.awt.headless=true"/>
340
341        <echo message="JVM argument:   ${securecheck.jvmarg}"/>
342        <echo message="Test argument:  ${securecheck.arg}"/>
343
344        <java classname="com.ibm.icu.dev.test.TestAll" fork="yes" failonerror="true">
345            <arg line="${securecheck.arg}"/>
346            <jvmarg line="${securecheck.jvmarg}"/>
347            <classpath>
348                <pathelement location="${icu4j.jar.file}"/>
349                <pathelement location="${icu4j-charset.jar.file}"/>
350                <pathelement location="${icu4jtests.jar.file}"/>
351            </classpath>
352        </java>
353    </target>
354
355    <!-- jar targets -->
356    <target name="jar" depends="icu4jJar, charset, localespi" description="Build ICU4J runtime library jar files">
357        <copy file="${icu4j.charset.jar}" tofile="${icu4j-charset.jar.file}"/>
358        <copy file="${icu4j.localespi.jar}" tofile="${icu4j-localespi.jar.file}" failonerror="false"/>
359    </target>
360
361    <target name="icu4jJar" depends="info, core, collate, currdata, langdata, regiondata, translit" description="Build ICU4J all-in-one core jar">
362        <mkdir dir="${out.dir}"/>
363
364        <!-- manifest -->
365        <copy file="manifest.stub" todir="${out.dir}">
366            <filterset>
367                <filter token="SPECVERSION" value="${jar.spec.version}"/>
368                <filter token="IMPLVERSION" value="${jar.impl.version}"/>
369                <filter token="COPYRIGHT" value="${jar.copyright.info}"/>
370                <filter token="EXECENV" value="${jar.exec.env}"/>
371            </filterset>
372        </copy>
373
374        <!-- jar -->
375        <jar jarfile="${icu4j.jar.file}"
376                compress="true"
377                manifest="${out.dir}/manifest.stub">
378            <fileset dir="${icu4j.core.dir}/${bin.dir}" includes="**/*"/>
379            <fileset dir="${icu4j.collate.dir}/${bin.dir}" includes="**/*"/>
380            <fileset dir="${icu4j.currdata.dir}/${bin.dir}" includes="**/*"/>
381            <fileset dir="${icu4j.langdata.dir}/${bin.dir}" includes="**/*"/>
382            <fileset dir="${icu4j.regiondata.dir}/${bin.dir}" includes="**/*"/>
383            <fileset dir="${icu4j.translit.dir}/${bin.dir}" includes="**/*"/>
384            <fileset dir="${shared.dir}/licenses">
385                <include name="license.html"/>
386            </fileset>
387        </jar>
388    </target>
389
390    <target name="icu4jSrcJar" description="Build icu4j-src.jar">
391        <jar jarfile="${icu4j-src.jar.file}"
392                compress="true">
393            <fileset dir="${icu4j.core.dir}/${src.dir}" includes="**/*.java"/>
394            <fileset dir="${icu4j.collate.dir}/${src.dir}" includes="**/*.java"/>
395            <fileset dir="${icu4j.currdata.dir}/${src.dir}" includes="**/*.java"/>
396            <fileset dir="${icu4j.langdata.dir}/${src.dir}" includes="**/*.java"/>
397            <fileset dir="${icu4j.regiondata.dir}/${src.dir}" includes="**/*.java"/>
398            <fileset dir="${icu4j.translit.dir}/${src.dir}" includes="**/*.java"/>
399            <fileset dir="${shared.dir}/licenses">
400                <include name="license.html"/>
401            </fileset>
402        </jar>
403    </target>
404
405    <target name="icu4jtestsJar" depends="info, tests" description="Build ICU4J all-in-one test jar">
406        <jar jarfile="${icu4jtests.jar.file}"
407                compress="true">
408            <fileset dir="${icu4j.test-framework.dir}/${bin.dir}" includes="**/*"/>
409            <fileset dir="${icu4j.core-tests.dir}/${bin.dir}" includes="**/*"/>
410            <fileset dir="${icu4j.collate-tests.dir}/${bin.dir}" includes="**/*"/>
411            <fileset dir="${icu4j.translit-tests.dir}/${bin.dir}" includes="**/*"/>
412            <fileset dir="${icu4j.charset-tests.dir}/${bin.dir}" includes="**/*"/>
413            <fileset dir="${icu4j.testall.dir}/${bin.dir}" includes="**/*"/>
414        </jar>
415    </target>
416
417    <target name="jarDemos" depends="icu4jJar, demos" description="Build ICU4J demo jar file">
418        <copy file="${icu4j.demos.jar}" tofile="${icu4jdemos.jar.file}"/>
419    </target>
420
421
422    <!-- release targets -->
423    <target name="_check_config_for_release">
424        <condition property="release.build.config.ok">
425            <and>
426                <isset property="java5.bootclasspath"/>
427                <isset property="java6.bootclasspath"/>
428                <isset property="jcite.libs"/>
429            </and>
430        </condition>
431    </target>
432
433    <target name="_verify_config_for_release" depends="_check_config_for_release" unless="release.build.config.ok">
434        <condition property="disp.java5.bootclasspath" value="${java5.bootclasspath}" else="Not Defined!">
435            <isset property="java5.bootclasspath"/>
436        </condition>
437        <condition property="disp.java6.bootclasspath" value="${java5.bootclasspath}" else="Not Defined!">
438            <isset property="java6.bootclasspath"/>
439        </condition>
440        <condition property="disp.jcite.libs" value="${jcite.libs}" else="Not Defined!">
441            <isset property="jcite.libs"/>
442        </condition>
443
444        <echo message="################################################################"/>
445        <echo message="[WARNING] Insufficient Build Configuration for ICU4J Release"/>
446        <echo message="JRE 5 System Library Path:      ${disp.java5.bootclasspath}"/>
447        <echo message="JRE 6 System Library Path:      ${disp.java6.bootclasspath}"/>
448        <echo message="JCite Library Path:             ${disp.jcite.libs}"/>
449        <echo message="################################################################"/>
450    </target>
451
452    <target name="releaseVer" depends="info, releaseBinaries, releaseSrcJars, releaseDocs, releaseSourceArchiveTgz"
453            description="Build all ICU4J release files for distribution with versioned file names">
454        <!-- binaries -->
455        <move file="${release.dir}/${icu4j.jar.file}" tofile="${release.dir}/${icu4j.jar.versioned.file}"/>
456        <move file="${release.dir}/${icu4j-charset.jar.file}" tofile="${release.dir}/${icu4j-charset.jar.versioned.file}"/>
457        <move file="${release.dir}/${icu4j-localespi.jar.file}" tofile="${release.dir}/${icu4j-localespi.jar.versioned.file}"/>
458
459        <!-- source jars -->
460        <move file="${release.dir}/${icu4j-src.jar.file}" tofile="${release.dir}/${icu4j-src.jar.versioned.file}"/>
461        <move file="${release.dir}/${icu4j-charset-src.jar.file}" tofile="${release.dir}/${icu4j-charset-src.jar.versioned.file}"/>
462        <move file="${release.dir}/${icu4j-localespi-src.jar.file}" tofile="${release.dir}/${icu4j-localespi-src.jar.versioned.file}"/>
463
464        <!-- docs -->
465        <move file="${release.dir}/${icu4jdocs.jar.file}" tofile="${release.dir}/${icu4jdocs.jar.versioned.file}"/>
466
467        <!-- package archive -->
468        <move file="${release.dir}/${icu4jsrc.tgz.file}" tofile="${release.dir}/${icu4jsrc.tgz.versioned.file}"/>
469
470        <!-- md5 checksum file -->
471        <mkdir dir="${out.dir}/checksum"/>
472        <delete dir="${out.dir}/checksum" includes="**/*"/>
473
474        <checksum todir="${out.dir}/checksum" format="MD5SUM">
475            <fileset dir="${release.dir}">
476                <include name="*.jar"/>
477                <include name="*.tgz"/>
478            </fileset>
479        </checksum>
480
481        <concat destfile="${release.dir}/icu4j-${release.file.ver}.md5">
482            <fileset dir="${out.dir}/checksum" includes="*"/>
483            <filterchain>
484                <fixcrlf eol="lf"/>
485            </filterchain>
486        </concat>
487
488        <antcall target="_verify_config_for_release"/>
489    </target>
490
491    <target name="release" depends="info, releaseBinaries, releaseSrcJars, releaseDocs, releaseSourceArchiveTgz" description="Build all ICU4J release files for distribution">
492        <mkdir dir="${out.dir}/checksum"/>
493        <delete dir="${out.dir}/checksum" includes="**/*"/>
494
495        <checksum todir="${out.dir}/checksum" format="MD5SUM">
496            <fileset dir="${release.dir}">
497                <include name="*.jar"/>
498                <include name="*.tgz"/>
499            </fileset>
500        </checksum>
501
502        <concat destfile="${release.dir}/icu4j.md5">
503            <fileset dir="${out.dir}/checksum" includes="*"/>
504            <filterchain>
505                <fixcrlf eol="lf"/>
506            </filterchain>
507        </concat>
508
509        <antcall target="_verify_config_for_release"/>
510    </target>
511
512    <target name="releaseBinaries" depends="icu4jJar, charset, localespi" description="Build ICU4J binary files for distribution">
513        <mkdir dir="${release.dir}"/>
514        <copy file="${icu4j.jar.file}" tofile="${release.dir}/${icu4j.jar.file}"/>
515        <copy file="${icu4j.charset.jar}" tofile="${release.dir}/${icu4j-charset.jar.file}"/>
516        <copy file="${icu4j.localespi.jar}" tofile="${release.dir}/${icu4j-localespi.jar.file}"/>
517    </target>
518
519    <target name="releaseSrcJars" depends="icu4jSrcJar" description="Build ICU4J src jar files for distribution">
520        <mkdir dir="${release.dir}"/>
521
522        <!-- icu4j src-jar -->
523        <copy file="${icu4j-src.jar.file}" tofile="${release.dir}/${icu4j-src.jar.file}"/>
524
525        <!-- charset/localespi src-jar -->
526        <ant dir="${icu4j.charset.dir}" target="src-jar" inheritAll="false"/>
527        <ant dir="${icu4j.localespi.dir}" target="src-jar" inheritAll="false"/>
528
529        <copy file="${icu4j.charset.dir}/${out.dir}/lib/${icu4j-charset-src.jar.file}" tofile="${release.dir}/${icu4j-charset-src.jar.file}"/>
530        <copy file="${icu4j.localespi.dir}/${out.dir}/lib/${icu4j-localespi-src.jar.file}" tofile="${release.dir}/${icu4j-localespi-src.jar.file}"/>
531    </target>
532
533
534    <target name="releaseDocs" depends="docs" description="Build ICU4J API reference doc jar file for distribution">
535        <mkdir dir="${release.dir}"/>
536        <jar jarfile="${release.dir}/${icu4jdocs.jar.file}" compress="true" basedir="${doc.dir}"/>
537    </target>
538
539    <property name="src.release.wrk.dir" value="${out.dir}/tmpsrc"/>
540
541    <target name="releaseSourceArchiveZip" description="Build ICU4J source release archive (.zip)">
542        <delete dir="${src.release.wrk.dir}"/>
543        <delete file="${icu4jsrc.zip.file}"/>
544
545        <mkdir dir="${src.release.wrk.dir}"/>
546
547        <fixcrlf srcdir="."
548                destdir="${src.release.wrk.dir}"
549                encoding="UTF-8"
550                eol="crlf">
551            <include name="demos/**/*"/>
552            <include name="main/**/*"/>
553            <include name="perf-tests/**/*"/>
554            <include name="samples/**/*"/>
555            <include name="tools/**/*"/>
556            <include name="*.html"/>
557            <include name="*.xml"/>
558            <include name="*.properties"/>
559            <include name="*.css"/>
560            <include name="*.stub"/>
561            <exclude name="**/out/**/*"/>
562            <exclude name="**/*.jar"/>
563            <exclude name="**/build-local.properties"/>
564            <exclude name="main/tests/core/src/com/ibm/icu/dev/data/rbbi/english.dict"/>
565            <exclude name="main/tests/core/src/com/ibm/icu/dev/test/serializable/data/**/*.dat"/>
566            <exclude name="main/tests/core/src/com/ibm/icu/dev/test/util/Trie2Test.*.tri2"/>
567            <exclude name="tools/build/icu4j*.api*.gz"/>
568        </fixcrlf>
569
570        <mkdir dir="${release.dir}"/>
571        <zip destfile="${release.dir}/${icu4jsrc.zip.file}">
572            <fileset dir="${src.release.wrk.dir}" includes="**/*"/>
573            <fileset dir="${basedir}">
574                <include name="main/shared/data/*.jar"/>
575                <include name="main/tests/core/src/com/ibm/icu/dev/data/rbbi/english.dict"/>
576                <include name="main/tests/core/src/com/ibm/icu/dev/test/serializable/data/**/*.dat"/>
577                <include name="main/tests/core/src/com/ibm/icu/dev/test/util/Trie2Test.*.tri2"/>
578                <include name="tools/build/icu4j*.api*.gz"/>
579            </fileset>
580        </zip>
581
582        <delete dir="${src.release.wrk.dir}"/>
583    </target>
584
585    <target name="releaseSourceArchiveTgz" description="Build ICU4J source release archive (.tgz)">
586        <delete dir="${src.release.wrk.dir}"/>
587        <delete file="${icu4jsrc.tgz.file}"/>
588
589        <mkdir dir="${src.release.wrk.dir}"/>
590
591        <fixcrlf srcdir="."
592                destdir="${src.release.wrk.dir}"
593                encoding="UTF-8"
594                eol="lf">
595            <include name="demos/**/*"/>
596            <include name="main/**/*"/>
597            <include name="perf-tests/**/*"/>
598            <include name="samples/**/*"/>
599            <include name="tools/**/*"/>
600            <include name="*.html"/>
601            <include name="*.xml"/>
602            <include name="*.properties"/>
603            <include name="*.css"/>
604            <include name="*.stub"/>
605            <exclude name="**/out/**/*"/>
606            <exclude name="**/*.jar"/>
607            <exclude name="**/build-local.properties"/>
608            <exclude name="main/tests/core/src/com/ibm/icu/dev/data/rbbi/english.dict"/>
609            <exclude name="main/tests/core/src/com/ibm/icu/dev/test/serializable/data/**/*.dat"/>
610            <exclude name="main/tests/core/src/com/ibm/icu/dev/test/util/Trie2Test.*.tri2"/>
611            <exclude name="tools/build/icu4j*.api*.gz"/>
612        </fixcrlf>
613
614        <property name="icu4jsrc.tar" value="${out.dir}/icu4jsrc.tar"/>
615
616        <tar destfile="${icu4jsrc.tar}" longfile="gnu">
617            <fileset dir="${src.release.wrk.dir}" includes="**/*"/>
618            <fileset dir="${basedir}">
619                <include name="main/shared/data/*.jar"/>
620                <include name="main/tests/core/src/com/ibm/icu/dev/data/rbbi/english.dict"/>
621                <include name="main/tests/core/src/com/ibm/icu/dev/test/serializable/data/**/*.dat"/>
622                <include name="main/tests/core/src/com/ibm/icu/dev/test/util/Trie2Test.*.tri2"/>
623                <include name="tools/build/icu4j*.api*.gz"/>
624            </fileset>
625        </tar>
626
627        <mkdir dir="${release.dir}"/>
628        <gzip destfile="${release.dir}/${icu4jsrc.tgz.file}" src="${icu4jsrc.tar}"/>
629
630        <delete dir="${src.release.wrk.dir}"/>
631        <delete file="${icu4jsrc.tar}"/>
632    </target>
633
634    <!-- findbugs targets -->
635
636    <target name="findbugs" description="Run FindBugs on all library sub projects.">
637        <property name="findbugs.out.dir" value="${out.dir}/findbugs"/>
638        <mkdir dir="${findbugs.out.dir}"/>
639
640        <ant dir="${icu4j.core.dir}" inheritAll="false" target="findbugs"/>
641        <copy file="${icu4j.core.dir}/${out.dir}/fb-core.html" todir="${findbugs.out.dir}"/>
642
643        <ant dir="${icu4j.collate.dir}" inheritAll="false" target="findbugs"/>
644        <copy file="${icu4j.collate.dir}/${out.dir}/fb-collate.html" todir="${findbugs.out.dir}"/>
645
646        <ant dir="${icu4j.currdata.dir}" inheritAll="false" target="findbugs"/>
647        <copy file="${icu4j.currdata.dir}/${out.dir}/fb-currdata.html" todir="${findbugs.out.dir}"/>
648
649        <ant dir="${icu4j.langdata.dir}" inheritAll="false" target="findbugs"/>
650        <copy file="${icu4j.langdata.dir}/${out.dir}/fb-langdata.html" todir="${findbugs.out.dir}"/>
651
652        <ant dir="${icu4j.regiondata.dir}" inheritAll="false" target="findbugs"/>
653        <copy file="${icu4j.regiondata.dir}/${out.dir}/fb-regiondata.html" todir="${findbugs.out.dir}"/>
654
655        <ant dir="${icu4j.translit.dir}" inheritAll="false" target="findbugs"/>
656        <copy file="${icu4j.translit.dir}/${out.dir}/fb-translit.html" todir="${findbugs.out.dir}"/>
657
658
659        <ant dir="${icu4j.charset.dir}" inheritAll="false" target="findbugs"/>
660        <copy file="${icu4j.charset.dir}/${out.dir}/fb-charset.html" todir="${findbugs.out.dir}"/>
661
662        <ant dir="${icu4j.localespi.dir}" inheritAll="false" target="findbugs"/>
663        <copy file="${icu4j.localespi.dir}/${out.dir}/fb-localespi.html" todir="${findbugs.out.dir}"/>
664    </target>
665
666    <!-- compile targets -->
667    <target name="core" description="Build core classes">
668        <ant dir="${icu4j.core.dir}" inheritAll="false"/>
669    </target>
670
671    <target name="collate" depends="core" description="Build collation classes">
672        <ant dir="${icu4j.collate.dir}" inheritAll="false"/>
673    </target>
674
675    <target name="charset" depends="core" description="Build charset classes">
676        <ant dir="${icu4j.charset.dir}" inheritAll="false"/>
677    </target>
678
679    <target name="currdata" depends="core" description="Build currency data classes">
680        <ant dir="${icu4j.currdata.dir}" inheritAll="false"/>
681    </target>
682
683    <target name="langdata" depends="core" description="Build language data classes">
684        <ant dir="${icu4j.langdata.dir}" inheritAll="false"/>
685    </target>
686
687    <target name="localespi" if="is.java6.plus" description="Build Locale SPI classes">
688        <antcall target="_build-localespi"/>
689    </target>
690
691    <target name="_build-localespi" depends="core, collate, currdata, langdata, regiondata">
692        <ant dir="${icu4j.localespi.dir}" inheritAll="false"/>
693    </target>
694
695    <target name="regiondata" depends="core" description="Build region data classes">
696        <ant dir="${icu4j.regiondata.dir}" inheritAll="false"/>
697    </target>
698
699    <target name="translit" depends="core" description="Build translit classes">
700        <ant dir="${icu4j.translit.dir}" inheritAll="false"/>
701    </target>
702
703    <target name="test-framework" depends="core" description="Build test framework classes">
704        <ant dir="${icu4j.test-framework.dir}" inheritAll="false"/>
705    </target>
706
707    <target name="core-tests" depends="core, test-framework" description="Build core tests">
708        <ant dir="${icu4j.core-tests.dir}" inheritAll="false"/>
709    </target>
710
711    <target name="collate-tests" depends="collate, test-framework" description="Build core tests">
712        <ant dir="${icu4j.collate-tests.dir}" inheritAll="false"/>
713    </target>
714
715    <target name="charset-tests" depends="charset, test-framework" description="Build charset tests">
716        <ant dir="${icu4j.charset-tests.dir}" inheritAll="false"/>
717    </target>
718
719    <target name="localespi-tests" if="is.java6.plus" description="Build Locale SPI tests">
720        <antcall target="_build-localespi-tests"/>
721    </target>
722
723    <target name="_build-localespi-tests" depends="localespi, test-framework">
724        <ant dir="${icu4j.localespi-tests.dir}" inheritAll="false"/>
725    </target>
726
727    <target name="packaging-tests" depends="test-framework" description="Build packaging tests">
728        <ant dir="${icu4j.packaging-tests.dir}" inheritAll="false"/>
729    </target>
730
731    <target name="translit-tests" depends="translit, test-framework" description="Build translit tests">
732        <ant dir="${icu4j.translit-tests.dir}" inheritAll="false"/>
733    </target>
734
735    <target name="testall" depends="test-framework" description="Build top level TestAll">
736        <ant dir="${icu4j.testall.dir}" inheritAll="false"/>
737    </target>
738
739    <target name="demos" depends="core, charset, translit" description="Build demo classes">
740        <ant dir="${icu4j.demos.dir}" inheritAll="false"/>
741    </target>
742
743    <target name="samples" depends="core, charset, collate, translit" description="Build sample classes">
744        <ant dir="${icu4j.samples.dir}" inheritAll="false"/>
745    </target>
746
747    <target name="build-tools" description="Build build-tool classes">
748        <ant dir="${icu4j.build-tools.dir}" inheritAll="false"/>
749    </target>
750
751    <target name="tools" depends="core, core-tests, collate, translit, translit-tests" description="Build tool classes">
752        <ant dir="${icu4j.tools.dir}" inheritAll="false"/>
753    </target>
754
755    <target name="perf-tests" if="is.java6.plus" depends="core, charset, collate, tools" description="Build performance test classes">
756        <ant dir="${icu4j.perf-tests.dir}" inheritAll="false"/>
757    </target>
758
759    <!-- doc targets -->
760    <target name="docs" depends="info, build-tools, _checkJCite, _docsWithJCite, _docsWithoutJCite" description="Build API documents"/>
761
762    <target name="_checkJCite" if="env.JCITE_DIR">
763        <fileset dir="${env.JCITE_DIR}" id="jcite.files">
764            <include name="build/*.jar"/>
765            <include name="lib/*.jar"/>
766        </fileset>
767        <pathconvert property="jcite.libs" refid="jcite.files"/>
768
769        <dirset dir="${basedir}" id="jcite.src.dirs">
770            <include name="samples/src"/>
771            <include name="demos/src"/>
772            <include name="main/tests/*/src"/>
773        </dirset>
774        <pathconvert property="jcite.addl.src" refid="jcite.src.dirs"/>
775    </target>
776
777    <target name="_docsStyleSheet">
778        <condition property="docs.style.sheet" value="stylesheet7.css" else="stylesheet.css">
779            <isset property="is.java7.plus"/>
780        </condition>
781    </target>
782
783    <target name="_docsWithJCite" depends="_docsStyleSheet" if="jcite.libs">
784        <echo message="JCite library path:             ${jcite.libs}"/>
785        <echo message="JCite additional source path:   ${jcite.addl.src}"/>
786        <echo message="Custom stylesheet:              ${docs.style.sheet}"/>
787        <javadoc
788                destdir="${doc.dir}"
789                nodeprecatedlist="true"
790                windowtitle="${icu4j.api.doc.window.title}"
791                doctitle="${icu4j.api.doc.title}"
792                header="${icu4j.api.doc.header}"
793                encoding="${java.src.encoding}"
794                docencoding="UTF-8"
795                charset="UTF-8"
796                bottom="&lt;font size=-1&gt;Copyright (c) ${current.year} IBM Corporation and others.&lt;/font&gt;"
797                additionalparam="-breakiterator -use -tagletpath ${icu4j.build-tools.jar}${path.separator}${jcite.libs} -taglet com.ibm.icu.dev.tool.docs.ICUTaglet -taglet ch.arrenbrecht.jcite.JCiteTaglet -J-Djcitesourcepath=${jcite.addl.src} -J-Dfile.encoding=UTF-8"
798                link="${icu4j.api.doc.jdk.link}"
799                source="1.5"
800                stylesheetfile="${docs.style.sheet}">
801            <packageset dir="${icu4j.core.dir}/src">
802                <include name="com/ibm/icu/lang/**"/>
803                <include name="com/ibm/icu/math/**"/>
804                <include name="com/ibm/icu/text/**"/>
805                <include name="com/ibm/icu/util/**"/>
806            </packageset>
807            <packageset dir="${icu4j.collate.dir}/src">
808                <include name="com/ibm/icu/text/**"/>
809            </packageset>
810            <packageset dir="${icu4j.translit.dir}/src">
811                <include name="com/ibm/icu/text/**"/>
812            </packageset>
813            <packageset dir="${icu4j.charset.dir}/src">
814                <include name="com/ibm/icu/charset/**"/>
815            </packageset>
816        </javadoc>
817    </target>
818
819    <target name="_docsWithoutJCite" unless="jcite.libs">
820        <javadoc
821                destdir="${doc.dir}"
822                nodeprecatedlist="true"
823                windowtitle="${icu4j.api.doc.window.title}"
824                doctitle="${icu4j.api.doc.title}"
825                header="${icu4j.api.doc.header}"
826                encoding="${java.src.encoding}"
827                docencoding="UTF-8"
828                charset="UTF-8"
829                bottom="&lt;font size=-1&gt;Copyright (c) ${current.year} IBM Corporation and others.&lt;/font&gt;"
830                additionalparam="-breakiterator -use -tagletpath ${icu4j.build-tools.jar} -taglet com.ibm.icu.dev.tool.docs.ICUTaglet"
831                link="${icu4j.api.doc.jdk.link}"
832                source="1.5">
833            <packageset dir="${icu4j.core.dir}/src">
834                <include name="com/ibm/icu/lang/**"/>
835                <include name="com/ibm/icu/math/**"/>
836                <include name="com/ibm/icu/text/**"/>
837                <include name="com/ibm/icu/util/**"/>
838            </packageset>
839            <packageset dir="${icu4j.collate.dir}/src">
840                <include name="com/ibm/icu/text/**"/>
841            </packageset>
842            <packageset dir="${icu4j.translit.dir}/src">
843                <include name="com/ibm/icu/text/**"/>
844            </packageset>
845            <packageset dir="${icu4j.charset.dir}/src">
846                <include name="com/ibm/icu/charset/**"/>
847            </packageset>
848        </javadoc>
849    </target>
850
851    <!-- JaCoCo code coverage target -->
852    <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" onerror="ignore">
853        <classpath path="${env.JACOCO_DIR}/lib/jacocoant.jar"/>
854    </taskdef>
855
856    <target name="coverageJaCoCo" depends="jar, tests" description="Run the ICU4J unit tests and generate code coverage report">
857        <property name="jacoco.out.dir" value="${out.dir}/jacoco"/>
858        <property name="jacoco.exec.data.file" value="${jacoco.out.dir}/jacoco.exec"/>
859        <property name="jacoco.report.html.zip" value="${jacoco.out.dir}/report_html.zip"/>
860        <property name="jacoco.report.xml" value="${jacoco.out.dir}/report.xml"/>
861        <property name="jacoco.report.csv" value="${jacoco.out.dir}/report.csv"/>
862
863        <delete dir="${jacoco.out.dir}"/>
864        <mkdir dir="${jacoco.out.dir}"/>
865
866        <jacoco:coverage destfile="${jacoco.exec.data.file}">
867            <java classname="com.ibm.icu.dev.test.TestAll" fork="yes" failonerror="true">
868                <jvmarg line="${jvm_options} -ea -Djava.awt.headless=true"/>
869                <classpath>
870                    <pathelement location="${icu4j.jar.file}"/>
871                    <pathelement location="${icu4j-charset.jar.file}"/>
872                    <pathelement location="${icu4j.test-framework.jar}"/>
873                    <pathelement location="${icu4j.core-tests.jar}"/>
874                    <pathelement location="${icu4j.collate-tests.jar}"/>
875                    <pathelement location="${icu4j.charset-tests.jar}"/>
876                    <pathelement location="${icu4j.translit-tests.jar}"/>
877                    <pathelement location="${icu4j.testall.jar}"/>
878            </classpath>
879        </java>
880        </jacoco:coverage>
881
882        <jacoco:report>
883            <executiondata>
884                <file file="${jacoco.exec.data.file}"/>
885            </executiondata>
886
887            <structure name="ICU4J Project">
888                <classfiles>
889                    <fileset dir=".">
890                        <include name="${icu4j.jar.file}"/>
891                        <include name="${icu4j-charset.jar.file}"/>
892                    </fileset>
893                </classfiles>
894                <sourcefiles encoding="UTF-8">
895                    <fileset dir="${icu4j.core.dir}/src"/>
896                    <fileset dir="${icu4j.collate.dir}/src"/>
897                    <fileset dir="${icu4j.currdata.dir}/src"/>
898                    <fileset dir="${icu4j.langdata.dir}/src"/>
899                    <fileset dir="${icu4j.regiondata.dir}/src"/>
900                    <fileset dir="${icu4j.translit.dir}/src"/>
901
902                    <fileset dir="${icu4j.charset.dir}/src"/>
903                </sourcefiles>
904            </structure>
905
906            <html destfile="${jacoco.report.html.zip}"/>
907            <xml destfile="${jacoco.report.xml}"/>
908            <csv destfile="${jacoco.report.csv}"/>
909        </jacoco:report>
910    </target>
911
912    <!-- Clover code coverage target -->
913    <property name="clover.out.dir" value="${out.dir}/clover"/>
914    <property name="clover.jar" location="${env.CLOVER_DIR}/clover.jar"/>
915    <taskdef resource="cloverlib.xml" classpath="${clover.jar}" onerror="ignore"/>
916
917    <target name="codeCoverage" depends="clean" description="Generate code coverage report with clover">
918        <!-- Set up clover -->
919        <mkdir dir="${clover.out.dir}"/>
920        <clover-setup initstring="${clover.out.dir}/clover.db">
921            <files>
922                <exclude name="**/dev/**/*.java"/>
923            </files>
924            <methodContext name="API" regexp="(.* )?public .*"/>
925        </clover-setup>
926
927        <!-- Build components with clover instrumentation -->
928        <ant dir="${icu4j.core.dir}" inheritAll="false" inheritRefs="true">
929            <property name="build.compiler" value="${build.compiler}"/>
930        </ant>
931        <ant dir="${icu4j.collate.dir}" inheritAll="false" inheritRefs="true">
932            <property name="build.compiler" value="${build.compiler}"/>
933        </ant>
934        <ant dir="${icu4j.charset.dir}" inheritAll="false" inheritRefs="true">
935            <property name="build.compiler" value="${build.compiler}"/>
936        </ant>
937        <ant dir="${icu4j.currdata.dir}" inheritAll="false" inheritRefs="true">
938            <property name="build.compiler" value="${build.compiler}"/>
939        </ant>
940        <ant dir="${icu4j.langdata.dir}" inheritAll="false" inheritRefs="true">
941            <property name="build.compiler" value="${build.compiler}"/>
942        </ant>
943        <ant dir="${icu4j.regiondata.dir}" inheritAll="false" inheritRefs="true">
944            <property name="build.compiler" value="${build.compiler}"/>
945        </ant>
946        <ant dir="${icu4j.translit.dir}" inheritAll="false" inheritRefs="true">
947            <property name="build.compiler" value="${build.compiler}"/>
948        </ant>
949        <ant dir="${icu4j.test-framework.dir}" inheritAll="false" inheritRefs="true">
950            <property name="build.compiler" value="${build.compiler}"/>
951        </ant>
952        <ant dir="${icu4j.core-tests.dir}" inheritAll="false" inheritRefs="true">
953            <property name="build.compiler" value="${build.compiler}"/>
954        </ant>
955        <ant dir="${icu4j.collate-tests.dir}" inheritAll="false" inheritRefs="true">
956            <property name="build.compiler" value="${build.compiler}"/>
957        </ant>
958        <ant dir="${icu4j.charset-tests.dir}" inheritAll="false" inheritRefs="true">
959            <property name="build.compiler" value="${build.compiler}"/>
960        </ant>
961        <ant dir="${icu4j.translit-tests.dir}" inheritAll="false" inheritRefs="true">
962            <property name="build.compiler" value="${build.compiler}"/>
963        </ant>
964        <ant dir="${icu4j.testall.dir}" inheritAll="false" inheritRefs="true">
965            <property name="build.compiler" value="${build.compiler}"/>
966        </ant>
967
968        <!-- Run the test suites -->
969        <java classname="com.ibm.icu.dev.test.TestAll" fork="yes" failonerror="true">
970            <classpath>
971                <pathelement location="${icu4j.core.jar}"/>
972                <pathelement location="${icu4j.collate.jar}"/>
973                <pathelement location="${icu4j.charset.jar}"/>
974                <pathelement location="${icu4j.currdata.jar}"/>
975                <pathelement location="${icu4j.langdata.jar}"/>
976                <pathelement location="${icu4j.regiondata.jar}"/>
977                <pathelement location="${icu4j.translit.jar}"/>
978                <pathelement location="${icu4j.test-framework.jar}"/>
979                <pathelement location="${icu4j.core-tests.jar}"/>
980                <pathelement location="${icu4j.collate-tests.jar}"/>
981                <pathelement location="${icu4j.charset-tests.jar}"/>
982                <pathelement location="${icu4j.translit-tests.jar}"/>
983                <pathelement location="${icu4j.testall.jar}"/>
984                <pathelement location="${clover.jar}"/>
985            </classpath>
986        </java>
987
988        <!-- Generate HTML coverage report -->
989        <!-- <clover-html-report outdir="${clover.out.dir}/html" title="ICU4J Code Coverage"/> -->
990        <clover-report>
991            <current outfile="${clover.out.dir}/html" title="ICU4J Code Coverage">
992                <format type="html" filter="assert" />
993            </current>
994        </clover-report>
995    </target>
996
997    <!-- Release management targets -->
998    <target name="checktags" depends="info, build-tools" description="Check API tags before release">
999        <javadoc source="1.5"
1000                 encoding="${java.src.encoding}">
1001            <packageset dir="${icu4j.core.dir}/src">
1002                <include name="com/ibm/icu/lang/**"/>
1003                <include name="com/ibm/icu/math/**"/>
1004                <include name="com/ibm/icu/text/**"/>
1005                <include name="com/ibm/icu/util/**"/>
1006            </packageset>
1007            <packageset dir="${icu4j.collate.dir}/src">
1008                <include name="com/ibm/icu/**"/>
1009            </packageset>
1010            <packageset dir="${icu4j.charset.dir}/src">
1011                <include name="com/ibm/icu/charset/**"/>
1012            </packageset>
1013            <doclet name="com.ibm.icu.dev.tool.docs.CheckTags" path="${icu4j.build-tools.jar}"/>
1014        </javadoc>
1015    </target>
1016
1017    <target name="gatherapi" depends="info, build-tools" description="Run API database generator tool">
1018        <mkdir dir="${out.dir}"/>
1019        <javadoc source="1.5"
1020                 encoding="${java.src.encoding}">
1021            <packageset dir="${icu4j.core.dir}/src">
1022                <include name="com/ibm/icu/lang/**"/>
1023                <include name="com/ibm/icu/math/**"/>
1024                <include name="com/ibm/icu/text/**"/>
1025                <include name="com/ibm/icu/util/**"/>
1026            </packageset>
1027            <packageset dir="${icu4j.collate.dir}/src">
1028                <include name="com/ibm/icu/text/**"/>
1029                <include name="com/ibm/icu/util/**"/>
1030            </packageset>
1031            <packageset dir="${icu4j.charset.dir}/src">
1032                <include name="com/ibm/icu/charset/**"/>
1033            </packageset>
1034            <packageset dir="${icu4j.translit.dir}/src">
1035                <include name="com/ibm/icu/text/**"/>
1036            </packageset>
1037            <doclet name="com.ibm.icu.dev.tool.docs.GatherAPIData" path="${icu4j.build-tools.jar}">
1038                <param name="-name" value="ICU4J ${icu4j.impl.version}"/>
1039                <param name="-output" value="${out.dir}/icu4j${api.report.version}.api3"/>
1040                <param name="-internal"/>
1041                <param name="-version"/>
1042                <param name="-gzip"/>
1043            </doclet>
1044        </javadoc>
1045    </target>
1046
1047    <target name="apireport" depends="info, gatherapi" description="Run API report generator tool">
1048        <java classname="com.ibm.icu.dev.tool.docs.ReportAPI"
1049                classpath="${icu4j.build-tools.jar}"
1050                failonerror="true">
1051            <arg value="-old:" />
1052            <arg value="${icu4j.build-tools.dir}/icu4j${api.report.prev.version}.api3.gz" />
1053            <arg value="-new:" />
1054            <arg value="${out.dir}/icu4j${api.report.version}.api3.gz" />
1055            <arg value="-html" />
1056            <arg value="-out:" />
1057            <arg value="${out.dir}/icu4j_compare_${api.report.prev.version}_${api.report.version}.html" />
1058        </java>
1059    </target>
1060
1061    <target name="gatherapiOld" depends="info, build-tools" description="Run API database generator tool (Pre Java 5 style)">
1062        <mkdir dir="${out.dir}"/>
1063        <javadoc source="1.5"
1064                 encoding="${java.src.encoding}">
1065            <packageset dir="${icu4j.core.dir}/src">
1066                <include name="com/ibm/icu/lang/**"/>
1067                <include name="com/ibm/icu/math/**"/>
1068                <include name="com/ibm/icu/text/**"/>
1069                <include name="com/ibm/icu/util/**"/>
1070            </packageset>
1071            <packageset dir="${icu4j.collate.dir}/src">
1072                <include name="com/ibm/icu/text/**"/>
1073                <include name="com/ibm/icu/util/**"/>
1074            </packageset>
1075            <packageset dir="${icu4j.charset.dir}/src">
1076                <include name="com/ibm/icu/charset/**"/>
1077            </packageset>
1078            <packageset dir="${icu4j.translit.dir}/src">
1079                <include name="com/ibm/icu/text/**"/>
1080            </packageset>
1081            <doclet name="com.ibm.icu.dev.tool.docs.GatherAPIDataOld" path="${icu4j.build-tools.jar}">
1082                <param name="-name" value="ICU4J ${icu4j.impl.version}"/>
1083                <param name="-output" value="${out.dir}/icu4j${api.report.version}.api"/>
1084                <param name="-internal"/>
1085                <param name="-gzip"/>
1086            </doclet>
1087        </javadoc>
1088    </target>
1089
1090    <target name="apireportOld" depends="info, gatherapiOld" description="Run API report generator tool (Pre Java 5 Style)">
1091        <java classname="com.ibm.icu.dev.tool.docs.ReportAPI"
1092                classpath="${icu4j.build-tools.jar}"
1093                failonerror="true">
1094            <arg value="-old:" />
1095            <arg value="${icu4j.build-tools.dir}/icu4j${api.report.prev.version}.api.gz" />
1096            <arg value="-new:" />
1097            <arg value="${out.dir}/icu4j${api.report.version}.api.gz" />
1098            <arg value="-html" />
1099            <arg value="-internal" />
1100            <arg value="-out:" />
1101            <arg value="${out.dir}/icu4j_compare_${api.report.prev.version}_${api.report.version}.html" />
1102        </java>
1103    </target>
1104
1105    <target name="checkDeprecated" depends="info, build-tools, gatherapi, main"
1106        description="Check consistency between javadoc @deprecated and @Deprecated annotation">
1107        <java classname="com.ibm.icu.dev.tool.docs.DeprecatedAPIChecker"
1108                failonerror="true">
1109            <arg value="${out.dir}/icu4j${api.report.version}.api3.gz" />
1110            <classpath>
1111                <pathelement location="${icu4j.build-tools.jar}"/>
1112                <pathelement location="${icu4j.core.jar}"/>
1113                <pathelement location="${icu4j.collate.jar}"/>
1114                <pathelement location="${icu4j.charset.jar}"/>
1115                <pathelement location="${icu4j.currdata.jar}"/>
1116                <pathelement location="${icu4j.langdata.jar}"/>
1117                <pathelement location="${icu4j.regiondata.jar}"/>
1118                <pathelement location="${icu4j.translit.jar}"/>
1119            </classpath>
1120        </java>
1121    </target>
1122
1123    <target name="draftAPIs" depends="info, gatherapi" description="Run API collector tool and generate draft API report">
1124        <java classname="com.ibm.icu.dev.tool.docs.CollectAPI"
1125                classpath="${icu4j.build-tools.jar}"
1126                failonerror="true">
1127            <arg value="-f"/>
1128            <arg value="Draft"/>
1129            <arg value="-o"/>
1130            <arg value="${out.dir}/draftAPIs.html"/>
1131            <arg value="${out.dir}/icu4j${api.report.version}.api3.gz" />
1132        </java>
1133    </target>
1134
1135    <target name="swatDeprecated" depends="build-tools" description="Convert @deprecated @draft tags to @provisional">
1136        <antcall target="_runSwatDeprecated">
1137            <param name="swat.deprecated.opt" value="-dep"/>
1138        </antcall>
1139    </target>
1140
1141    <target name="swatProvisional" depends="build-tools" description="Convert @provisional tags to @deprecated @draft">
1142        <antcall target="_runSwatDeprecated">
1143            <param name="swat.deprecated.opt" value="-prov"/>
1144        </antcall>
1145    </target>
1146
1147    <target name="_runSwatDeprecated">
1148        <java classname="com.ibm.icu.dev.tool.docs.SwatDeprecated"
1149                classpath="${icu4j.build-tools.jar}"
1150                failonerror="true">
1151            <arg value="${swat.deprecated.opt}"/>
1152            <arg value="-src"/>
1153            <arg value="${icu4j.core.dir}/src"/>
1154            <arg value="-dst"/>
1155            <arg value="${icu4j.core.dir}/src"/>
1156            <arg value="-overwrite"/>
1157            <arg value="-verbose"/>
1158        </java>
1159        <java classname="com.ibm.icu.dev.tool.docs.SwatDeprecated"
1160                classpath="${icu4j.build-tools.jar}"
1161                failonerror="true">
1162            <arg value="${swat.deprecated.opt}"/>
1163            <arg value="-src"/>
1164            <arg value="${icu4j.charset.dir}/src"/>
1165            <arg value="-dst"/>
1166            <arg value="${icu4j.charset.dir}/src"/>
1167            <arg value="-overwrite"/>
1168            <arg value="-verbose"/>
1169        </java>
1170    </target>
1171
1172    <target name="serialTestData" depends="main, tests">
1173        <property name="serial.test.data.dir" value="${out.dir}/serialTestData"/>
1174        <delete dir="${serial.test.data.dir}"/>
1175        <mkdir dir="${serial.test.data.dir}"/>
1176        <java classname="com.ibm.icu.dev.test.serializable.SerializableWriter" fork="yes" failonerror="true">
1177            <arg line="${serial.test.data.dir}"/>
1178            <classpath>
1179                <pathelement location="${icu4j.core.jar}"/>
1180                <pathelement location="${icu4j.collate.jar}"/>
1181                <pathelement location="${icu4j.charset.jar}"/>
1182                <pathelement location="${icu4j.currdata.jar}"/>
1183                <pathelement location="${icu4j.langdata.jar}"/>
1184                <pathelement location="${icu4j.regiondata.jar}"/>
1185                <pathelement location="${icu4j.translit.jar}"/>
1186                <pathelement location="${icu4j.test-framework.jar}"/>
1187                <pathelement location="${icu4j.core-tests.jar}"/>
1188            </classpath>
1189        </java>
1190        <echo message="Note: The serialization compatibility test data files were"/>
1191        <echo message="created in ${serial.test.data.dir}. Once you confirm"/>
1192        <echo message="the test runs clean, you should copy the data file directory to"/>
1193        <echo message="main/tests/core/src/com/ibm/icu/dev/test/serializable/data."/>
1194    </target>
1195
1196    <!-- Special packaging targets -->
1197    <target name="translitIMEJar" depends="info" description="Build transliterator IME 'icutransime.jar' jar file">
1198        <property name="translit.ime.out.dir" value="${out.dir}/translit_ime"/>
1199
1200        <mkdir dir="${translit.ime.out.dir}/bin"/>
1201        <javac destdir="${translit.ime.out.dir}/bin"
1202                source="${javac.source}"
1203                target="${javac.target}"
1204                encoding="${java.src.encoding}"
1205                debug="on" deprecation="off">
1206            <src path="${icu4j.core.dir}/src"/>
1207            <src path="${icu4j.translit.dir}/src"/>
1208            <src path="${icu4j.tools.dir}/src"/>
1209            <include name="com/ibm/icu/dev/tool/ime/translit/*.java"/>
1210        </javac>
1211
1212        <copy file="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/ime/translit/Transliterator.properties"
1213                todir="${translit.ime.out.dir}/bin/com/ibm/icu/dev/tool/ime/translit"/>
1214
1215        <mkdir dir="${translit.ime.out.dir}/lib"/>
1216        <jar jarfile="${translit.ime.out.dir}/lib/icutransime.jar"
1217                compress="true"
1218                basedir="${translit.ime.out.dir}/bin"
1219                includes="com/ibm/icu/dev/tool/ime/translit/**/*"
1220                manifest="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/ime/translit/manifest.stub">
1221            <metainf dir="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/ime/translit" includes="services/*" />
1222        </jar>
1223    </target>
1224
1225    <target name="indicIMEJar" depends="info" description="Build indic IME 'icuindicime.jar' jar file">
1226        <property name="indic.ime.out.dir" value="${out.dir}/indic_ime"/>
1227
1228        <mkdir dir="${indic.ime.out.dir}/bin"/>
1229        <javac destdir="${indic.ime.out.dir}/bin"
1230                source="${javac.source}"
1231                target="${javac.target}"
1232                encoding="${java.src.encoding}"
1233                debug="on" deprecation="off">
1234            <src path="${icu4j.core.dir}/src"/>
1235            <src path="${icu4j.tools.dir}/src"/>
1236            <include name="com/ibm/icu/dev/tool/ime/indic/*.java"/>
1237        </javac>
1238
1239        <copy file="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/ime/indic/DisplayNames.properties"
1240                todir="${indic.ime.out.dir}/bin/com/ibm/icu/dev/tool/ime/indic"/>
1241
1242        <mkdir dir="${indic.ime.out.dir}/lib"/>
1243        <jar jarfile="${indic.ime.out.dir}/lib/icuindicime.jar"
1244                compress="true"
1245                basedir="${indic.ime.out.dir}/bin"
1246                includes="com/ibm/icu/dev/tool/ime/indic/**/*"
1247                manifest="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/ime/indic/manifest.stub">
1248            <metainf dir="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/ime/indic" includes="services/*" />
1249        </jar>
1250    </target>
1251
1252    <target name="cldrUtil" depends="icu4jJar" description="Build Utilities for CLDR tooling">
1253        <mkdir dir="${cldr.util.out.dir}/bin"/>
1254        <javac destdir="${cldr.util.out.dir}/bin"
1255                source="${javac.source}"
1256                target="${javac.target}"
1257                encoding="${java.src.encoding}"
1258                debug="on" deprecation="off"
1259                classpath="${icu4j.jar.file}">
1260
1261            <src path="${icu4j.tools.dir}/src"/>
1262            <src path="${icu4j.translit-tests.dir}/src"/>
1263            <src path="${icu4j.test-framework.dir}/src"/>
1264
1265            <include name="com/ibm/icu/dev/test/TestFmwk.java" />
1266            <include name="com/ibm/icu/dev/util/*.java" />
1267            <include name="com/ibm/icu/dev/tool/UOption.java" />
1268        </javac>
1269
1270        <mkdir dir="${cldr.util.out.dir}/lib"/>
1271        <jar jarfile="${cldr.util.out.dir}/lib/utilities.jar"
1272                compress="true"
1273                basedir="${cldr.util.out.dir}/bin">
1274            <include name="com/ibm/icu/dev/test/*.class"/>
1275            <include name="com/ibm/icu/dev/util/*.class"/>
1276            <include name="com/ibm/icu/dev/tool/UOption*.class"/>
1277        </jar>
1278    </target>
1279
1280    <target name="releaseCLDR" depends="icu4jJar,icu4jSrcJar,cldrUtil" description="Build release files for CLDR tooling">
1281        <mkdir dir="${cldr.release.dir}"/>
1282        <!-- icu4j.jar -->
1283        <copy file="${icu4j.jar.file}" todir="${cldr.release.dir}"/>
1284        <!-- icu4j-src.jar -->
1285        <copy file="${icu4j-src.jar.file}" todir="${cldr.release.dir}"/>
1286        <!-- utilities.jar -->
1287        <copy file="${cldr.util.out.dir}/lib/utilities.jar" todir="${cldr.release.dir}"/>
1288        <!-- utilities-src.jar -->
1289        <jar jarfile="${cldr.release.dir}/utilities-src.jar" compress="true">
1290            <fileset dir="${icu4j.test-framework.dir}/${src.dir}">
1291                <include name="com/ibm/icu/dev/test/TestFmwk.java"/>
1292                <include name="com/ibm/icu/dev/test/*Log*.java"/>
1293                <include name="com/ibm/icu/dev/test/TestUtil.java"/>
1294                <include name="com/ibm/icu/dev/test/UTF16Util.java"/>
1295            </fileset>
1296            <fileset dir="${icu4j.test-framework.dir}/${src.dir}" includes="com/ibm/icu/dev/util/*.java"/>
1297            <fileset dir="${icu4j.translit-tests.dir}/${src.dir}" includes="com/ibm/icu/dev/util/*.java"/>
1298            <fileset dir="${icu4j.tools.dir}/${src.dir}" includes="com/ibm/icu/dev/tool/UOption.java"/>
1299       </jar>
1300    </target>
1301
1302    <target name="xliff" description="Build xliff converter tool">
1303        <property name="xliff.out.dir" value="${out.dir}/xliff"/>
1304
1305        <mkdir dir="${xliff.out.dir}/bin"/>
1306        <javac destdir="${xliff.out.dir}/bin"
1307                source="1.3"
1308                target="1.3"
1309                encoding="${java.src.encoding}"
1310                debug="on" deprecation="off">
1311            <src path="${icu4j.tools.dir}/src"/>
1312            <include name="com/ibm/icu/dev/tool/localeconverter/CalculateCRC32.java"/>
1313            <include name="com/ibm/icu/dev/tool/localeconverter/XLIFF2ICUConverter.java"/>
1314            <include name="com/ibm/icu/dev/tool/UOption.java"/>
1315       </javac>
1316
1317        <mkdir dir="${xliff.out.dir}/lib"/>
1318
1319        <jar jarfile="${xliff.out.dir}/lib/xliff-src.jar"
1320                compress="true"
1321                basedir="${icu4j.tools.dir}/src">
1322            <include name="com/ibm/icu/dev/tool/localeconverter/CalculateCRC32.java"/>
1323            <include name="com/ibm/icu/dev/tool/localeconverter/XLIFF2ICUConverter.java"/>
1324            <include name="com/ibm/icu/dev/tool/UOption.java"/>
1325        </jar>
1326
1327        <jar jarfile="${xliff.out.dir}/lib/xliff.jar"
1328                compress="true"
1329                basedir="${xliff.out.dir}/bin"
1330                manifest="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/localeconverter/manifest.stub"/>
1331    </target>
1332
1333
1334    <!-- ICU4J modularization targets -->
1335    <property name="module.dir" value="${out.dir}/module"/>
1336    <property name="module.bin.dir" value="${module.dir}/bin"/>
1337    <property name="module.tests.dir" value="${module.dir}/tests"/>
1338    <property name="module.jar.dir" value="${module.dir}/lib"/>
1339    <property name="module.jar" value="${module.jar.dir}/icu4j-module.jar"/>
1340
1341    <target name="moduleJar" description="Create a ICU4J module jar file">
1342        <mkdir dir="${module.jar.dir}"/>
1343        <jar jarfile="${module.jar}"
1344                compress="true"
1345                basedir="${module.bin.dir}">
1346            <manifest>
1347                <attribute name="Built-By" value="${corp}" />
1348                <section name="com/ibm/icu">
1349                    <attribute name="Specification-Title" value="ICU4J Modularized Build" />
1350                    <attribute name="Specification-Version" value="${jar.spec.version}" />
1351                    <attribute name="Specification-Vendor" value="ICU" />
1352                    <attribute name="Implementation-Title" value=" ICU for Java Module" />
1353                    <attribute name="Implementation-Version" value="${jar.impl.version}" />
1354                    <attribute name="Implementation-Vendor" value="${corp}" />
1355                    <attribute name="Implementation-Vendor-Id" value="com.ibm" />
1356                    <attribute name="Copyright-Info" value="${jar.copyright.info}" />
1357                    <attribute name="Sealed" value="false" />
1358                </section>
1359            </manifest>
1360        </jar>
1361        <copy file="${module.jar}" tofile="icu4j.jar"/>
1362    </target>
1363
1364    <target name="moduleCheck" description="Run tests for a ICU4J module jar">
1365        <java classname="com.ibm.icu.dev.test.TestAll" fork="yes" failonerror="true">
1366            <arg value="-nodata"/>
1367            <classpath>
1368                <pathelement location="${module.jar}"/>
1369                <pathelement location="${module.tests.dir}"/>
1370            </classpath>
1371        </java>
1372    </target>
1373
1374    <patternset id="common.test.sources">
1375        <include name="com/ibm/icu/dev/test/TestFmwk.java"/>
1376        <include name="com/ibm/icu/dev/test/TestLog.java"/>
1377        <include name="com/ibm/icu/dev/test/TestUtil.java"/>
1378        <include name="com/ibm/icu/dev/test/UTF16Util.java"/>
1379        <include name="com/ibm/icu/dev/test/TestAll.java"/>
1380        <include name="com/ibm/icu/dev/test/TestAllCore.java"/>
1381    </patternset>
1382
1383    <!-- Break Iterator -->
1384    <target name="breakIterator" depends="_copyFullPropsData" description="Modular build of break iterator services">
1385        <mkdir dir="${module.bin.dir}"/>
1386        <javac srcdir="${icu4j.core.dir}/src"
1387                destdir="${module.bin.dir}"
1388                source="${javac.source}"
1389                target="${javac.target}"
1390                encoding="${java.src.encoding}"
1391                debug="on" deprecation="off">
1392            <include name="com/ibm/icu/impl/UCharacterName.java"/>
1393            <include name="com/ibm/icu/impl/data/*Break*.java"/>
1394            <include name="com/ibm/icu/lang/**/*.java"/>
1395            <include name="com/ibm/icu/text/*BreakIterator*.java"/>
1396            <include name="com/ibm/icu/text/UnicodeSetIterator.java"/>
1397        </javac>
1398    </target>
1399
1400    <target name="breakIteratorTests" depends="breakIterator" description="Modular build of break iterator test suite">
1401        <mkdir dir="${module.tests.dir}"/>
1402        <javac destdir="${module.tests.dir}"
1403                source="${javac.source}"
1404                target="${javac.target}"
1405                encoding="${java.src.encoding}"
1406                classpath="${module.bin.dir}"
1407                debug="on" deprecation="off">
1408            <src path="${icu4j.core.dir}/src"/>
1409            <src path="${icu4j.test-framework.dir}/src"/>
1410            <src path="${icu4j.core-tests.dir}/src"/>
1411            <src path="${icu4j.testall.dir}/src"/>
1412
1413            <patternset refid="common.test.sources"/>
1414            <include name="com/ibm/icu/dev/test/rbbi/**/*.java"/>
1415        </javac>
1416
1417        <copy file="${icu4j.core-tests.dir}/src/com/ibm/icu/dev/test/rbbi/rbbitst.txt"
1418                todir="${module.tests.dir}/com/ibm/icu/dev/test/rbbi"/>
1419    </target>
1420
1421    <!-- Calendar -->
1422    <target name="calendar" description="Modular build of calendar services">
1423        <mkdir dir="${module.bin.dir}"/>
1424        <javac srcdir="${icu4j.core.dir}/src"
1425                destdir="${module.bin.dir}"
1426                source="${javac.source}"
1427                target="${javac.target}"
1428                encoding="${java.src.encoding}"
1429                debug="on" deprecation="off">
1430            <include name="com/ibm/icu/impl/data/*Holiday*.java"/>
1431            <include name="com/ibm/icu/impl/TimeZoneNames*.java"/>
1432            <include name="com/ibm/icu/lang/UCharacter.java"/>
1433            <include name="com/ibm/icu/text/UnicodeSetIterator.java"/>
1434            <include name="com/ibm/icu/text/NumberFormatServiceShim.java"/>
1435            <include name="com/ibm/icu/util/*Calendar*.java"/>
1436        </javac>
1437
1438        <!-- Calendar does not require Collation data, BreakIterator data -->
1439        <unjar src="${icu4j.data.jar}" dest="${module.bin.dir}">
1440            <patternset>
1441                <include name="**/pnames.icu" />
1442                <include name="**/ucase.icu" />
1443                <include name="**/unorm.icu" />
1444                <include name="**/uprops.icu" />
1445                <include name="**/unames.icu" />
1446                <include name="**/*.res" />
1447                <exclude name="**/coll/*.res" />
1448                <exclude name="**/translit/*.res" />
1449            </patternset>
1450        </unjar>
1451        <unjar src="${icu4j.tzdata.jar}" dest="${module.bin.dir}">
1452            <patternset>
1453                <include name="**/*.res" />
1454            </patternset>
1455        </unjar>
1456    </target>
1457
1458    <target name="calendarTests" depends="calendar" description="Modular build of calendar test suite">
1459        <mkdir dir="${module.tests.dir}"/>
1460        <javac destdir="${module.tests.dir}"
1461                source="${javac.source}"
1462                target="${javac.target}"
1463                encoding="${java.src.encoding}"
1464                classpath="${module.bin.dir}"
1465                debug="on" deprecation="off">
1466            <src path="${icu4j.core.dir}/src"/>
1467            <src path="${icu4j.test-framework.dir}/src"/>
1468            <src path="${icu4j.core-tests.dir}/src"/>
1469            <src path="${icu4j.testall.dir}/src"/>
1470
1471            <patternset refid="common.test.sources"/>
1472            <include name="com/ibm/icu/dev/test/calendar/**/*.java" />
1473        </javac>
1474
1475        <unjar src="${icu4j.testdata.jar}" dest="${module.tests.dir}">
1476            <patternset>
1477                <include name="**/calendar.res"/>
1478            </patternset>
1479        </unjar>
1480    </target>
1481
1482    <!-- Collator -->
1483    <!-- this module will soon be obsolete, use the collate jar -->
1484    <target name="collator" description="Modular build of collator services">
1485        <mkdir dir="${module.bin.dir}"/>
1486        <javac  destdir="${module.bin.dir}"
1487                source="${javac.source}"
1488                target="${javac.target}"
1489                encoding="${java.src.encoding}"
1490                debug="on" deprecation="off">
1491            <src path="${icu4j.core.dir}/src"/>
1492            <src path="${icu4j.collate.dir}/src"/>
1493
1494            <include name="com/ibm/icu/impl/coll/*.java"/>
1495            <include name="com/ibm/icu/impl/data/*Break*.java"/>
1496            <include name="com/ibm/icu/text/*BreakIterator*.java"/>
1497            <include name="com/ibm/icu/text/*Collation*.java"/>
1498            <include name="com/ibm/icu/text/*Collator*.java"/>
1499            <include name="com/ibm/icu/text/Normalizer.java"/>
1500            <include name="com/ibm/icu/text/Replaceable.java"/>
1501            <include name="com/ibm/icu/text/ReplaceableString.java"/>
1502            <include name="com/ibm/icu/text/UnicodeFilter.java"/>
1503            <include name="com/ibm/icu/text/UnicodeSetIterator.java"/>
1504            <include name="com/ibm/icu/text/UTF16.java"/>
1505        </javac>
1506
1507        <unjar src="${icu4j.data.jar}" dest="${module.bin.dir}">
1508            <patternset>
1509                <include name="**/*.icu"/>
1510                <include name="**/coll/*.res"/>
1511                <include name="**/*.brk"/>
1512                <include name="**/*.nrm"/>
1513                <include name="**/icudt${icu4j.data.version}b/res_index.res"/>
1514                <include name="**/keyTypeData.res"/>
1515            </patternset>
1516        </unjar>
1517    </target>
1518
1519    <target name="collatorTests" depends="collator" description="Modular build of collator test suite">
1520        <mkdir dir="${module.tests.dir}"/>
1521        <javac destdir="${module.tests.dir}"
1522                source="${javac.source}"
1523                target="${javac.target}"
1524                encoding="${java.src.encoding}"
1525                classpath="${module.bin.dir}"
1526                debug="on" deprecation="off">
1527            <src path="${icu4j.core.dir}/src"/>
1528            <src path="${icu4j.test-framework.dir}/src"/>
1529            <src path="${icu4j.collate-tests.dir}/src"/>
1530            <src path="${icu4j.testall.dir}/src"/>
1531
1532            <patternset refid="common.test.sources"/>
1533            <include name="com/ibm/icu/dev/test/TestAllCollate.java"/>
1534            <include name="com/ibm/icu/dev/test/collator/**/*.java"/>
1535            <include name="java,com/ibm/icu/dev/test/search/**/*.java"/>
1536            <exclude name="com/ibm/icu/dev/test/collator/AlphabeticIndexTest.java"/>
1537            <exclude name="com/ibm/icu/dev/test/collator/RandomCollator.java"/>
1538            <exclude name="com/ibm/icu/dev/test/collator/IndexCharactersTest.java"/>
1539        </javac>
1540
1541        <copy todir="${module.tests.dir}">
1542            <fileset dir="${icu4j.collate-tests.dir}/src">
1543                <include name="com/ibm/icu/dev/data/*.txt"/>
1544            </fileset>
1545        </copy>
1546    </target>
1547
1548    <!-- Compression -->
1549    <target name="compression" description="Modular build of compression services">
1550        <mkdir dir="${module.bin.dir}"/>
1551        <javac srcdir="${icu4j.core.dir}/src"
1552                destdir="${module.bin.dir}"
1553                source="${javac.source}"
1554                target="${javac.target}"
1555                encoding="${java.src.encoding}"
1556                debug="on" deprecation="off">
1557            <include name="com/ibm/icu/text/SCSU.java"/>
1558            <include name="com/ibm/icu/text/UnicodeCompressor.java"/>
1559            <include name="com/ibm/icu/text/UnicodeDecompressor.java"/>
1560        </javac>
1561    </target>
1562
1563    <target name="compressionTests" depends="compression" description="Modular build of compression test suite">
1564        <mkdir dir="${module.tests.dir}"/>
1565        <javac destdir="${module.tests.dir}"
1566                source="${javac.source}"
1567                target="${javac.target}"
1568                encoding="${java.src.encoding}"
1569                classpath="${module.bin.dir}"
1570                debug="on" deprecation="off">
1571            <src path="${icu4j.core.dir}/src"/>
1572            <src path="${icu4j.test-framework.dir}/src"/>
1573            <src path="${icu4j.core-tests.dir}/src"/>
1574            <src path="${icu4j.testall.dir}/src"/>
1575
1576            <patternset refid="common.test.sources"/>
1577            <include name="com/ibm/icu/dev/test/compression/**/*.java"/>
1578        </javac>
1579    </target>
1580
1581    <!-- Format -->
1582    <target name="format" description="Modular build of format services">
1583        <mkdir dir="${module.bin.dir}"/>
1584        <javac srcdir="${icu4j.core.dir}/src"
1585                destdir="${module.bin.dir}"
1586                source="${javac.source}"
1587                target="${javac.target}"
1588                encoding="${java.src.encoding}"
1589                debug="on" deprecation="off">
1590            <include name="com/ibm/icu/impl/LocaleDisplayNamesImpl.java"/>
1591            <include name="com/ibm/icu/impl/TimeZoneNames*.java"/>
1592            <include name="com/ibm/icu/lang/UCharacter.java"/>
1593            <include name="com/ibm/icu/text/BreakIteratorFactory.java"/>
1594            <include name="com/ibm/icu/text/*Collator*.java"/>
1595            <include name="com/ibm/icu/text/*Format*.java"/>
1596            <include name="com/ibm/icu/text/UnicodeSetIterator.java"/>
1597            <include name="com/ibm/icu/util/CalendarServiceShim.java"/>
1598        </javac>
1599
1600        <javac srcdir="${icu4j.regiondata.dir}/src"
1601                destdir="${module.bin.dir}"
1602                source="${javac.source}"
1603                target="${javac.target}"
1604                encoding="${java.src.encoding}"
1605                debug="on" deprecation="off"/>
1606
1607        <javac srcdir="${icu4j.currdata.dir}/src"
1608                destdir="${module.bin.dir}"
1609                source="${javac.source}"
1610                target="${javac.target}"
1611                encoding="${java.src.encoding}"
1612                debug="on" deprecation="off"/>
1613
1614        <unjar src="${icu4j.data.jar}" dest="${module.bin.dir}">
1615            <patternset>
1616                <include name="**/*.icu"/>
1617                <include name="**/*.brk"/>
1618                <include name="**/*.res"/>
1619                <exclude name="**/translit/*.res"/>
1620            </patternset>
1621        </unjar>
1622        <unjar src="${icu4j.tzdata.jar}" dest="${module.bin.dir}">
1623            <patternset>
1624                <include name="**/*.res" />
1625            </patternset>
1626        </unjar>
1627    </target>
1628
1629    <target name="formatTests" depends="format" description="Modular build of format test suite">
1630        <mkdir dir="${module.tests.dir}"/>
1631        <javac destdir="${module.tests.dir}"
1632                source="${javac.source}"
1633                target="${javac.target}"
1634                encoding="${java.src.encoding}"
1635                classpath="${module.bin.dir}"
1636                debug="on" deprecation="off">
1637            <src path="${icu4j.core.dir}/src"/>
1638            <src path="${icu4j.test-framework.dir}/src"/>
1639            <src path="${icu4j.core-tests.dir}/src"/>
1640            <src path="${icu4j.testall.dir}/src"/>
1641
1642            <patternset refid="common.test.sources"/>
1643            <include name="com/ibm/icu/dev/test/format/**/*.java"/>
1644            <exclude name="com/ibm/icu/dev/test/format/GlobalizationPreferencesTest.java"/>
1645        </javac>
1646
1647        <unjar src="${icu4j.testdata.jar}" dest="${module.tests.dir}">
1648            <patternset>
1649                <include name="**/format.res"/>
1650            </patternset>
1651        </unjar>
1652
1653        <copy file="${icu4j.core-tests.dir}/src/com/ibm/icu/dev/test/format/NumberFormatTestCases.txt"
1654                todir="${module.tests.dir}/com/ibm/icu/dev/test/format"/>
1655
1656    </target>
1657
1658    <!-- Normalizer -->
1659    <target name="normalizer" description="Modular build of normalizer services">
1660        <mkdir dir="${module.bin.dir}"/>
1661        <javac srcdir="${icu4j.core.dir}/src"
1662                destdir="${module.bin.dir}"
1663                source="${javac.source}"
1664                target="${javac.target}"
1665                encoding="${java.src.encoding}"
1666                debug="on" deprecation="off">
1667            <include name="com/ibm/icu/lang/**/*"/>
1668            <include name="com/ibm/icu/text/CanonicalIterator.java"/>
1669            <include name="com/ibm/icu/text/Normalizer.java"/>
1670            <include name="com/ibm/icu/text/Replaceable.java"/>
1671            <include name="com/ibm/icu/text/ReplaceableString.java"/>
1672            <include name="com/ibm/icu/text/UCharacterIterator.java"/>
1673            <include name="com/ibm/icu/text/UForwardCharacterIterator.java"/>
1674            <include name="com/ibm/icu/text/UnicodeFilter.java"/>
1675            <include name="com/ibm/icu/text/UnicodeSetIterator.java"/>
1676            <include name="com/ibm/icu/text/UTF16.java"/>
1677        </javac>
1678
1679        <unjar src="${icu4j.data.jar}" dest="${module.bin.dir}">
1680            <patternset>
1681                <include name="**/ubidi.icu"/>
1682                <include name="**/ucase.icu"/>
1683                <include name="**/unorm.icu"/>
1684                <include name="**/uprops.icu"/>
1685                <include name="**/pnames.icu"/>
1686                <include name="**/unames.icu"/>
1687                <include name="**/*.nrm"/>
1688            </patternset>
1689        </unjar>
1690    </target>
1691
1692    <target name="normalizerTests" depends="normalizer" description="Modular build of normalizer test suite">
1693        <mkdir dir="${module.tests.dir}"/>
1694        <javac destdir="${module.tests.dir}"
1695                source="${javac.source}"
1696                target="${javac.target}"
1697                encoding="${java.src.encoding}"
1698                classpath="${module.bin.dir}"
1699                debug="on" deprecation="off">
1700            <src path="${icu4j.core.dir}/src"/>
1701            <src path="${icu4j.test-framework.dir}/src"/>
1702            <src path="${icu4j.core-tests.dir}/src"/>
1703            <src path="${icu4j.testall.dir}/src"/>
1704
1705            <patternset refid="common.test.sources"/>
1706            <include name="com/ibm/icu/dev/test/normalizer/**/*.java"/>
1707            <exclude name="com/ibm/icu/dev/test/normalizer/TestDeprecatedNormalizerAPI.java"/>
1708        </javac>
1709
1710        <copy todir="${module.tests.dir}">
1711            <fileset dir="${icu4j.core-tests.dir}/src">
1712                <include name="com/ibm/icu/dev/data/unicode/*.txt"/>
1713            </fileset>
1714        </copy>
1715
1716        <unjar src="${icu4j.testdata.jar}" dest="${module.tests.dir}">
1717            <patternset>
1718                <include name="**/testnorm.nrm"/>
1719            </patternset>
1720        </unjar>
1721
1722    </target>
1723
1724    <!-- Character Properties -->
1725    <target name="_copyBasicPropsData">
1726        <mkdir dir="${module.bin.dir}"/>
1727        <unjar src="${icu4j.data.jar}" dest="${module.bin.dir}">
1728            <patternset>
1729                <include name="**/unorm.icu"/>
1730                <include name="**/uprops.icu"/>
1731                <include name="**/ubidi.icu"/>
1732                <include name="**/ucase.icu"/>
1733                <include name="**/pnames.icu"/>
1734                <include name="**/unames.icu"/>
1735                <include name="**/*.nrm"/>
1736            </patternset>
1737        </unjar>
1738    </target>
1739
1740    <target name="_copyFullPropsData">
1741        <mkdir dir="${module.bin.dir}"/>
1742        <unjar src="${icu4j.data.jar}" dest="${module.bin.dir}">
1743            <patternset>
1744                <include name="**/unorm.icu"/>
1745                <include name="**/uprops.icu"/>
1746                <include name="**/ubidi.icu"/>
1747                <include name="**/ucase.icu"/>
1748                <include name="**/unames.icu"/>
1749                <include name="**/pnames.icu"/>
1750                <include name="**/*.res"/>
1751                <include name="**/*.brk"/>
1752                <include name="**/*.dict"/>
1753                <include name="**/*.nrm"/>
1754                <exclude name="**/coll/*.res"/>
1755                <exclude name="**/translit/*.res"/>
1756                <exclude name="**/rbnf/*.res"/>
1757            </patternset>
1758        </unjar>
1759        <unjar src="${icu4j.tzdata.jar}" dest="${module.bin.dir}">
1760            <patternset>
1761                <include name="**/*.res" />
1762            </patternset>
1763        </unjar>
1764    </target>
1765
1766    <target name="_propertiesClasses">
1767        <mkdir dir="${module.bin.dir}"/>
1768        <javac srcdir="${icu4j.core.dir}/src"
1769                destdir="${module.bin.dir}"
1770                source="${javac.source}"
1771                target="${javac.target}"
1772                encoding="${java.src.encoding}"
1773                debug="on" deprecation="off">
1774            <include name="com/ibm/icu/impl/data/*Break*.java"/>
1775            <include name="com/ibm/icu/lang/**/*"/>
1776            <include name="com/ibm/icu/text/*BreakDictionary*.java"/>
1777            <include name="com/ibm/icu/text/*BreakIterator*.java"/>
1778            <include name="com/ibm/icu/text/UnicodeSetIterator.java"/>
1779        </javac>
1780    </target>
1781
1782    <target name="_propertiesTests">
1783        <mkdir dir="${module.tests.dir}"/>
1784        <javac destdir="${module.tests.dir}"
1785                source="${javac.source}"
1786                target="${javac.target}"
1787                encoding="${java.src.encoding}"
1788                classpath="${module.bin.dir}"
1789                debug="on" deprecation="off">
1790            <src path="${icu4j.core.dir}/src"/>
1791            <src path="${icu4j.test-framework.dir}/src"/>
1792            <src path="${icu4j.core-tests.dir}/src"/>
1793            <src path="${icu4j.testall.dir}/src"/>
1794
1795            <patternset refid="common.test.sources"/>
1796            <include name="com/ibm/icu/dev/test/lang/**/*.java"/>
1797            <exclude name="com/ibm/icu/dev/test/lang/TestUScriptRun.java"/>
1798        </javac>
1799
1800        <copy todir="${module.tests.dir}">
1801            <fileset dir="${icu4j.core-tests.dir}/src">
1802                <include name="com/ibm/icu/dev/data/unicode/SpecialCasing.txt"/>
1803                <include name="com/ibm/icu/dev/data/unicode/UnicodeData.txt"/>
1804            </fileset>
1805        </copy>
1806    </target>
1807
1808    <target name="propertiesBasic" depends="_propertiesClasses, _copyBasicPropsData" description="Modular build of basic character properties"/>
1809
1810    <target name="propertiesBasicTests" depends="propertiesBasic, _propertiesTests" description="Modular build of basic character properties test suite"/>
1811
1812    <target name="propertiesFull" depends="_propertiesClasses, _copyFullPropsData" description="Modular build of full character properties"/>
1813
1814    <target name="propertiesFullTests" depends="propertiesFull, _propertiesTests" description="Modular build of full character properties test suite"/>
1815
1816    <!-- Transliterator -->
1817    <!-- this module will soon be obsolete, use the translit jar -->
1818    <target name="transliterator" depends="_propertiesClasses" description="Modular build of transliterator services">
1819        <mkdir dir="${module.bin.dir}"/>
1820        <javac  destdir="${module.bin.dir}"
1821                source="${javac.source}"
1822                target="${javac.target}"
1823                encoding="${java.src.encoding}"
1824                debug="on" deprecation="off">
1825            <src path="${icu4j.core.dir}/src"/>
1826            <src path="${icu4j.translit.dir}/src"/>
1827
1828            <include name="com/ibm/icu/impl/*Iterator*.java"/>
1829            <include name="com/ibm/icu/impl/*Property*.java"/>
1830            <include name="com/ibm/icu/impl/data/ResourceReader.java"/>
1831            <include name="com/ibm/icu/impl/UtilityExtensions.java"/>
1832            <include name="com/ibm/icu/text/*Transliterator*.java"/>
1833            <include name="com/ibm/icu/text/UnicodeSetIterator.java"/>
1834            <include name="com/ibm/icu/text/BreakIteratorFactory.java"/>
1835        </javac>
1836
1837        <unjar src="${icu4j.data.jar}" dest="${module.bin.dir}">
1838            <patternset>
1839                <include name="**/unorm.icu"/>
1840                <include name="**/uprops.icu"/>
1841                <include name="**/ubidi.icu"/>
1842                <include name="**/ucase.icu"/>
1843                <include name="**/unames.icu"/>
1844                <include name="**/pnames.icu"/>
1845                <include name="**/*.brk"/>
1846                <include name="**/*.dict"/>
1847                <include name="**/*.nrm"/>
1848                <include name="**/brkitr/*.res"/>
1849                <include name="**/translit/*.res"/>
1850                <include name="**/likelySubtags.res"/>
1851            </patternset>
1852        </unjar>
1853    </target>
1854
1855    <target name="transliteratorTests" depends="transliterator" description="Modular build of transliterator test suite">
1856        <mkdir dir="${module.tests.dir}"/>
1857        <javac destdir="${module.tests.dir}"
1858                source="${javac.source}"
1859                target="${javac.target}"
1860                encoding="${java.src.encoding}"
1861                classpath="${module.bin.dir}"
1862                debug="on" deprecation="off">
1863            <src path="${icu4j.core.dir}/src"/>
1864            <src path="${icu4j.test-framework.dir}/src"/>
1865            <src path="${icu4j.translit-tests.dir}/src"/>
1866            <src path="${icu4j.testall.dir}/src"/>
1867
1868            <patternset refid="common.test.sources"/>
1869            <include name="com/ibm/icu/dev/test/TestAllTranslit.java"/>
1870            <include name="com/ibm/icu/dev/test/translit/**/*.java"/>
1871            <exclude name="com/ibm/icu/dev/test/translit/UnicodeFilterLogic*.java"/>
1872        </javac>
1873
1874        <copy file="${icu4j.translit-tests.dir}/src/com/ibm/icu/dev/test/translit/langtagRegex.txt"
1875                todir="${module.tests.dir}/com/ibm/icu/dev/test/translit"/>
1876    </target>
1877
1878    <!-- StringPrep -->
1879    <target name="stringPrep" depends="normalizer" description="Modular build of stringprep services">
1880        <mkdir dir="${module.bin.dir}"/>
1881        <javac srcdir="${icu4j.core.dir}/src"
1882                destdir="${module.bin.dir}"
1883                source="${javac.source}"
1884                target="${javac.target}"
1885                encoding="${java.src.encoding}"
1886                debug="on" deprecation="off">
1887            <include name="com/ibm/icu/impl/*StringPrep*.java"/>
1888            <include name="com/ibm/icu/text/*IDNA*.java"/>
1889            <include name="com/ibm/icu/text/*StringPrep*.java"/>
1890        </javac>
1891
1892        <unjar src="${icu4j.data.jar}" dest="${module.bin.dir}">
1893            <patternset>
1894                <include name="**/*.spp"/>
1895                <include name="**/ubidi.icu"/>
1896                <include name="**/ucase.icu"/>
1897                <include name="**/unorm.icu"/>
1898                <include name="**/uprops.icu"/>
1899                <include name="**/pnames.icu"/>
1900                <include name="**/unames.icu"/>
1901            </patternset>
1902        </unjar>
1903    </target>
1904
1905    <target name="stringPrepTests" depends="stringPrep" description="Modular build of stringprep test suite">
1906        <mkdir dir="${module.tests.dir}"/>
1907        <javac destdir="${module.tests.dir}"
1908                source="${javac.source}"
1909                target="${javac.target}"
1910                encoding="${java.src.encoding}"
1911                classpath="${module.bin.dir}"
1912                debug="on" deprecation="off">
1913            <src path="${icu4j.core.dir}/src"/>
1914            <src path="${icu4j.test-framework.dir}/src"/>
1915            <src path="${icu4j.core-tests.dir}/src"/>
1916            <src path="${icu4j.testall.dir}/src"/>
1917
1918            <patternset refid="common.test.sources"/>
1919            <include name="com/ibm/icu/dev/test/stringprep/**/*.java"/>
1920        </javac>
1921
1922        <unjar src="${icu4j.testdata.jar}" dest="${module.tests.dir}">
1923            <patternset>
1924                <include name="**/*.spp"/>
1925                <include name="**/idna_rules.res"/>
1926            </patternset>
1927        </unjar>
1928
1929        <copy file="${icu4j.core-tests.dir}/src/com/ibm/icu/dev/data/IDNATestInput.txt"
1930                todir="${module.tests.dir}/com/ibm/icu/dev/data"/>
1931    </target>
1932
1933    <target name="publishToMavenRepo" depends="releaseVer">
1934        <!--
1935            Publish libraries to Maven repositories, snapshot or release depending on current
1936            version in pom.xml.
1937
1938            Prerequisites
1939
1940            1) Apache Maven Ant tasks - http://maven.apache.org/ant-tasks
1941            2) GnuPG
1942            3) Put build-local.properties to specify followings
1943
1944                maven-ant-tasks.jar = [location of maven ant tasks jar file]
1945                gpg.user = ICU Project
1946                gpg.passphrase = [passprase for ICU Project's PGP key]
1947
1948            4) Maven configuration file ~/.m2/settings.xml
1949                <settings>
1950                    <servers>
1951                        <server>
1952                            <id>icu4j-releases</id>
1953                            <username>[your JIRA/Nexus ID]</username>
1954                            <password>[your JIRA/Nexus password]</password>
1955                        </server>
1956                        <server>
1957                            <id>icu4j-snapshots</id>
1958                            <username>[your JIRA/Nexus ID]</username>
1959                            <password>[your JIRA/Nexus password]</password>
1960                        </server>
1961                    </servers>
1962                </settings>
1963
1964            Note: For now, charset.jar and localespi.jar are excluded.
1965        -->
1966        <fail message="Maven Ant Tasks are required to publish libraries. Set maven-ant-tasks.jar property. Maven Ant Tasks URL: http://maven.apache.org/ant-tasks/" unless="maven-ant-tasks.jar"/>
1967        <condition property="no_maven-ant-tasks">
1968            <available file="${maven-ant-tasks.jar}"/>
1969        </condition>
1970        <fail message="Maven Ant Tasks not found at ${maven-ant-tasks.jar}" unless="no_maven-ant-tasks"/>
1971
1972        <path id="maven-ant-tasks.classpath" path="${maven-ant-tasks.jar}"/>
1973        <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"
1974            classpathref="maven-ant-tasks.classpath"/>
1975
1976        <xmlproperty file="pom.xml" prefix="pom.xml"/>
1977
1978        <!-- copy release files -->
1979        <property name="maven.release.dir" value="${release.dir}/maven"/>
1980
1981        <property name="maven.icu4j.jar.versioned.file" value="icu4j-${pom.xml.project.version}.jar"/>
1982        <property name="maven.icu4j-src.jar.versioned.file" value="icu4j-${pom.xml.project.version}-src.jar"/>
1983        <property name="maven.icu4jdocs.jar.file" value="icu4j-${pom.xml.project.version}-javadoc.jar"/>
1984
1985        <mkdir dir="${maven.release.dir}"/>
1986
1987        <copy file="${release.dir}/${icu4j.jar.versioned.file}" tofile="${maven.release.dir}/${maven.icu4j.jar.versioned.file}"/>
1988        <copy file="${release.dir}/${icu4j-src.jar.versioned.file}" tofile="${maven.release.dir}/${maven.icu4j-src.jar.versioned.file}"/>
1989        <copy file="${release.dir}/${icu4jdocs.jar.versioned.file}" tofile="${maven.release.dir}/${maven.icu4jdocs.jar.file}"/>
1990
1991        <copy file="pom.xml" todir="${maven.release.dir}"/>
1992
1993        <!-- sign release files-->
1994        <macrodef name="gpg">
1995            <attribute name="file"/>
1996            <sequential>
1997                <delete file="@{file}.asc" failonerror="false"/>
1998                <exec executable="gpg">
1999                    <arg value="-u"/>
2000                    <arg value="${gpg.user}"/>
2001                    <arg value="-ab"/>
2002                    <arg value="--passphrase"/>
2003                    <arg value="${gpg.passphrase}"/>
2004                    <arg value="-o"/>
2005                    <arg value="@{file}.asc"/>
2006                    <arg value="@{file}"/>
2007                </exec>
2008            </sequential>
2009        </macrodef>
2010
2011        <gpg file="${maven.release.dir}/${maven.icu4j.jar.versioned.file}"/>
2012        <gpg file="${maven.release.dir}/${maven.icu4j-src.jar.versioned.file}"/>
2013        <gpg file="${maven.release.dir}/${maven.icu4jdocs.jar.file}"/>
2014
2015        <gpg file="${maven.release.dir}/pom.xml"/>
2016
2017        <!-- deploy files to the repository -->
2018        <deploy xmlns="urn:maven-artifact-ant" file="${maven.release.dir}/${maven.icu4j.jar.versioned.file}">
2019            <pom file="${maven.release.dir}/pom.xml"/>
2020            <attach file="${maven.release.dir}/pom.xml.asc" type="pom.asc"/>
2021
2022            <attach file="${maven.release.dir}/${maven.icu4j.jar.versioned.file}.asc" type="jar.asc"/>
2023            <attach file="${maven.release.dir}/${maven.icu4j-src.jar.versioned.file}" classifier="sources"/>
2024            <attach file="${maven.release.dir}/${maven.icu4j-src.jar.versioned.file}.asc" classifier="sources" type="jar.asc"/>
2025            <attach file="${maven.release.dir}/${maven.icu4jdocs.jar.file}" classifier="javadoc"/>
2026            <attach file="${maven.release.dir}/${maven.icu4jdocs.jar.file}.asc" classifier="javadoc" type="jar.asc"/>
2027        </deploy>
2028
2029        <antcall target="_verify_config_for_release"/>
2030    </target>
2031
2032</project>
2033