ICU-6951 Added localespiCheck and xliff targets

X-SVN-Rev: 26115
This commit is contained in:
Yoshito Umaoka 2009-06-16 15:47:21 +00:00
parent a96f4fd0e3
commit 5e56d5c9b7
3 changed files with 113 additions and 39 deletions

View File

@ -21,18 +21,41 @@
<property environment="env"/>
<!-- Java version check -->
<condition property="is.java6.plus">
<or>
<contains string="${java.version}" substring="1.6."/>
<contains string="${java.version}" substring="1.7."/>
</or>
</condition>
<condition property="is.java5">
<contains string="${java.version}" substring="1.5."/>
</condition>
<fail message="The JDK version is too old or unknown.">
<condition>
<not>
<or>
<isset property="is.java6.plus"/>
<isset property="is.java5"/>
</or>
</not>
</condition>
</fail>
<!-- Build environment info -->
<property name="env.COMPUTERNAME" value="${env.HOSTNAME}"/>
<echo message="----- Build Environment Information -------------------"/>
<echo message="Java Home: ${java.home}"/>
<echo message="Java Version: ${java.version}"/>
<echo message="Ant Home: ${ant.home}"/>
<echo message="Ant Version: ${ant.version}"/>
<echo message="OS: ${os.name}"/>
<echo message="OS Version: ${os.version}"/>
<echo message="OS Arch: ${os.arch}"/>
<echo message="Host: ${env.COMPUTERNAME}"/>
<echo message="-------------------------------------------------------"/>
<target name="info" description="Display the build environment information">
<echo message="----- Build Environment Information -------------------"/>
<echo message="Java Home: ${java.home}"/>
<echo message="Java Version: ${java.version}"/>
<echo message="Ant Home: ${ant.home}"/>
<echo message="Ant Version: ${ant.version}"/>
<echo message="OS: ${os.name}"/>
<echo message="OS Version: ${os.version}"/>
<echo message="OS Arch: ${os.arch}"/>
<echo message="Host: ${env.COMPUTERNAME}"/>
<echo message="-------------------------------------------------------"/>
</target>
<target name="clean" description="Clean up build outputs">
<ant dir="${icu4j.core.dir}" target="clean" inheritAll="false"/>
@ -60,10 +83,10 @@
</target>
<!-- meta build targets -->
<target name="all" depends="main, tests, build-tools, tools, demos, jar, docs" description="Build all primary targets"/>
<target name="main" depends="core, charset, localespi" description="Build ICU4J API classes"/>
<target name="tests" depends="core-tests, charset-tests, localespi-tests" description="Build ICU4J API test classes"/>
<target name="releaseJar" depends="jar, jarDocs, jarSrc" description="Build all jar files for distribution"/>
<target name="all" depends="info, main, tests, build-tools, tools, demos, jar, docs" description="Build all primary targets"/>
<target name="main" depends="info, core, charset, localespi" description="Build ICU4J API classes"/>
<target name="tests" depends="info, core-tests, charset-tests, localespi-tests" description="Build ICU4J API test classes"/>
<target name="releaseJar" depends="info, jar, jarDocs, jarSrc" description="Build all jar files for distribution"/>
<target name="check" description="Run the standard ICU4J test suite">
<antcall target="_runCheck">
@ -93,7 +116,7 @@
</antcall>
</target>
<target name="_runCheck" depends="main, tests">
<target name="_runCheck" depends="info, core, charset, core-tests, charset-tests">
<echo message="JVM argument: ${runcheck.jvmarg}"/>
<echo message="Test argument: ${runcheck.arg}"/>
@ -110,6 +133,21 @@
</java>
</target>
<target name="localespiCheck" if="is.java6.plus" depends="info" description="Run the ICU4J Locale SPI test suite">
<antcall target="_runLocalespiCheck"/>
</target>
<target name="_runLocalespiCheck" depends="localespi, localespi-tests">
<java classname="com.ibm.icu.dev.test.localespi.TestAll" fork="yes" failonerror="true">
<jvmarg line="-Djava.ext.dirs=${icu4j.core.dir}/${jar.dir}${path.separator}${icu4j.localespi.dir}/${jar.dir}${path.separator}${ext.dir}"/>
<arg value="-n"/>
<classpath>
<pathelement path="${icu4j.localespi-tests.jar}"/>
<pathelement path="${icu4j.test-framework.jar}"/>
</classpath>
</java>
</target>
<!-- jar targets -->
<target name="jar" depends="main" description="Build ICU4J API jar files">
<copy file="${icu4j.core.jar}" tofile="${icu4j.jar.file}"/>
@ -147,7 +185,11 @@
<ant dir="${icu4j.charset.dir}" inheritAll="false"/>
</target>
<target name="localespi" depends="core" description="Build Locale SPI classes">
<target name="localespi" if="is.java6.plus" description="Build Locale SPI classes">
<antcall target="_build-localespi"/>
</target>
<target name="_build-localespi" depends="core">
<ant dir="${icu4j.localespi.dir}" inheritAll="false"/>
</target>
@ -163,7 +205,11 @@
<ant dir="${icu4j.charset-tests.dir}" inheritAll="false"/>
</target>
<target name="localespi-tests" depends="localespi, test-framework" description="Build Locale SPI tests">
<target name="localespi-tests" if="is.java6.plus" description="Build Locale SPI tests">
<antcall target="_build-localespi-tests"/>
</target>
<target name="_build-localespi-tests" depends="localespi, test-framework">
<ant dir="${icu4j.localespi-tests.dir}" inheritAll="false"/>
</target>
@ -180,7 +226,7 @@
</target>
<!-- doc targets -->
<target name="docs" depends="build-tools" description="Build API documents">
<target name="docs" depends="info, build-tools" description="Build API documents">
<javadoc
destdir="${doc.dir}"
nodeprecatedlist="true"
@ -206,7 +252,7 @@
<!-- Release management targets -->
<target name="checktags" depends="build-tools" description="Check API tags before release">
<target name="checktags" depends="info, build-tools" description="Check API tags before release">
<javadoc source="1.5">
<packageset dir="${icu4j.core.dir}/src">
<include name="com/ibm/icu/lang/**"/>
@ -221,7 +267,7 @@
</javadoc>
</target>
<target name="gatherapi" depends="build-tools" description="Run API database generator tool">
<target name="gatherapi" depends="info, build-tools" description="Run API database generator tool">
<mkdir dir="${out.dir}"/>
<javadoc source="1.5">
<packageset dir="${icu4j.core.dir}/src">
@ -242,7 +288,7 @@
</javadoc>
</target>
<target name="apireport" depends="gatherapi" description="Run API report generator tool">
<target name="apireport" depends="info, gatherapi" description="Run API report generator tool">
<java classname="com.ibm.icu.dev.tool.docs.ReportAPI"
classpath="${icu4j.build-tools.jar}"
failonerror="true">
@ -296,7 +342,7 @@
<!-- Special packaging targets -->
<target name="translitIMEJar" description="Build transliterator IME 'icutransime.jar' jar file">
<target name="translitIMEJar" depends="info" description="Build transliterator IME 'icutransime.jar' jar file">
<property name="translit.ime.out.dir" value="${out.dir}/translit_ime"/>
<mkdir dir="${translit.ime.out.dir}/bin"/>
@ -322,7 +368,7 @@
</jar>
</target>
<target name="indicIMEJar" description="Build indic IME 'icuindicime.jar' jar file">
<target name="indicIMEJar" depends="info" description="Build indic IME 'icuindicime.jar' jar file">
<property name="indic.ime.out.dir" value="${out.dir}/indic_ime"/>
<mkdir dir="${indic.ime.out.dir}/bin"/>
@ -348,9 +394,8 @@
</jar>
</target>
<target name="cldrUtil" description="Build Utilities for CLDR">
<target name="cldrUtil" depends="info" description="Build Utilities for CLDR">
<property name="cldr.util.out.dir" value="${out.dir}/cldr_util"/>
<mkdir dir="${cldr.util.out.dir}/bin"/>
<javac destdir="${cldr.util.out.dir}/bin"
@ -379,4 +424,34 @@
</jar>
</target>
<target name="xliff" description="Build xliff converter tool">
<property name="xliff.out.dir" value="${out.dir}/xliff"/>
<mkdir dir="${xliff.out.dir}/bin"/>
<javac destdir="${xliff.out.dir}/bin"
source="1.3"
target="1.3"
debug="on" deprecation="off">
<src path="${icu4j.tools.dir}/src"/>
<include name="com/ibm/icu/dev/tool/localeconverter/CalculateCRC32.java"/>
<include name="com/ibm/icu/dev/tool/localeconverter/XLIFF2ICUConverter.java"/>
<include name="com/ibm/icu/dev/tool/UOption.java"/>
</javac>
<mkdir dir="${xliff.out.dir}/lib"/>
<jar jarfile="${xliff.out.dir}/lib/xliff-src.jar"
compress="true"
basedir="${icu4j.tools.dir}/src">
<include name="com/ibm/icu/dev/tool/localeconverter/CalculateCRC32.java"/>
<include name="com/ibm/icu/dev/tool/localeconverter/XLIFF2ICUConverter.java"/>
<include name="com/ibm/icu/dev/tool/UOption.java"/>
</jar>
<jar jarfile="${xliff.out.dir}/lib/xliff.jar"
compress="true"
basedir="${xliff.out.dir}/bin"
manifest="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/localeconverter/manifest.stub"/>
</target>
</project>

