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