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