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