2 *******************************************************************************
3 * Copyright (C) 2009-2011, International Business Machines Corporation and *
4 * others. All Rights Reserved. *
5 *******************************************************************************
7 <project name="common-targets" basedir=".">
8 <dirname property="common-targets.dir" file="${ant.file.common-targets}"/>
9 <property file="${common-targets.dir}/locations.properties"/>
10 <property file="${common-targets.dir}/common.properties"/>
11 <property environment="env"/>
13 <!-- common targets -->
15 <target name="@clean">
16 <delete dir="${out.dir}"/>
19 <target name="@compile">
20 <echo message="--- java compiler arguments ------------------------"/>
21 <echo message="source dir: ${basedir}/${src.dir}"/>
22 <echo message="output dir: ${basedir}/${bin.dir}"/>
23 <echo message="classpath: ${toString:javac.classpathref}"/>
24 <echo message="source: ${javac.source}"/>
25 <echo message="target: ${javac.target}"/>
26 <echo message="debug: ${javac.debug}"/>
27 <echo message="encoding: ${java.src.encoding}"/>
28 <echo message="compiler arg: ${javac.compilerarg}"/>
29 <echo message="----------------------------------------------------"/>
31 <mkdir dir="${bin.dir}"/>
35 classpathref="javac.classpathref"
36 source="${javac.source}"
37 target="${javac.target}"
38 debug="${javac.debug}"
39 encoding="${java.src.encoding}"
40 includeAntRuntime="no">
41 <compilerarg value="${javac.compilerarg}"/>
46 <mkdir dir="${bin.dir}"/>
47 <copy todir="${bin.dir}">
48 <fileset dir="${src.dir}" defaultexcludes="yes">
49 <exclude name="**/*.java"/>
55 <mkdir dir="${jar.dir}"/>
57 <copy file="manifest.stub" todir="${out.dir}">
59 <filter token="SPECVERSION" value="${jar.spec.version}"/>
60 <filter token="IMPLVERSION" value="${jar.impl.version}"/>
61 <filter token="COPYRIGHT" value="${jar.copyright.info}"/>
62 <filter token="EXECENV" value="${jar.exec.env}"/>
66 <jar jarfile="${jar.dir}/${jar.name}" manifest="${out.dir}/manifest.stub" compress="true">
67 <fileset dir="${bin.dir}" includes="**/*"/>
68 <fileset dir="${shared.dir}/licenses">
69 <include name="license.html"/>
70 <include name="unicode-license.txt"/>
75 <target name="@src-jar">
76 <mkdir dir="${jar.dir}"/>
77 <jar jarfile="${jar.dir}/${src.jar.name}" compress="true">
78 <fileset dir="${src.dir}" includes="**/*.java"/>
79 <fileset dir="${shared.dir}/licenses">
80 <include name="license.html"/>
81 <include name="unicode-license.txt"/>
86 <target name="@build-all">
87 <antcall target="_all.${ant.project.name}"/>
90 <target name="@full-locale-names">
91 <echo message="Generating ${res.dir}/fullLocaleNames.lst"/>
92 <pathconvert pathsep="${line.separator}" property="full.locale.names">
93 <fileset dir="${res.dir}">
94 <include name="??.res"/>
95 <include name="??_*.res"/>
96 <include name="???.res"/>
97 <include name="???_*.res"/>
98 <include name="root.res"/>
99 <exclude name="res_index.res"/>
103 <globmapper from="*.res" to="*"/>
106 <echo message="${full.locale.names}" file="${res.dir}/fullLocaleNames.lst"/>
109 <!-- Dependencies -->
112 <path id="javac.classpathref.collate">
113 <pathelement location="${icu4j.core.jar}"/>
116 <target name="_all.collate" depends="_all.core">
117 <ant dir="${icu4j.collate.dir}" inheritAll="false"/>
121 <path id="javac.classpathref.core"/>
123 <target name="_all.core">
124 <ant dir="${icu4j.core.dir}" inheritAll="false"/>
128 <path id="javac.classpathref.charset">
129 <pathelement location="${icu4j.core.jar}"/>
132 <target name="_all.charset" depends="_all.core">
133 <ant dir="${icu4j.charset.dir}" inheritAll="false"/>
137 <path id="javac.classpathref.currdata">
138 <pathelement location="${icu4j.core.jar}"/>
141 <target name="_all.currdata" depends="_all.core">
142 <ant dir="${icu4j.currdata.dir}" inheritAll="false"/>
146 <path id="javac.classpathref.langdata">
147 <pathelement location="${icu4j.core.jar}"/>
150 <target name="_all.langdata" depends="_all.core">
151 <ant dir="${icu4j.langdata.dir}" inheritAll="false"/>
155 <path id="javac.classpathref.localespi">
156 <pathelement location="${icu4j.core.jar}"/>
157 <pathelement location="${icu4j.collate.jar}"/>
160 <target name="_all.localespi" depends="_all.core, _all.collate">
161 <ant dir="${icu4j.localespi.dir}" inheritAll="false"/>
165 <path id="javac.classpathref.regiondata">
166 <pathelement location="${icu4j.core.jar}"/>
169 <target name="_all.regiondata" depends="_all.core">
170 <ant dir="${icu4j.regiondata.dir}" inheritAll="false"/>
174 <path id="javac.classpathref.translit">
175 <pathelement location="${icu4j.core.jar}"/>
176 <pathelement location="${icu4j.translit.jar}"/>
179 <target name="_all.translit" depends="_all.core">
180 <ant dir="${icu4j.translit.dir}" inheritAll="false"/>
183 <!-- test-framework -->
184 <path id="javac.classpathref.test-framework">
185 <pathelement location="${icu4j.core.jar}"/>
188 <target name="_all.test-framework" depends="_all.core">
189 <ant dir="${icu4j.test-framework.dir}" inheritAll = "false"/>
193 <path id="javac.classpathref.core-tests">
194 <pathelement location="${icu4j.core.jar}"/>
195 <pathelement location="${icu4j.test-framework.jar}"/>
198 <target name="_all.core-tests" depends="_all.core, _all.test-framework">
199 <ant dir="${icu4j.core-tests.dir}" inheritAll="false"/>
202 <!-- collate-tests -->
203 <path id="javac.classpathref.collate-tests">
204 <pathelement location="${icu4j.core.jar}"/>
205 <pathelement location="${icu4j.collate.jar}"/>
206 <pathelement location="${icu4j.test-framework.jar}"/>
209 <target name="_all.collate-tests" depends="_all.core, _all.collate, _all.test-framework">
210 <ant dir="${icu4j.collate-tests.dir}" inheritAll="false"/>
213 <!-- charset-tests -->
214 <path id="javac.classpathref.charset-tests">
215 <pathelement location="${icu4j.core.jar}"/>
216 <pathelement location="${icu4j.charset.jar}"/>
217 <pathelement location="${icu4j.test-framework.jar}"/>
220 <target name="_all.charset-tests" depends="_all.core, _all.charset, _all.test-framework">
221 <ant dir="${icu4j.charset-tests.dir}" inheritAll="false"/>
224 <!-- localespi-tests -->
225 <path id="javac.classpathref.localespi-tests">
226 <pathelement location="${icu4j.core.jar}"/>
227 <pathelement location="${icu4j.collate.jar}"/>
228 <pathelement location="${icu4j.localespi.jar}"/>
229 <pathelement location="${icu4j.test-framework.jar}"/>
232 <target name="_all.localespi-tests" depends="_all.core, _all.collate, _all.localespi, _all.test-framework">
233 <ant dir="${icu4j.localespi-tests.dir}" inheritAll="false"/>
236 <!-- packaging-tests -->
237 <path id="javac.classpathref.packaging-tests">
238 <pathelement location="${icu4j.core.jar}"/>
239 <pathelement location="${icu4j.charset.jar}"/>
240 <pathelement location="${icu4j.test-framework.jar}"/>
243 <target name="_all.packaging-tests" depends="_all.core, _all.charset, _all.test-framework">
244 <ant dir="${icu4j.packaging-tests.dir}" inheritAll="false"/>
247 <!-- translit-tests -->
248 <path id="javac.classpathref.translit-tests">
249 <pathelement location="${icu4j.core.jar}"/>
250 <pathelement location="${icu4j.translit.jar}"/>
251 <pathelement location="${icu4j.test-framework.jar}"/>
254 <target name="_all.translit-tests" depends="_all.core, _all.translit, _all.test-framework">
255 <ant dir="${icu4j.translit-tests.dir}" inheritAll="false"/>
259 <path id="javac.classpathref.build-tools">
260 <pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
263 <target name="_all.build-tools">
264 <ant dir="${icu4j.build-tools.dir}" inheritAll="false"/>
268 <path id="javac.classpathref.tools">
269 <pathelement location="${icu4j.core.jar}"/>
270 <pathelement location="${icu4j.collate.jar}"/>
271 <pathelement location="${icu4j.translit.jar}"/>
272 <pathelement location="${icu4j.test-framework.jar}"/>
273 <pathelement location="${icu4j.core-tests.jar}"/>
274 <pathelement location="${icu4j.translit-tests.jar}"/>
277 <target name="_all.tools" depends="_all.core, _all.collate, _all.translit, _all.test-framework, _all.core-tests, _all.translit-tests">
278 <ant dir="${icu4j.tools.dir}" inheritAll="false"/>
282 <path id="javac.classpathref.demos">
283 <pathelement location="${icu4j.core.jar}"/>
284 <pathelement location="${icu4j.translit.jar}"/>
285 <pathelement location="${icu4j.charset.jar}"/>
288 <target name="_all.demos" depends="_all.core, _all.translit, _all.charset">
289 <ant dir="${icu4j.demos.dir}" inheritAll="false"/>