2009-06-16 05:52:23 +00:00
|
|
|
<!--
|
|
|
|
*******************************************************************************
|
2013-04-19 23:31:32 +00:00
|
|
|
* Copyright (C) 2009-2013, International Business Machines Corporation and *
|
2009-06-16 05:52:23 +00:00
|
|
|
* others. All Rights Reserved. *
|
|
|
|
*******************************************************************************
|
|
|
|
-->
|
|
|
|
<project name="common-targets" basedir=".">
|
|
|
|
<dirname property="common-targets.dir" file="${ant.file.common-targets}"/>
|
|
|
|
<property file="${common-targets.dir}/locations.properties"/>
|
|
|
|
<property file="${common-targets.dir}/common.properties"/>
|
2010-06-11 17:02:51 +00:00
|
|
|
<property environment="env"/>
|
2009-06-16 05:52:23 +00:00
|
|
|
|
|
|
|
<!-- common targets -->
|
|
|
|
|
|
|
|
<target name="@clean">
|
|
|
|
<delete dir="${out.dir}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="@compile">
|
|
|
|
<echo message="--- java compiler arguments ------------------------"/>
|
|
|
|
<echo message="source dir: ${basedir}/${src.dir}"/>
|
|
|
|
<echo message="output dir: ${basedir}/${bin.dir}"/>
|
|
|
|
<echo message="classpath: ${toString:javac.classpathref}"/>
|
|
|
|
<echo message="source: ${javac.source}"/>
|
|
|
|
<echo message="target: ${javac.target}"/>
|
|
|
|
<echo message="debug: ${javac.debug}"/>
|
2010-11-08 15:11:14 +00:00
|
|
|
<echo message="encoding: ${java.src.encoding}"/>
|
2009-08-27 23:02:38 +00:00
|
|
|
<echo message="compiler arg: ${javac.compilerarg}"/>
|
2009-06-16 05:52:23 +00:00
|
|
|
<echo message="----------------------------------------------------"/>
|
|
|
|
|
|
|
|
<mkdir dir="${bin.dir}"/>
|
|
|
|
<javac
|
|
|
|
srcdir="${src.dir}"
|
|
|
|
destdir="${bin.dir}"
|
|
|
|
classpathref="javac.classpathref"
|
|
|
|
source="${javac.source}"
|
|
|
|
target="${javac.target}"
|
2010-06-11 17:02:51 +00:00
|
|
|
debug="${javac.debug}"
|
2010-11-08 15:11:14 +00:00
|
|
|
encoding="${java.src.encoding}"
|
2010-06-11 17:02:51 +00:00
|
|
|
includeAntRuntime="no">
|
2009-08-27 23:02:38 +00:00
|
|
|
<compilerarg value="${javac.compilerarg}"/>
|
|
|
|
</javac>
|
2009-06-16 05:52:23 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="@copy">
|
|
|
|
<mkdir dir="${bin.dir}"/>
|
|
|
|
<copy todir="${bin.dir}">
|
|
|
|
<fileset dir="${src.dir}" defaultexcludes="yes">
|
|
|
|
<exclude name="**/*.java"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="@jar">
|
|
|
|
<mkdir dir="${jar.dir}"/>
|
|
|
|
|
|
|
|
<copy file="manifest.stub" todir="${out.dir}">
|
|
|
|
<filterset>
|
|
|
|
<filter token="SPECVERSION" value="${jar.spec.version}"/>
|
|
|
|
<filter token="IMPLVERSION" value="${jar.impl.version}"/>
|
|
|
|
<filter token="COPYRIGHT" value="${jar.copyright.info}"/>
|
2010-10-14 19:15:38 +00:00
|
|
|
<filter token="EXECENV" value="${jar.exec.env}"/>
|
2009-06-16 05:52:23 +00:00
|
|
|
</filterset>
|
|
|
|
</copy>
|
|
|
|
|
2010-06-11 17:02:51 +00:00
|
|
|
<jar jarfile="${jar.dir}/${jar.name}" manifest="${out.dir}/manifest.stub" compress="true">
|
2009-06-16 05:52:23 +00:00
|
|
|
<fileset dir="${bin.dir}" includes="**/*"/>
|
|
|
|
<fileset dir="${shared.dir}/licenses">
|
|
|
|
<include name="license.html"/>
|
|
|
|
</fileset>
|
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
2010-06-11 17:02:51 +00:00
|
|
|
<target name="@src-jar">
|
|
|
|
<mkdir dir="${jar.dir}"/>
|
2010-10-14 19:15:38 +00:00
|
|
|
<jar jarfile="${jar.dir}/${src.jar.name}" compress="true">
|
2010-06-11 17:02:51 +00:00
|
|
|
<fileset dir="${src.dir}" includes="**/*.java"/>
|
|
|
|
<fileset dir="${shared.dir}/licenses">
|
|
|
|
<include name="license.html"/>
|
|
|
|
</fileset>
|
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
2009-06-16 05:52:23 +00:00
|
|
|
<target name="@build-all">
|
|
|
|
<antcall target="_all.${ant.project.name}"/>
|
|
|
|
</target>
|
|
|
|
|
2011-01-14 21:35:42 +00:00
|
|
|
<target name="@full-locale-names">
|
|
|
|
<echo message="Generating ${res.dir}/fullLocaleNames.lst"/>
|
|
|
|
<pathconvert pathsep="${line.separator}" property="full.locale.names">
|
|
|
|
<fileset dir="${res.dir}">
|
|
|
|
<include name="??.res"/>
|
|
|
|
<include name="??_*.res"/>
|
|
|
|
<include name="???.res"/>
|
|
|
|
<include name="???_*.res"/>
|
|
|
|
<include name="root.res"/>
|
|
|
|
<exclude name="res_index.res"/>
|
|
|
|
</fileset>
|
|
|
|
<chainedmapper>
|
|
|
|
<flattenmapper/>
|
|
|
|
<globmapper from="*.res" to="*"/>
|
|
|
|
</chainedmapper>
|
|
|
|
</pathconvert>
|
|
|
|
<echo message="${full.locale.names}" file="${res.dir}/fullLocaleNames.lst"/>
|
|
|
|
</target>
|
|
|
|
|
2013-04-19 23:31:32 +00:00
|
|
|
<!-- FindBugs targets -->
|
|
|
|
<target name="_findbugs_init">
|
|
|
|
<property name="findbugs.home" value="${env.FINDBUGS_HOME}"/>
|
|
|
|
<echo message="----------------------------------------------------"/>
|
|
|
|
<echo message="findbugs.home: ${findbugs.home}"/>
|
|
|
|
<echo message="----------------------------------------------------"/>
|
|
|
|
|
|
|
|
<fail message="FindBugs task not found. Set environment variable FINDBUGS_HOME properly.">
|
2011-12-29 18:13:00 +00:00
|
|
|
<condition>
|
|
|
|
<not>
|
|
|
|
<or>
|
|
|
|
<available classname="edu.umd.cs.findbugs.anttask.FindBugsTask" property="_findbugs.task.available" />
|
|
|
|
<available file="${findbugs.home}/lib/findbugs-ant.jar" />
|
|
|
|
</or>
|
|
|
|
</not>
|
|
|
|
</condition>
|
|
|
|
</fail>
|
2013-04-19 23:31:32 +00:00
|
|
|
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
|
|
|
|
classpath="${findbugs.home}/lib/findbugs-ant.jar"/>
|
2011-12-29 18:13:00 +00:00
|
|
|
|
2013-04-19 23:31:32 +00:00
|
|
|
<property name="aux.classpath" value="${toString:javac.classpathref}"/>
|
|
|
|
<condition property="empty.aux.classpath">
|
|
|
|
<length string="${aux.classpath}" when="eq" length="0"/>
|
|
|
|
</condition>
|
2011-12-29 18:13:00 +00:00
|
|
|
</target>
|
|
|
|
|
2013-04-19 23:31:32 +00:00
|
|
|
<target name="_findbugs_empty_aux_classpath" if="empty.aux.classpath">
|
|
|
|
<findbugs
|
|
|
|
home="${findbugs.home}"
|
|
|
|
output="html"
|
|
|
|
outputFile="${out.dir}/fb-${ant.project.name}.html"
|
|
|
|
excludeFilter="findbugs-exclude.xml">
|
|
|
|
|
|
|
|
<sourcePath path="${src.dir}"/>
|
|
|
|
<class location="${jar.dir}/${jar.name}"/>
|
|
|
|
</findbugs>
|
2011-12-29 18:13:00 +00:00
|
|
|
</target>
|
|
|
|
|
2013-04-19 23:31:32 +00:00
|
|
|
<target name="_findbugs_non_empty_aux_classpath" unless="empty.aux.classpath">
|
|
|
|
<findbugs
|
|
|
|
home="${findbugs.home}"
|
|
|
|
output="html"
|
|
|
|
outputFile="${out.dir}/fb-${ant.project.name}.html"
|
|
|
|
excludeFilter="findbugs-exclude.xml">
|
|
|
|
|
|
|
|
<sourcePath path="${src.dir}"/>
|
|
|
|
<class location="${jar.dir}/${jar.name}"/>
|
|
|
|
<auxClasspath path="${aux.classpath}"/>
|
2011-12-29 18:13:00 +00:00
|
|
|
</findbugs>
|
|
|
|
</target>
|
|
|
|
|
2013-04-19 23:31:32 +00:00
|
|
|
<target name="@findbugs" depends="_findbugs_init, @build-all, _findbugs_empty_aux_classpath, _findbugs_non_empty_aux_classpath"/>
|
|
|
|
|
2009-06-16 05:52:23 +00:00
|
|
|
<!-- Dependencies -->
|
|
|
|
|
2009-07-07 19:24:00 +00:00
|
|
|
<!-- collate -->
|
|
|
|
<path id="javac.classpathref.collate">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.collate" depends="_all.core">
|
|
|
|
<ant dir="${icu4j.collate.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
2009-06-16 05:52:23 +00:00
|
|
|
<!-- core -->
|
|
|
|
<path id="javac.classpathref.core"/>
|
|
|
|
|
|
|
|
<target name="_all.core">
|
|
|
|
<ant dir="${icu4j.core.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- charset -->
|
|
|
|
<path id="javac.classpathref.charset">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.charset" depends="_all.core">
|
|
|
|
<ant dir="${icu4j.charset.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
2009-12-11 20:59:29 +00:00
|
|
|
<!-- currdata -->
|
|
|
|
<path id="javac.classpathref.currdata">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.currdata" depends="_all.core">
|
|
|
|
<ant dir="${icu4j.currdata.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
2009-11-30 21:53:28 +00:00
|
|
|
<!-- langdata -->
|
|
|
|
<path id="javac.classpathref.langdata">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.langdata" depends="_all.core">
|
|
|
|
<ant dir="${icu4j.langdata.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
2009-06-16 05:52:23 +00:00
|
|
|
<!-- localespi -->
|
|
|
|
<path id="javac.classpathref.localespi">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
2009-07-07 19:24:00 +00:00
|
|
|
<pathelement location="${icu4j.collate.jar}"/>
|
2009-06-16 05:52:23 +00:00
|
|
|
</path>
|
|
|
|
|
2009-07-07 19:24:00 +00:00
|
|
|
<target name="_all.localespi" depends="_all.core, _all.collate">
|
2009-06-16 05:52:23 +00:00
|
|
|
<ant dir="${icu4j.localespi.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
2009-11-30 21:53:28 +00:00
|
|
|
<!-- regiondata -->
|
|
|
|
<path id="javac.classpathref.regiondata">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.regiondata" depends="_all.core">
|
|
|
|
<ant dir="${icu4j.regiondata.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
2009-07-09 23:49:42 +00:00
|
|
|
<!-- translit -->
|
|
|
|
<path id="javac.classpathref.translit">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
<pathelement location="${icu4j.translit.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.translit" depends="_all.core">
|
|
|
|
<ant dir="${icu4j.translit.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
2009-06-16 05:52:23 +00:00
|
|
|
<!-- test-framework -->
|
|
|
|
<path id="javac.classpathref.test-framework">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.test-framework" depends="_all.core">
|
|
|
|
<ant dir="${icu4j.test-framework.dir}" inheritAll = "false"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- core-tests -->
|
|
|
|
<path id="javac.classpathref.core-tests">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
<pathelement location="${icu4j.test-framework.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.core-tests" depends="_all.core, _all.test-framework">
|
|
|
|
<ant dir="${icu4j.core-tests.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
2009-07-07 19:24:00 +00:00
|
|
|
<!-- collate-tests -->
|
|
|
|
<path id="javac.classpathref.collate-tests">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
<pathelement location="${icu4j.collate.jar}"/>
|
|
|
|
<pathelement location="${icu4j.test-framework.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.collate-tests" depends="_all.core, _all.collate, _all.test-framework">
|
|
|
|
<ant dir="${icu4j.collate-tests.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
2009-06-16 05:52:23 +00:00
|
|
|
<!-- charset-tests -->
|
|
|
|
<path id="javac.classpathref.charset-tests">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
<pathelement location="${icu4j.charset.jar}"/>
|
|
|
|
<pathelement location="${icu4j.test-framework.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.charset-tests" depends="_all.core, _all.charset, _all.test-framework">
|
|
|
|
<ant dir="${icu4j.charset-tests.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- localespi-tests -->
|
|
|
|
<path id="javac.classpathref.localespi-tests">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
2009-07-07 19:24:00 +00:00
|
|
|
<pathelement location="${icu4j.collate.jar}"/>
|
2009-06-16 05:52:23 +00:00
|
|
|
<pathelement location="${icu4j.localespi.jar}"/>
|
|
|
|
<pathelement location="${icu4j.test-framework.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
2009-07-07 19:24:00 +00:00
|
|
|
<target name="_all.localespi-tests" depends="_all.core, _all.collate, _all.localespi, _all.test-framework">
|
2009-06-16 05:52:23 +00:00
|
|
|
<ant dir="${icu4j.localespi-tests.dir}" inheritAll="false"/>
|
2009-07-09 23:49:42 +00:00
|
|
|
</target>
|
|
|
|
|
2009-11-30 21:53:28 +00:00
|
|
|
<!-- packaging-tests -->
|
|
|
|
<path id="javac.classpathref.packaging-tests">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
<pathelement location="${icu4j.charset.jar}"/>
|
|
|
|
<pathelement location="${icu4j.test-framework.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.packaging-tests" depends="_all.core, _all.charset, _all.test-framework">
|
|
|
|
<ant dir="${icu4j.packaging-tests.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
2009-07-09 23:49:42 +00:00
|
|
|
<!-- translit-tests -->
|
|
|
|
<path id="javac.classpathref.translit-tests">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
<pathelement location="${icu4j.translit.jar}"/>
|
|
|
|
<pathelement location="${icu4j.test-framework.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.translit-tests" depends="_all.core, _all.translit, _all.test-framework">
|
|
|
|
<ant dir="${icu4j.translit-tests.dir}" inheritAll="false"/>
|
2009-06-16 05:52:23 +00:00
|
|
|
</target>
|
|
|
|
|
2013-11-06 22:09:21 +00:00
|
|
|
<!-- testall -->
|
|
|
|
<path id="javac.classpathref.testall">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
<pathelement location="${icu4j.test-framework.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.testall" depends="_all.core, _all.test-framework">
|
|
|
|
<ant dir="${icu4j.testall.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2009-06-16 05:52:23 +00:00
|
|
|
<!-- build-tools -->
|
2010-06-11 17:02:51 +00:00
|
|
|
<path id="javac.classpathref.build-tools">
|
|
|
|
<pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
|
|
|
|
</path>
|
2009-06-16 05:52:23 +00:00
|
|
|
|
|
|
|
<target name="_all.build-tools">
|
|
|
|
<ant dir="${icu4j.build-tools.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- tools -->
|
|
|
|
<path id="javac.classpathref.tools">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
2009-07-07 19:24:00 +00:00
|
|
|
<pathelement location="${icu4j.collate.jar}"/>
|
2009-07-10 15:05:24 +00:00
|
|
|
<pathelement location="${icu4j.translit.jar}"/>
|
2009-06-16 05:52:23 +00:00
|
|
|
<pathelement location="${icu4j.test-framework.jar}"/>
|
|
|
|
<pathelement location="${icu4j.core-tests.jar}"/>
|
2009-08-20 16:36:31 +00:00
|
|
|
<pathelement location="${icu4j.translit-tests.jar}"/>
|
2009-06-16 05:52:23 +00:00
|
|
|
</path>
|
|
|
|
|
2009-08-20 16:36:31 +00:00
|
|
|
<target name="_all.tools" depends="_all.core, _all.collate, _all.translit, _all.test-framework, _all.core-tests, _all.translit-tests">
|
2009-06-16 05:52:23 +00:00
|
|
|
<ant dir="${icu4j.tools.dir}" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- demos -->
|
|
|
|
<path id="javac.classpathref.demos">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
2009-07-10 15:05:24 +00:00
|
|
|
<pathelement location="${icu4j.translit.jar}"/>
|
2009-06-16 05:52:23 +00:00
|
|
|
<pathelement location="${icu4j.charset.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
2009-07-10 15:05:24 +00:00
|
|
|
<target name="_all.demos" depends="_all.core, _all.translit, _all.charset">
|
2009-06-16 05:52:23 +00:00
|
|
|
<ant dir="${icu4j.demos.dir}" inheritAll="false"/>
|
2011-10-17 21:10:07 +00:00
|
|
|
</target>
|
2011-07-08 20:46:34 +00:00
|
|
|
|
2011-10-17 21:10:07 +00:00
|
|
|
<!-- samples -->
|
|
|
|
<path id="javac.classpathref.samples">
|
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
<pathelement location="${icu4j.collate.jar}"/>
|
|
|
|
<pathelement location="${icu4j.translit.jar}"/>
|
|
|
|
<pathelement location="${icu4j.charset.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="_all.samples" depends="_all.core, _all.collate, _all.translit, _all.charset">
|
|
|
|
<ant dir="${icu4j.samples.dir}" inheritAll="false"/>
|
2009-06-16 05:52:23 +00:00
|
|
|
</target>
|
2011-10-17 21:10:07 +00:00
|
|
|
|
|
|
|
<!-- perf -->
|
|
|
|
<path id="javac.classpathref.perf">
|
2011-07-08 20:46:34 +00:00
|
|
|
<pathelement location="${icu4j.core.jar}"/>
|
|
|
|
<pathelement location="${icu4j.charset.jar}"/>
|
|
|
|
<pathelement location="${icu4j.collate.jar}"/>
|
|
|
|
<pathelement location="${icu4j.tools.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
2009-06-16 05:52:23 +00:00
|
|
|
|
2009-07-07 19:24:00 +00:00
|
|
|
</project>
|