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