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