2008-05-16 04:03:15 +00:00
|
|
|
<!--
|
|
|
|
/*
|
|
|
|
*******************************************************************************
|
|
|
|
* Copyright (C) 2008, International Business Machines Corporation and *
|
|
|
|
* others. All Rights Reserved. *
|
|
|
|
*******************************************************************************
|
2008-05-20 02:47:55 +00:00
|
|
|
* This is the ant build file for ICU4J Locale SPI implementation.
|
2008-05-16 04:03:15 +00:00
|
|
|
*/
|
|
|
|
-->
|
2008-06-04 03:58:31 +00:00
|
|
|
<project name="icu4j-localespi" default="build-jar" basedir=".">
|
2008-05-20 02:47:55 +00:00
|
|
|
<property file="../build.properties"/>
|
2008-05-16 04:03:15 +00:00
|
|
|
<property name="build.dir" value="classes"/>
|
|
|
|
<property name="src.dir" value="src"/>
|
|
|
|
<property name="javac.src.ver" value="1.6"/>
|
|
|
|
<property name="javac.bin.ver" value="1.6"/>
|
|
|
|
<property name="jar.file" value="icu4j-localespi.jar"/>
|
|
|
|
<property name="icu4j.jar.file" value="../icu4j.jar"/>
|
2008-06-04 03:58:31 +00:00
|
|
|
<property name="icu4j.build.dir" value="../classes"/>
|
|
|
|
<property name="icu4j.core.build.file" value="../build.xml"/>
|
|
|
|
<property name="ext.dir" value="ext"/>
|
2008-05-20 02:47:55 +00:00
|
|
|
<condition property="is.java6">
|
|
|
|
<contains string="${java.version}" substring="1.6."/>
|
|
|
|
</condition>
|
2008-06-04 03:58:31 +00:00
|
|
|
<available file="${icu4j.jar.file}" property="is.icu4j.jar.available"/>
|
2008-05-16 04:03:15 +00:00
|
|
|
|
2008-05-20 02:47:55 +00:00
|
|
|
<target name="check-env-java6" unless="is.java6">
|
|
|
|
<echo message="######################## ERROR ########################"/>
|
|
|
|
<echo message="Java SE 6 SDK is required for building the ICU4J Locale"/>
|
|
|
|
<echo message="Service Provider module. Terminating the build task."/>
|
|
|
|
<echo message="#######################################################"/>
|
|
|
|
<fail message="Java SE 6 SDK is required"/>
|
|
|
|
</target>
|
|
|
|
|
2008-06-04 03:58:31 +00:00
|
|
|
<target name="icu4j-jar" unless="is.icu4j.jar.available">
|
|
|
|
<!-- Building icu4j.jar if missing. We do not want to build
|
|
|
|
icu4j.jar here, because Java 6 is not the standard JDK
|
|
|
|
for icu4j core library. -->
|
|
|
|
<echo message="WARNING: Building icu4j.jar with Java 6"/>
|
|
|
|
<ant antfile="${icu4j.core.build.file}" target="jar" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" depends="check-env-java6,icu4j-jar">
|
|
|
|
<mkdir dir="${build.dir}"/>
|
2008-05-16 04:03:15 +00:00
|
|
|
<javac srcdir="${src.dir}"
|
2008-06-04 03:58:31 +00:00
|
|
|
includes="com/ibm/icu/impl/**/*.java"
|
2008-05-16 04:03:15 +00:00
|
|
|
destdir="${build.dir}"
|
|
|
|
classpath="${icu4j.jar.file}"
|
|
|
|
source="${javac.src.ver}"
|
|
|
|
target="${javac.bin.ver}"
|
|
|
|
debug="on"
|
2008-06-04 03:58:31 +00:00
|
|
|
encoding="ascii">
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="jar">
|
|
|
|
<jar jarfile="${jar.file}" compress="true">
|
|
|
|
<fileset dir="${src.dir}">
|
|
|
|
<include name="META-INF/services/java.*Provider"/>
|
2008-06-09 17:21:10 +00:00
|
|
|
<include name="com/ibm/icu/impl/javaspi/ICULocaleServiceProviderConfig.properties"/>
|
2008-06-04 03:58:31 +00:00
|
|
|
</fileset>
|
|
|
|
<fileset dir="${build.dir}">
|
|
|
|
<include name="com/ibm/icu/impl/**/*"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="../" includes="license.html"/>
|
2008-05-20 02:47:55 +00:00
|
|
|
<manifest>
|
|
|
|
<attribute name="Built-By" value="${corp}"/>
|
|
|
|
<section name="common">
|
|
|
|
<attribute name="Specification-Title" value="ICU4J Locale Service Provider" />
|
|
|
|
<attribute name="Specification-Version" value="${icu4j.spec.version.string}" />
|
|
|
|
<attribute name="Specification-Vendor" value="ICU" />
|
|
|
|
<attribute name="Implementation-Title" value=" ICU4J Locale Service Providers for Java 6" />
|
|
|
|
<attribute name="Implementation-Version" value="${icu4j.impl.version.string}" />
|
|
|
|
<attribute name="Implementation-Vendor" value="${corp}" />
|
|
|
|
<attribute name="Implementation-Vendor-Id" value="com.ibm" />
|
|
|
|
<attribute name="Copyright-Info" value="${copyright}" />
|
|
|
|
<attribute name="Sealed" value="false" />
|
|
|
|
</section>
|
|
|
|
</manifest>
|
2008-05-16 04:03:15 +00:00
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
2008-06-04 03:58:31 +00:00
|
|
|
<target name="tests" depends="check-env-java6">
|
|
|
|
<ant antfile="${icu4j.core.build.file}" target="tests" inheritAll="false"/>
|
|
|
|
<javac srcdir="${src.dir}"
|
|
|
|
includes="com/ibm/icu/dev/test/**/*.java"
|
|
|
|
destdir="${build.dir}"
|
|
|
|
classpath="${icu4j.build.dir}"
|
|
|
|
source="${javac.src.ver}"
|
|
|
|
target="${javac.bin.ver}"
|
|
|
|
debug="on"
|
|
|
|
encoding="ascii">
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="run-check">
|
|
|
|
<mkdir dir="${ext.dir}"/>
|
|
|
|
<copy file="${icu4j.jar.file}" todir="${ext.dir}"/>
|
|
|
|
<copy file="${jar.file}" todir="${ext.dir}"/>
|
2008-06-05 04:41:09 +00:00
|
|
|
|
2008-06-04 03:58:31 +00:00
|
|
|
<java classname="com.ibm.icu.dev.test.localespi.TestAll" fork="yes" failonerror="true">
|
2008-06-05 04:41:09 +00:00
|
|
|
<jvmarg line="-Djava.ext.dirs=${java.ext.dirs}${path.separator}${ext.dir}"/>
|
2008-06-04 03:58:31 +00:00
|
|
|
<arg value="-n" />
|
|
|
|
<classpath>
|
|
|
|
<pathelement path="${build.dir}" />
|
|
|
|
<pathelement path="${icu4j.build.dir}/"/>
|
|
|
|
</classpath>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
2008-05-16 04:03:15 +00:00
|
|
|
<target name="clean">
|
|
|
|
<delete dir="${build.dir}"/>
|
|
|
|
<delete file="${jar.file}"/>
|
2008-06-04 03:58:31 +00:00
|
|
|
<delete dir="${ext.dir}"/>
|
2008-05-16 04:03:15 +00:00
|
|
|
</target>
|
|
|
|
|
2008-06-04 03:58:31 +00:00
|
|
|
<target name="build-jar" depends="compile,jar"/>
|
|
|
|
<target name="check" depends="build-jar,tests,run-check"/>
|
|
|
|
|
2008-05-16 04:03:15 +00:00
|
|
|
</project>
|