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