2 *******************************************************************************
\r
3 * Copyright (C) 2009, International Business Machines Corporation and *
\r
4 * others. All Rights Reserved. *
\r
5 *******************************************************************************
\r
7 <project name="common-targets" basedir=".">
\r
8 <dirname property="common-targets.dir" file="${ant.file.common-targets}"/>
\r
9 <property file="${common-targets.dir}/locations.properties"/>
\r
10 <property file="${common-targets.dir}/common.properties"/>
\r
12 <!-- common targets -->
\r
14 <target name="@clean">
\r
15 <delete dir="${out.dir}"/>
\r
18 <target name="@compile">
\r
19 <echo message="--- java compiler arguments ------------------------"/>
\r
20 <echo message="source dir: ${basedir}/${src.dir}"/>
\r
21 <echo message="output dir: ${basedir}/${bin.dir}"/>
\r
22 <echo message="classpath: ${toString:javac.classpathref}"/>
\r
23 <echo message="source: ${javac.source}"/>
\r
24 <echo message="target: ${javac.target}"/>
\r
25 <echo message="debug: ${javac.debug}"/>
\r
26 <echo message="encoding: ${javac.encoding}"/>
\r
27 <echo message="compiler arg: ${javac.compilerarg}"/>
\r
28 <echo message="----------------------------------------------------"/>
\r
30 <mkdir dir="${bin.dir}"/>
\r
33 destdir="${bin.dir}"
\r
34 classpathref="javac.classpathref"
\r
35 source="${javac.source}"
\r
36 target="${javac.target}"
\r
37 debug="${javac.debug}">
\r
38 <compilerarg value="${javac.compilerarg}"/>
\r
42 <target name="@copy">
\r
43 <mkdir dir="${bin.dir}"/>
\r
44 <copy todir="${bin.dir}">
\r
45 <fileset dir="${src.dir}" defaultexcludes="yes">
\r
46 <exclude name="**/*.java"/>
\r
51 <target name="@jar">
\r
52 <mkdir dir="${jar.dir}"/>
\r
54 <copy file="manifest.stub" todir="${out.dir}">
\r
56 <filter token="SPECVERSION" value="${jar.spec.version}"/>
\r
57 <filter token="IMPLVERSION" value="${jar.impl.version}"/>
\r
58 <filter token="COPYRIGHT" value="${jar.copyright.info}"/>
\r
62 <jar jarfile="${jar.file}" manifest="${out.dir}/manifest.stub" compress="true">
\r
63 <fileset dir="${bin.dir}" includes="**/*"/>
\r
64 <fileset dir="${shared.dir}/licenses">
\r
65 <include name="license.html"/>
\r
66 <include name="unicode-license.txt"/>
\r
71 <target name="@build-all">
\r
72 <antcall target="_all.${ant.project.name}"/>
\r
75 <!-- Dependencies -->
\r
78 <path id="javac.classpathref.collate">
\r
79 <pathelement location="${icu4j.core.jar}"/>
\r
82 <target name="_all.collate" depends="_all.core">
\r
83 <ant dir="${icu4j.collate.dir}" inheritAll="false"/>
\r
87 <path id="javac.classpathref.core"/>
\r
89 <target name="_all.core">
\r
90 <ant dir="${icu4j.core.dir}" inheritAll="false"/>
\r
94 <path id="javac.classpathref.charset">
\r
95 <pathelement location="${icu4j.core.jar}"/>
\r
98 <target name="_all.charset" depends="_all.core">
\r
99 <ant dir="${icu4j.charset.dir}" inheritAll="false"/>
\r
103 <path id="javac.classpathref.currdata">
\r
104 <pathelement location="${icu4j.core.jar}"/>
\r
107 <target name="_all.currdata" depends="_all.core">
\r
108 <ant dir="${icu4j.currdata.dir}" inheritAll="false"/>
\r
112 <path id="javac.classpathref.langdata">
\r
113 <pathelement location="${icu4j.core.jar}"/>
\r
116 <target name="_all.langdata" depends="_all.core">
\r
117 <ant dir="${icu4j.langdata.dir}" inheritAll="false"/>
\r
121 <path id="javac.classpathref.localespi">
\r
122 <pathelement location="${icu4j.core.jar}"/>
\r
123 <pathelement location="${icu4j.collate.jar}"/>
\r
126 <target name="_all.localespi" depends="_all.core, _all.collate">
\r
127 <ant dir="${icu4j.localespi.dir}" inheritAll="false"/>
\r
130 <!-- regiondata -->
\r
131 <path id="javac.classpathref.regiondata">
\r
132 <pathelement location="${icu4j.core.jar}"/>
\r
135 <target name="_all.regiondata" depends="_all.core">
\r
136 <ant dir="${icu4j.regiondata.dir}" inheritAll="false"/>
\r
140 <path id="javac.classpathref.translit">
\r
141 <pathelement location="${icu4j.core.jar}"/>
\r
142 <pathelement location="${icu4j.translit.jar}"/>
\r
145 <target name="_all.translit" depends="_all.core">
\r
146 <ant dir="${icu4j.translit.dir}" inheritAll="false"/>
\r
149 <!-- test-framework -->
\r
150 <path id="javac.classpathref.test-framework">
\r
151 <pathelement location="${icu4j.core.jar}"/>
\r
154 <target name="_all.test-framework" depends="_all.core">
\r
155 <ant dir="${icu4j.test-framework.dir}" inheritAll = "false"/>
\r
158 <!-- core-tests -->
\r
159 <path id="javac.classpathref.core-tests">
\r
160 <pathelement location="${icu4j.core.jar}"/>
\r
161 <pathelement location="${icu4j.test-framework.jar}"/>
\r
164 <target name="_all.core-tests" depends="_all.core, _all.test-framework">
\r
165 <ant dir="${icu4j.core-tests.dir}" inheritAll="false"/>
\r
168 <!-- collate-tests -->
\r
169 <path id="javac.classpathref.collate-tests">
\r
170 <pathelement location="${icu4j.core.jar}"/>
\r
171 <pathelement location="${icu4j.collate.jar}"/>
\r
172 <pathelement location="${icu4j.test-framework.jar}"/>
\r
175 <target name="_all.collate-tests" depends="_all.core, _all.collate, _all.test-framework">
\r
176 <ant dir="${icu4j.collate-tests.dir}" inheritAll="false"/>
\r
179 <!-- charset-tests -->
\r
180 <path id="javac.classpathref.charset-tests">
\r
181 <pathelement location="${icu4j.core.jar}"/>
\r
182 <pathelement location="${icu4j.charset.jar}"/>
\r
183 <pathelement location="${icu4j.test-framework.jar}"/>
\r
186 <target name="_all.charset-tests" depends="_all.core, _all.charset, _all.test-framework">
\r
187 <ant dir="${icu4j.charset-tests.dir}" inheritAll="false"/>
\r
190 <!-- localespi-tests -->
\r
191 <path id="javac.classpathref.localespi-tests">
\r
192 <pathelement location="${icu4j.core.jar}"/>
\r
193 <pathelement location="${icu4j.collate.jar}"/>
\r
194 <pathelement location="${icu4j.localespi.jar}"/>
\r
195 <pathelement location="${icu4j.test-framework.jar}"/>
\r
198 <target name="_all.localespi-tests" depends="_all.core, _all.collate, _all.localespi, _all.test-framework">
\r
199 <ant dir="${icu4j.localespi-tests.dir}" inheritAll="false"/>
\r
202 <!-- packaging-tests -->
\r
203 <path id="javac.classpathref.packaging-tests">
\r
204 <pathelement location="${icu4j.core.jar}"/>
\r
205 <pathelement location="${icu4j.charset.jar}"/>
\r
206 <pathelement location="${icu4j.test-framework.jar}"/>
\r
209 <target name="_all.packaging-tests" depends="_all.core, _all.charset, _all.test-framework">
\r
210 <ant dir="${icu4j.packaging-tests.dir}" inheritAll="false"/>
\r
213 <!-- translit-tests -->
\r
214 <path id="javac.classpathref.translit-tests">
\r
215 <pathelement location="${icu4j.core.jar}"/>
\r
216 <pathelement location="${icu4j.translit.jar}"/>
\r
217 <pathelement location="${icu4j.test-framework.jar}"/>
\r
220 <target name="_all.translit-tests" depends="_all.core, _all.translit, _all.test-framework">
\r
221 <ant dir="${icu4j.translit-tests.dir}" inheritAll="false"/>
\r
224 <!-- build-tools -->
\r
225 <path id="javac.classpathref.build-tools"/>
\r
227 <target name="_all.build-tools">
\r
228 <ant dir="${icu4j.build-tools.dir}" inheritAll="false"/>
\r
232 <path id="javac.classpathref.tools">
\r
233 <pathelement location="${icu4j.core.jar}"/>
\r
234 <pathelement location="${icu4j.collate.jar}"/>
\r
235 <pathelement location="${icu4j.translit.jar}"/>
\r
236 <pathelement location="${icu4j.test-framework.jar}"/>
\r
237 <pathelement location="${icu4j.core-tests.jar}"/>
\r
238 <pathelement location="${icu4j.translit-tests.jar}"/>
\r
241 <target name="_all.tools" depends="_all.core, _all.collate, _all.translit, _all.test-framework, _all.core-tests, _all.translit-tests">
\r
242 <ant dir="${icu4j.tools.dir}" inheritAll="false"/>
\r
246 <path id="javac.classpathref.demos">
\r
247 <pathelement location="${icu4j.core.jar}"/>
\r
248 <pathelement location="${icu4j.translit.jar}"/>
\r
249 <pathelement location="${icu4j.charset.jar}"/>
\r
252 <target name="_all.demos" depends="_all.core, _all.translit, _all.charset">
\r
253 <ant dir="${icu4j.demos.dir}" inheritAll="false"/>
\r