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