-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild_winformula.xml
467 lines (406 loc) · 21.8 KB
/
build_winformula.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
<project name="topcoder" default="main" basedir=".">
<property environment="env"/>
<property name="Name" value="TopCoder"/>
<property name="build" value="build"/>
<property name="war.dir" value="${build}/wars"/>
<property name="tools.dir" value="${build}/tools"/>
<property name="ear.dir" value="${build}/ears"/>
<property name="ejb_jars" value="${build}/ejb_jars"/>
<property name="classes" value="${build}/classes"/>
<property name="testclasses" value="${build}/testcases"/>
<property name="bin" value="lib/bin"/>
<property name="shared" value="../shared/src/main"/>
<property name="resources" value="resources"/>
<property name="lib.dir" value="lib"/>
<property name="jars.dir" value="${lib.dir}/jars"/>
<property name="jive.dir" value="lib/jars/jive"/>
<property name="struts.dir" value="${lib.dir}/jakarta-struts-1.1/lib"/>
<property name="src.dir" value="src"/>
<property name="shared.build" value="${basedir}/../shared"/>
<property name="global-dist.dir" value="${basedir}/../dist/artifacts"/>
<property name="java" value="${src.dir}/main"/>
<property name="shared.jar" value="${bin}/shared.jar"/>
<property name="jboss_home" value="${env.JBOSS_HOME}"/>
<property name="jboss_deploy" value="${jboss_home}/server/winformula/deploy"/>
<property name="jboss_lib" value="${jboss_home}/server/winformula/lib"/>
<property name="jboss_conf" value="${jboss_home}/server/winformula/conf"/>
<property name="testjava" value="${src.dir}/testcases"/>
<property name="common.jar" value="${bin}/tcwebcommon.jar"/>
<property name="tccache.jar" value="${jars.dir}/tcs/tc_cache/1.0.0/tc_cache.jar"/>
<property name="build.javadocs" value="${build}/javadocs"/>
<property name="deprecation" value="true"/>
<property name="debug" value="true"/>
<property name="junitsummary" value="on"/>
<target name="main" depends="compile">
</target>
<path id="class.path">
<pathelement location="${classes}"/>
<pathelement location="${testclasses}"/>
<pathelement location="${resources}"/>
<pathelement location="${resources}/hibernate"/>
<pathelement location="${shared.jar}"/>
<pathelement location="${tccache.jar}"/>
<pathelement location="${jars.dir}/log4j-1.2.7.jar"/>
<pathelement location="${jars.dir}/ifxjdbc.jar"/>
<pathelement location="${jars.dir}/activation.jar"/>
<pathelement location="${jars.dir}/jboss/javax.servlet.jar"/>
<pathelement location="${jars.dir}/jboss/javax.servlet.jsp.jar"/>
<pathelement location="${jars.dir}/jboss/jbossall-client.jar"/>
<pathelement location="${jars.dir}/jboss/xalan.jar"/>
<pathelement location="${jars.dir}/jboss/xercesImpl.jar"/>
<pathelement location="${jars.dir}/jboss/xml-apis.jar"/>
<pathelement location="${jars.dir}/jboss/mail.jar"/>
<pathelement location="${jars.dir}/jboss/jboss-system.jar"/>
<pathelement location="${jars.dir}/jboss/jboss-cache.jar"/>
<pathelement location="${jars.dir}/jboss/jgroups.jar"/>
<pathelement location="${jars.dir}/httpunit.jar"/>
<pathelement location="${jars.dir}/axis.jar"/>
<pathelement location="${jive.dir}/jivebase.jar"/>
<pathelement location="${jive.dir}/jiveforums.jar"/>
<pathelement location="${jive.dir}/xwork.jar"/>
<pathelement location="${jive.dir}/htmlparser.jar"/>
<!-- TCS Components -->
<pathelement location="${jars.dir}/tcs/configuration_manager/2.1.5/configuration_manager.jar"/>
<pathelement location="${jars.dir}/object_formatter.jar"/>
<pathelement location="${jars.dir}/idgenerator.jar"/>
<pathelement location="${jars.dir}/tcs/id_generator/3.0/id_generator.jar"/>
<pathelement location="${jars.dir}/tcs/db_connection_factory/1.0/db_connection_factory.jar"/>
<pathelement location="${jars.dir}/tcs/file_upload/2.0.2.0/file_upload.jar"/>
<pathelement location="${jars.dir}/tcs/json_object/1.0/json_object.jar"/>
<!-- <pathelement location="${jars.dir}/tcsUtil.jar"/>-->
<pathelement location="${jars.dir}/tcs/base_exception.jar"/>
<!-- hibernate files -->
<pathelement location="${jars.dir}/hibernate-3.2/hibernate3.jar"/>
<pathelement location="${jars.dir}/hibernate-3.2/commons-logging-1.0.4.jar"/>
<pathelement location="${jars.dir}/hibernate-3.2/ehcache-1.2.3.jar"/>
<pathelement location="${jive.dir}/velocity-dep.jar"/>
<pathelement location="${jars.dir}/hibernate-3.2/cglib-2.1.3.jar"/>
<pathelement location="${jars.dir}/hibernate-3.2/asm.jar"/>
<pathelement location="${jars.dir}/hibernate-3.2/ant-antlr-1.6.5.jar"/>
<pathelement location="${jars.dir}/hibernate-3.2/antlr-2.7.6.jar"/>
<pathelement location="${jars.dir}/hibernate-annotations-3.3.0.GA/hibernate-commons-annotations.jar"/>
<pathelement location="${jars.dir}/hibernate-annotations-3.3.0.GA/hibernate-annotations.jar"/>
<pathelement location="${jars.dir}/hibernate-annotations-3.3.0.GA/ejb3-persistence.jar"/>
<!-- Long contest dependencies -->
<pathelement location="${jars.dir}/TestServices.jar"/>
<pathelement location="${jars.dir}/asyncservices.jar"/>
<!-- app side dependencies...get rid of this if possible it's bad long contest design -->
<pathelement location="${jars.dir}/tc.jar"/>
</path>
<!-- adding this here because i can't figure out how to use the above path element in other path elements-->
<property name="class.path" refid="class.path"/>
<target name="init">
<mkdir dir="${classes}"/>
<mkdir dir="${testclasses}"/>
<mkdir dir="${bin}"/>
<mkdir dir="${ejb_jars}"/>
<mkdir dir="${war.dir}"/>
<mkdir dir="${ear.dir}"/>
<mkdir dir="${tools.dir}"/>
</target>
<target name="compile_common" depends="init" unless="compile_common_set">
<ant antfile="build_common.xml" target="build-dist"/>
<property name="compile_common_set" value="true"/>
</target>
<target name="compile" depends="init,compile_common" unless="compile_set">
<available property="jdk1.4+" classname="java.nio.ByteBuffer"/>
<javac
srcdir="${java}"
destdir="${classes}"
classpathref="class.path"
deprecation="${deprecation}"
debug="${debug}"
source="1.5"
target="1.5"
>
<include name="com/topcoder/ejb/**"/>
<include name="com/topcoder/security/**"/>
<include name="com/topcoder/web/codinginterface/*.java"/>
<include name="com/topcoder/web/ejb/BaseEJB.java"/>
<include name="com/topcoder/web/ejb/forums/**"/>
<include name="com/topcoder/web/ejb/messagehistory/**"/>
<include name="com/topcoder/web/forums/**"/>
<include name="com/topcoder/web/winformula/**"/>
</javac>
<property name="compile_set" value="true"/>
</target>
<target name="javadocs">
<mkdir dir="${build.javadocs}"/>
<javadoc
packagenames="com.topcoder.common.*,com.topcoder.ejb.*,com.topcoder.security.*,com.topcoder.utilities.*,com.topcoder.web.*"
sourcepath="${java}"
classpathref="class.path"
destdir="${build.javadocs}"
windowtitle="${Name} API"
doctitle="${Name} API"
maxmemory="256M"
>
</javadoc>
</target>
<target name="clean">
<!-- kill the entire build dir -->
<delete dir="${build}"/>
<delete dir="${bin}"/>
</target>
<target name="package-EJB-MessageHistoryBean" depends="compile">
<jar jarfile="${ejb_jars}/messagehistory.jar">
<zipfileset dir="${classes}" includes="com/topcoder/web/ejb/BaseEJB.class"/>
<zipfileset dir="${classes}" includes="com/topcoder/web/ejb/messagehistory/*.class"/>
<metainf dir="${java}/com/topcoder/web/ejb/messagehistory" includes="*.xml"/>
</jar>
</target>
<target name="package-EJB-ForumPollBean" depends="compile">
<jar jarfile="${ejb_jars}/forumpoll.jar">
<zipfileset dir="${classes}" includes="com/topcoder/web/ejb/BaseEJB.class"/>
<zipfileset dir="${classes}" includes="com/topcoder/web/ejb/forumpoll/*.class"/>
<metainf dir="${java}/com/topcoder/web/ejb/forumpoll" includes="*.xml"/>
</jar>
</target>
<target name="package-EJB-ForumsBean" depends="compile">
<jar jarfile="${ejb_jars}/forums.jar">
<zipfileset dir="${classes}" includes="com/topcoder/web/ejb/BaseEJB.class"/>
<zipfileset dir="${classes}" includes="com/topcoder/web/ejb/forums/*.class"/>
<metainf dir="${java}/com/topcoder/web/ejb/forums" includes="*.xml"/>
</jar>
</target>
<target name="package-predictionHandler" depends="compile">
<jar
jarfile="${ejb_jars}/prediction-handler.jar"
basedir="${classes}"
includes="com/topcoder/web/winformula/algorithm/eventhandler/**">
<metainf dir="${java}/com/topcoder/web/winformula/algorithm/eventhandler" includes="*.xml"/>
</jar>
</target>
<target name="war-winformula" depends="package-winformula-jar">
<war warfile="${war.dir}/winformula.war" webxml="${resources}/winformula/web.xml">
<webinf dir="${resources}/taglib">
<include name="tc-webtags.tld"/>
<include name="nav.tld"/>
<include name="rsc-taglib.tld"/>
<include name="winformula.tld"/>
</webinf>
<webinf dir="${java}/com/topcoder/web/winformula/view/">
<include name="tags/*.tag"/>
</webinf>
<fileset dir="${java}/com/topcoder/web/winformula/view">
<include name="**/*.jsp"/>
</fileset>
<fileset dir="${java}/com/topcoder/web/forums/view/winformula">
<include name="*.*"/>
</fileset>
<fileset dir="${java}/com/topcoder/web/jsp">
<include name="style.jsp"/>
<include name="date_time.jsp"/>
<include name="script.jsp"/>
</fileset>
<webinf dir="${resources}/winformula">
<include name="jboss-web.xml"/>
</webinf>
<classes dir="${resources}/winformula">
<include name="hibernate.cfg.xml"/>
</classes>
<classes dir="${resources}/hibernate">
<include name="com/topcoder/web/common/model/**/*.xml"/>
<include name="com/topcoder/web/winformula/model/**/*.xml"/>
<include name="com/topcoder/web/common/voting/**/*.xml"/>
</classes>
<lib dir="${jars.dir}">
<include name="jstl.jar"/>
<include name="standard.jar"/>
</lib>
<lib dir="${struts.dir}">
<include name="*.jar"/>
</lib>
<webinf dir="${struts.dir}">
<include name="struts-logic.tld"/>
</webinf>
</war>
<delete file="${jboss_deploy}/winformula.war"/>
<unwar src="${war.dir}/winformula.war" dest="${jboss_deploy}/winformula.war/" overwrite="yes"/>
<delete dir="${jboss_deploy}/winformula.war/META-INF"/>
</target>
<target name="package-winformula-jar" depends="compile">
<jar jarfile="${bin}/winformula.jar">
<fileset dir="${classes}">
<include name="com/topcoder/web/codinginterface/*.class"/>
<include name="com/topcoder/web/winformula/**/*.class"/>
<include name="com/topcoder/web/forums/**/*.class"/>
</fileset>
</jar>
</target>
<target name="tools" depends="package-winformula-jar">
<copy file="${bin}/winformula.jar" tofile="${tools.dir}/winformula.jar"/>
<copy todir="${tools.dir}/lib">
<fileset dir="${jars.dir}">
<include name="tc.jar"/>
<include name="TestServices.jar"/>
<include name="asyncservices.jar"/>
</fileset>
</copy>
<copy todir="${tools.dir}/lib" file="${bin}/shared.jar"/>
<copy todir="${tools.dir}/lib" file="${bin}/tcwebcommon.jar"/>
<copy todir="${tools.dir}/lib" file="${tccache.jar}"/>
<copy todir="${tools.dir}/lib" file="${jars.dir}/jedis-2.8.1.jar" />
<copy todir="${tools.dir}/lib" file="${jars.dir}/commons-pool2-2.4.2.jar" />
<copy todir="${tools.dir}/lib" file="${jars.dir}/tcs/configuration_manager/2.1.5/configuration_manager.jar"/>
<copy todir="${tools.dir}/lib" file="${jars.dir}/tcs/db_connection_factory/1.0/db_connection_factory.jar"/>
<copy todir="${tools.dir}/resources">
<fileset dir="${resources}">
<include name="Winformula.properties"/>
</fileset>
</copy>
<copy todir="${tools.dir}/resources/com/topcoder/db/connectionfactory/"
file="${resources}/com/topcoder/db/connectionfactory/DBConnectionFactoryImpl.xml"/>
<copy todir="${tools.dir}/resources/com/topcoder/util/config/"
file="${resources}/com/topcoder/util/config/ConfigManager.properties"/>
</target>
<target name="dist" depends="war-winformula,build-security">
<antcall target="package-TCJive"/>
<antcall target="package-EJB-MessageHistoryBean"/>
<antcall target="package-EJB-ForumsBean"/>
<antcall target="package-predictionHandler"/>
<copy todir="${bin}">
<fileset dir="${jars.dir}">
<include name="tc.jar"/>
<include name="TestServices.jar"/>
<include name="asyncservices.jar"/>
</fileset>
</copy>
</target>
<target name="deploy" depends="dist">
<antcall target="expand"/>
</target>
<target name="expand">
<copy todir="${jboss_lib}" file="${bin}/shared.jar"/>
<copy todir="${jboss_lib}" file="${bin}/tcwebcommon.jar"/>
<copy todir="${jboss_lib}" file="${tccache.jar}"/>
<copy todir="${jboss_lib}" file="${jars.dir}/jedis-2.8.1.jar" />
<copy todir="${jboss_lib}" file="${jars.dir}/commons-pool2-2.4.2.jar" />
<copy todir="${jboss_lib}" file="${bin}/tcjive.jar"/>
<copy todir="${jboss_lib}" file="${bin}/winformula.jar"/>
<copy todir="${jboss_lib}">
<fileset dir="${bin}">
<include name="tc.jar"/>
<include name="TestServices.jar"/>
<include name="asyncservices.jar"/>
</fileset>
</copy>
<copy todir="${jboss_lib}" file="${ejb_jars}/security.jar"/>
<copy todir="${jboss_lib}" file="${jive.dir}/htmlparser.jar"/>
<copy todir="${jboss_lib}" file="${jive.dir}/jivebase.jar"/>
<copy todir="${jboss_lib}" file="${jive.dir}/jiveforums.jar"/>
<copy todir="${jboss_lib}" file="${jive.dir}/velocity-dep.jar"/>
<copy todir="${jboss_lib}" file="${jive.dir}/xwork.jar"/>
<copy todir="${jboss_lib}" file="${jive.dir}/webwork.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/tcs/file_upload/2.0.2.0/file_upload.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/tcs/configuration_manager/2.1.5/configuration_manager.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/tcs/data_validation/1.0/data_validation.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/tcs/file_system_server/1.0/file_system_server.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/tcs/guid_generator/1.0/guid_generator.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/tcs/heartbeat/1.0/heartbeat.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/tcs/ip_server/2.0.1/ip_server.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/tcs/typesafe_enum/1.0/typesafe_enum.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/tcs/db_connection_factory/1.0/db_connection_factory.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/object_formatter.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/ifxjdbc.jar"/>
<!--
<copy todir="${jboss_lib}" file="${jars.dir}/axis.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/commons-discovery-0.2.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/wsdl4j-1.5.1.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/commons-httpclient-3.0.1.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/commons-codec-1.3.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/hibernate-3.2/hibernate3.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/hibernate-3.2/antlr-2.7.6.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/hibernate-annotations-3.3.0.GA/hibernate-commons-annotations.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/hibernate-annotations-3.3.0.GA/hibernate-annotations.jar"/>
<copy todir="${jboss_lib}" file="${jars.dir}/hibernate-annotations-3.3.0.GA/ejb3-persistence.jar"/>
-->
<copy todir="${jboss_deploy}" file="${ejb_jars}/messagehistory.jar"/>
<copy todir="${jboss_deploy}" file="${ejb_jars}/forums.jar"/>
<copy todir="${jboss_deploy}" file="${ejb_jars}/prediction-handler.jar"/>
<copy todir="${jboss_deploy}" file="${ear.dir}/security.ear"/>
<copy todir="${jboss_deploy}" file="${jive.dir}/jive4.war"/>
<copy todir="${jboss_conf}" file="${resources}/forums/winformula/jive_init.xml"/>
<copy todir="${jboss_conf}" file="${resources}/cache.properties"/>
<copy todir="${jboss_conf}" file="${resources}/ApplicationServer.properties"/>
<copy todir="${jboss_conf}" file="${resources}/DBMS.properties"/>
<copy todir="${jboss_conf}" file="${resources}/DataAccess.properties"/>
<copy todir="${jboss_conf}" file="${resources}/EmailEngineConfig.properties"/>
<copy todir="${jboss_conf}" file="${resources}/winformula/ProblemParser.properties"/>
<copy todir="${jboss_conf}" file="${resources}/problem.xsd"/>
<copy todir="${jboss_lib}" file="${jboss_home}/server/all/lib/jgroups.jar"/>
<copy todir="${jboss_lib}" file="${jboss_home}/server/all/lib/jboss-cache-jdk50.jar"/>
<copy todir="${jboss_conf}/com/topcoder/db/connectionfactory/"
file="${resources}/com/topcoder/db/connectionfactory/DBConnectionFactoryImpl.xml"/>
<copy todir="${jboss_conf}/com/topcoder/security/" file="${resources}/com/topcoder/security/Util.properties"/>
<copy todir="${jboss_conf}/com/topcoder/util/config/"
file="${resources}/com/topcoder/util/config/ConfigManager.properties"/>
<copy todir="${jboss_conf}/com/topcoder/servlet/request/"
file="${resources}/com/topcoder/servlet/request/FileUpload.xml"/>
<delete dir="${jboss_deploy}/winformula.war" />
<unwar src="${war.dir}/winformula.war" dest="${jboss_deploy}/winformula.war/" overwrite="yes"/>
<delete dir="${jboss_deploy}/winformula.war/META-INF"/>
<copy todir="${jboss_conf}">
<fileset dir="${resources}">
<include name="Winformula.properties"/>
<include name="winformula/blog.xsl"/>
<include name="winformula/espn.xsl"/>
<include name="winformula/forum.xsl"/>
</fileset>
</copy>
</target>
<target name="package-TCJive" depends="compile">
<jar jarfile="${bin}/tcjive.jar">
<fileset dir="${classes}/">
<include name="com/topcoder/web/forums/model/TCUser.class"/>
<include name="com/topcoder/web/forums/model/TCUserManager.class"/>
<include name="com/topcoder/web/forums/model/Common.class"/>
<include name="com/topcoder/web/forums/model/TCAuthFactory.class"/>
<include name="com/topcoder/web/forums/model/TCAuthToken.class"/>
<include name="com/topcoder/web/forums/util/filter/*.class"/>
</fileset>
<fileset dir="${resources}/forums/filter">
<include name="**/*.properties"/>
</fileset>
</jar>
</target>
<target name="compile_tests" depends="compile">
<javac
srcdir="${testjava}"
destdir="${testclasses}"
classpathref="class.path"
deprecation="${deprecation}"
debug="${debug}"
source="1.5"
target="1.5"
>
<include name="com/topcoder/web/winformula/**"/>
</javac>
</target>
<target name="run_winformula_tests" depends="compile_tests" description="run junit tests">
<junit printsummary="${junitsummary}" fork="yes">
<classpath>
<pathelement location="resources/winformula/"/>
<pathelement path="${class.path}"/>
</classpath>
<formatter type="xml"/>
<test name="com.topcoder.web.winformula.WinformulaTests" todir="${testclasses}"/>
</junit>
<junitreport todir="${testclasses}">
<fileset dir="${testclasses}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${testclasses}/html"/>
</junitreport>
</target>
<target name="deploy-security" depends="build-security">
<copy todir="${jboss_deploy}">
<fileset dir="${ear.dir}">
<include name="security.ear"/>
</fileset>
</copy>
</target>
<target name="build-security">
<ant antfile="build_security.xml" target="build-security"/>
</target>
</project>