View File

@ -0,0 +1,13 @@
Manifest-Version: 1.0
Main-Class: com.ibm.icu.dev.tool.localeconverter.XLIFF2ICUConverter
Name: com/ibm/icu/dev/tool/localeconverter
Specification-Title: XLIFF to ICU conversion tool
Specification-Version: 1.1
Specification-Vendor: ICU
Implementation-Title: XLIFF to ICU Converter
Implementation-Version: 1.1.0
Implementation-Vendor: IBM Corporation
Implementation-Vendor-Id: com.ibm
Copyright-Info: Copyright (c) 2005-2009, International Business Machines Corporation and others. All Rights Reserved.
Sealed: false

View File

@ -1,14 +0,0 @@
Manifest-Version: 1.0
Class-Path: icu4j.jar
Main-Class: com.ibm.icu.dev.test.TestAll
Name: com/ibm/icu/
Specification-Title: XLIFF to ICU conversion tool
Specification-Version: 3.4
Specification-Vendor: ICU
Implementation-Title: XLIFF to ICU Converter
Implementation-Version: 3.4.0
Implementation-Vendor: IBM Corporation
Implementation-Vendor-Id: com.ibm
Copyright-Info: Copyright (c) 2005, International Business Machines Corporation and others. All Rights Reserved.
Sealed: false