1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
<project name="icemobile" default="build.all" xmlns:ice="urn:ICEsoft" > |
18 |
|
19 |
<property file="build.properties"/> |
20 |
|
21 |
<property name="build.dir" location="build"/> |
22 |
<property name="dist.dir" location="dist"/> |
23 |
<property name="docs.jsf.dir" location="docs/jsf"/> |
24 |
<property name="docs.jsp.dir" location="docs/jsp"/> |
25 |
|
26 |
<condition property="release.type.suffix" value="-${release.type}" else=""> |
27 |
<not> |
28 |
<equals arg1="${release.type}" arg2="" trim="true"/> |
29 |
</not> |
30 |
</condition> |
31 |
<property name="bundle.name" |
32 |
value="${product}-${version.primary}.${version.secondary}.${version.tertiary}${release.type.suffix}"/> |
33 |
|
34 |
<property name="bin.bundle.name" value="${bundle.name}-bin"/> |
35 |
<property name="bin.bundle.prefix" value="${bin.bundle.name}/${bundle.dir.name}"/> |
36 |
<property name="bin.bundle.file" |
37 |
location="${dist.dir}/${bin.bundle.name}.zip"/> |
38 |
|
39 |
<property name="src.bundle.name" value="${bundle.name}-src"/> |
40 |
<property name="src.bundle.prefix" value="${src.bundle.name}/${bundle.dir.name}"/> |
41 |
<property name="src.bundle.file" |
42 |
location="${dist.dir}/${src.bundle.name}.zip"/> |
43 |
|
44 |
<property name="compile.source" value="1.5"/> |
45 |
<property name="compile.target" value="1.5"/> |
46 |
<property name="compile.debug" value="true"/> |
47 |
|
48 |
<condition property="jsf.implementation" value="myfaces" else="mojarra"> |
49 |
<isset property="myfaces"/> |
50 |
</condition> |
51 |
|
52 |
<propertyset id="product.info"> |
53 |
<propertyref name="company"/> |
54 |
<propertyref name="product"/> |
55 |
<propertyref name="version.primary"/> |
56 |
<propertyref name="version.secondary"/> |
57 |
<propertyref name="version.tertiary"/> |
58 |
<propertyref name="release.type"/> |
59 |
<propertyref name="build.number"/> |
60 |
<propertyref name="revision"/> |
61 |
</propertyset> |
62 |
|
63 |
<presetdef name="ant" uri="urn:ICEsoft"> |
64 |
<ant inheritall="false"/> |
65 |
</presetdef> |
66 |
|
67 |
<presetdef name="subant" uri="urn:ICEsoft"> |
68 |
<subant inheritall="false" failonerror="true" verbose="true"> |
69 |
<property name="jsf.implementation" value="${jsf.implementation}"/> |
70 |
</subant> |
71 |
</presetdef> |
72 |
|
73 |
<presetdef name="zip" uri="urn:ICEsoft"> |
74 |
<zip duplicate="fail" whenempty="fail"/> |
75 |
</presetdef> |
76 |
|
77 |
<target name="build.all" description="Build ICEmobile project and samples."> |
78 |
<ice:subant target="all"> |
79 |
<fileset dir="./core" includes="build.xml" /> |
80 |
</ice:subant> |
81 |
<ice:subant target="all"> |
82 |
<fileset dir="./jsp" includes="build.xml" /> |
83 |
</ice:subant> |
84 |
<ice:subant target="all"> |
85 |
<fileset dir="./spring" includes="build.xml" /> |
86 |
</ice:subant> |
87 |
<ice:subant target="all"> |
88 |
<fileset dir="./jsf" includes="build.xml" /> |
89 |
</ice:subant> |
90 |
<ice:subant target="all"> |
91 |
<fileset dir="./samples" includes="build.xml" /> |
92 |
</ice:subant> |
93 |
</target> |
94 |
|
95 |
<target name="build.libs" description="Build ICEmobile project libraries."> |
96 |
<ice:subant target="all"> |
97 |
<fileset dir="./core" includes="build.xml" /> |
98 |
</ice:subant> |
99 |
<ice:subant target="all"> |
100 |
<fileset dir="./jsp" includes="build.xml" /> |
101 |
</ice:subant> |
102 |
<ice:subant target="all"> |
103 |
<fileset dir="./spring" includes="build.xml" /> |
104 |
</ice:subant> |
105 |
<ice:subant target="all"> |
106 |
<fileset dir="./jsf" includes="build.xml" /> |
107 |
</ice:subant> |
108 |
</target> |
109 |
|
110 |
<target name="build.bin" > |
111 |
<build.bin.bundle /> |
112 |
</target> |
113 |
|
114 |
|
115 |
<target name="build.jsp" description="Build JSP library."> |
116 |
<ice:subant target="all"> |
117 |
<filelist dir="." files="core, jsp"/> |
118 |
</ice:subant> |
119 |
</target> |
120 |
|
121 |
<target name="build.jsf" description="Build JSF library."> |
122 |
<ice:subant target="all"> |
123 |
<filelist dir="." files="core, jsf"/> |
124 |
</ice:subant> |
125 |
</target> |
126 |
|
127 |
|
128 |
|
129 |
<target name="zip.src"> |
130 |
<zip.src /> |
131 |
</target> |
132 |
|
133 |
<target name="clean.build.all" depends="clean,build.all"/> |
134 |
|
135 |
<target name="build.bin.bundle" depends="build.bin, clean.bin" |
136 |
description="Creates ICEmobile binary bundle."> |
137 |
<zip.bin.bundle/> |
138 |
</target> |
139 |
|
140 |
<target name="build.common"> |
141 |
<ice:subant> |
142 |
<filelist dir="." files="core, jsf, samples"/> |
143 |
</ice:subant> |
144 |
</target> |
145 |
|
146 |
<target name="build.src.bundle" description="Creates ICEmobile source bundle."> |
147 |
<touch file="${src.bundle.file}" mkdirs="true"/> |
148 |
<delete file="${src.bundle.file}"/> |
149 |
|
150 |
<ice:zip destfile="${src.bundle.file}"> |
151 |
<zipfileset dir="." excludes="dist/" prefix="${src.bundle.prefix}"/> |
152 |
</ice:zip> |
153 |
</target> |
154 |
|
155 |
<target name="clean"> |
156 |
<delete dir="${build.dir}"/> |
157 |
<delete dir="${dist.dir}"/> |
158 |
<delete dir="${docs.jsf.dir}"/> |
159 |
<delete dir="${docs.jsp.dir}"/> |
160 |
<delete dir=".sass-cache"/> |
161 |
<ice:subant target="clean"> |
162 |
<filelist dir="." files="core, jsf, jsp, spring, samples, resources"/> |
163 |
</ice:subant> |
164 |
</target> |
165 |
|
166 |
<target name="clean.bin"> |
167 |
<ice:subant target="clean"> |
168 |
<filelist dir="." files="core, jsf, jsp, spring, samples"/> |
169 |
</ice:subant> |
170 |
</target> |
171 |
|
172 |
<macrodef name="zip.bin.bundle" > |
173 |
<attribute name="path" default="."/> |
174 |
<attribute name="bundle.file" default="${bin.bundle.file}"/> |
175 |
<attribute name="zip.bundle.prefix" default="${bin.bundle.prefix}"/> |
176 |
<element name="add.zip.elements" optional="true"/> |
177 |
|
178 |
<sequential> |
179 |
|
180 |
<touch file="@{bundle.file}" mkdirs="true"/> |
181 |
<delete file="@{bundle.file}"/> |
182 |
|
183 |
<ice:zip destfile="@{bundle.file}" update="true"> |
184 |
|
185 |
|
186 |
<zipfileset dir="." prefix="${bin.bundle.prefix}" > |
187 |
<exclude name="dist/"/> |
188 |
<exclude name="client/"/> |
189 |
<exclude name="jsf/"/> |
190 |
<exclude name="jsp/"/> |
191 |
<exclude name="spring/"/> |
192 |
<exclude name="lib/generator/"/> |
193 |
|
194 |
<exclude name="build.xml" /> |
195 |
</zipfileset> |
196 |
|
197 |
<add.zip.elements/> |
198 |
</ice:zip> |
199 |
</sequential> |
200 |
</macrodef> |
201 |
|
202 |
<macrodef name="zip.src"> |
203 |
<attribute name="path" default="."/> |
204 |
<attribute name="zip.bundle.prefix" default="${bin.bundle.prefix}"/> |
205 |
<attribute name="bundle.file" default="${bin.bundle.file}"/> |
206 |
|
207 |
<sequential> |
208 |
<touch file="@{bundle.file}" mkdirs="true"/> |
209 |
<delete file="@{bundle.file}"/> |
210 |
|
211 |
<ice:zip destfile="@{bundle.file}"> |
212 |
<zipfileset dir="@{path}" includes="" |
213 |
excludes="dist/" |
214 |
prefix="@{zip.bundle.prefix}"/> |
215 |
</ice:zip> |
216 |
</sequential> |
217 |
</macrodef> |
218 |
|
219 |
<macrodef name="build.bin.bundle"> |
220 |
<attribute name="path" default="."/> |
221 |
<element name="add.ant.elements" optional="true"/> |
222 |
|
223 |
<sequential> |
224 |
|
225 |
<ice:subant target="all"> |
226 |
<fileset dir="./core" includes="build.xml" /> |
227 |
<propertyset refid="product.info"/> |
228 |
</ice:subant> |
229 |
<ice:subant target="build"> |
230 |
<fileset dir="./jsf" includes="build.xml" /> |
231 |
<propertyset refid="product.info"/> |
232 |
</ice:subant> |
233 |
<ice:subant target="all"> |
234 |
<fileset dir="./jsp" includes="build.xml" /> |
235 |
<propertyset refid="product.info"/> |
236 |
</ice:subant> |
237 |
<ice:subant target="all"> |
238 |
<fileset dir="./spring" includes="build.xml" /> |
239 |
</ice:subant> |
240 |
<ice:subant target="all"> |
241 |
<fileset dir="./samples" includes="build.xml" /> |
242 |
<propertyset refid="product.info"/> |
243 |
</ice:subant> |
244 |
|
245 |
<add.ant.elements/> |
246 |
|
247 |
|
248 |
<subant target="docs" failonerror="true" verbose="true"> |
249 |
<fileset dir="./jsf" includes="build.xml"/> |
250 |
<property name="jsf.implementation" value="${jsf.implementation}"/> |
251 |
</subant> |
252 |
|
253 |
<mkdir dir="${docs.jsf.dir}/tld/"/> |
254 |
<mkdir dir="${docs.jsf.dir}/api/"/> |
255 |
<move file="./jsf/components/component/build/doc/tld" |
256 |
tofile="${docs.jsf.dir}/tld/"/> |
257 |
<move file="./jsf/components/component/build/doc/javadoc" |
258 |
tofile="${docs.jsf.dir}/api/"/> |
259 |
|
260 |
|
261 |
<subant target="tlddoc" failonerror="true" verbose="true"> |
262 |
<fileset dir="./jsp" includes="build.xml"/> |
263 |
</subant> |
264 |
<mkdir dir="${docs.jsp.dir}/tld/"/> |
265 |
<move file="./jsp/build/docs/tld" |
266 |
tofile="${docs.jsp.dir}/tld/"/> |
267 |
|
268 |
</sequential> |
269 |
</macrodef> |
270 |
|
271 |
<macrodef name="build.src.bundle"> |
272 |
<attribute name="path" default="."/> |
273 |
<attribute name="bundle.file" default="${src.bundle.file}"/> |
274 |
<attribute name="bundle.prefix" default="${src.bundle.prefix}"/> |
275 |
<element name="add.zip.elements" optional="true"/> |
276 |
|
277 |
<sequential> |
278 |
<touch file="@{bundle.file}" mkdirs="true"/> |
279 |
<delete file="@{bundle.file}"/> |
280 |
|
281 |
<ice:zip destfile="@{bundle.file}"> |
282 |
<zipfileset dir="@{path}" excludes="dist/" prefix="@{bundle.prefix}"/> |
283 |
<add.zip.elements/> |
284 |
|
285 |
</ice:zip> |
286 |
</sequential> |
287 |
</macrodef> |
288 |
|
289 |
</project> |