-
Notifications
You must be signed in to change notification settings - Fork 157
/
build.xml
633 lines (553 loc) · 30.7 KB
/
build.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
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project>
<project basedir="." default="webapp" name="Agilefant">
<property file="build-user.properties" />
<property file="build.properties" />
<property file="conf/database-mysql5.properties" />
<!-- Clover parameters -->
<property name="clover.jar" location="${basedir}/lib/build/clover.jar" />
<taskdef resource="cloverlib.xml" classpath="${clover.jar}" />
<!-- Configure the custom Ant tasks for the Tomcat Manager application -->
<taskdef name="tomcat-manager-deploy" classname="org.apache.catalina.ant.DeployTask" classpath="${catalina-ant.dir}"/>
<taskdef name="tomcat-manager-list" classname="org.apache.catalina.ant.ListTask" classpath="${catalina-ant.dir}"/>
<taskdef name="tomcat-manager-reload" classname="org.apache.catalina.ant.ReloadTask" classpath="${catalina-ant.dir}"/>
<taskdef name="tomcat-manager-resources" classname="org.apache.catalina.ant.ResourcesTask" classpath="${catalina-ant.dir}"/>
<taskdef name="tomcat-manager-roles" classname="org.apache.catalina.ant.RolesTask" classpath="${catalina-ant.dir}"/>
<taskdef name="tomcat-manager-start" classname="org.apache.catalina.ant.StartTask" classpath="${catalina-ant.dir}"/>
<taskdef name="tomcat-manager-stop" classname="org.apache.catalina.ant.StopTask" classpath="${catalina-ant.dir}"/>
<taskdef name="tomcat-manager-undeploy" classname="org.apache.catalina.ant.UndeployTask" classpath="${catalina-ant.dir}"/>
<target name="init" description="Initializes build script">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.classes}" />
<mkdir dir="${build.webapp}" />
<mkdir dir="${build.test.dir}" />
<mkdir dir="${build.test.classes.dir}" />
<path id="yuicompressor.classpath">
<fileset dir="${lib}/build">
<include name="yuicompressor-*.jar"/>
<include name="YUIAnt.jar"/>
</fileset>
</path>
<path id="compile.classpath">
<fileset dir="${lib}">
<include name="*.jar" />
<include name="build/*.jar" />
</fileset>
</path>
<path id="compile.test.classpath">
<path refid="compile.classpath" />
<pathelement location="${build.classes}" />
<pathelement location="${build.test.classes.dir}" />
<pathelement location="${test.conf.dir}" />
<pathelement path="${clover.jar}" />
</path>
<path id="hibernatetoolslib">
<path refid="compile.classpath" />
<fileset dir="${hibernatetools.dir}">
<include name="*.jar" />
</fileset>
<path location="${build.classes}" />
</path>
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.EnversHibernateToolTask" classpathref="hibernatetoolslib" />
<path id="instr.classpath">
<pathelement location="${build.classes}" />
</path>
<!-- Initialization of JMeter and jChav stress testing framework -->
<property file="conf/classes/messages.properties" />
<tstamp>
<format property="build.id" pattern="dMMyyyy-hhmmss" locale="en" />
</tstamp>
<property description="The location of the install of JMeter" name="jmeter.install.dir" value="/opt/jakarta-jmeter-2.3" />
<property description="The directory containing the jchav jars" name="jchav.libs.dir" value="/opt/jchav-1.1.0" />
<property description="The JMeter test plan script we want to run" name="jmeter.testplan" value="/opt/jakarta-jmeter-2.3/plans/Agilefant_single_user.jmx" />
<property description="The location to store the per run files" name="jmeter.result.dir" value="${test.reports.jmeter}" />
<property description="The resulting file location, make sure this is unique for each build" name="jmeter.result.file" value="${jmeter.result.dir}/result_${struts.agilefantVersionNumber}_${build.id}.xml" />
<property description="The location to generate the html and charts to. " name="jchav.result.dir" value="${test.reports.jchav}" />
<path id="jax-ws">
<fileset dir="${lib}/build/jax-ws">
<include name="*.jar" />
</fileset>
</path>
<taskdef name="schemagen" classname="com.sun.tools.jxc.SchemaGenTask">
<classpath refid="jax-ws"/>
</taskdef>
<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
<classpath refid="jax-ws"/>
</taskdef>
<path id="compile.schema.classpath">
<path refid="compile.classpath" />
<pathelement location="${build.classes}" />
</path>
</target>
<target name="compile" depends="init" description="Compiles source files">
<javac debug="${javac.debug}" destdir="${build.classes}" srcdir="${src}">
<classpath refid="compile.classpath" />
<!-- <compilerarg value="-Xlint:deprecation"/> -->
</javac>
</target>
<target name="make-jar" depends="compile" description="Makes the jar file">
<jar basedir="${build.classes}" includes="**" destfile="${jarFile}" />
</target>
<target name="create-db" depends="compile" description="Creates db using hibernate tools">
<hibernatetool destdir="${build.dir}">
<annotationconfiguration propertyfile="${conf.dir}/database-${database.type}.properties" configurationfile="${conf.dir}/hibernate.cfg.xml" />
<hbm2ddl export="${hbm2ddl.export}" outputfilename="create-db.ddl" />
</hibernatetool>
</target>
<target name="create-ddl" depends="compile" description="Creates db using hibernate tools">
<hibernatetool destdir="${build.dir}">
<annotationconfiguration propertyfile="${conf.dir}/database-${database.type}.properties" configurationfile="${conf.dir}/hibernate.cfg.xml" />
<hbm2ddl export="false" outputfilename="create-db.ddl" />
</hibernatetool>
<concat append="true" destfile="${build.dir}/create-db.ddl">
<filelist dir="${basedir}/doc/sql/">
<file name="db-version.sql"/>
<file name="insert-users.sql"/>
</filelist>
</concat>
</target>
<target name="create-test-db" depends="compile" description="Creates db using hibernate tools">
<hibernatetool destdir="${build.dir}">
<annotationconfiguration propertyfile="${conf.dir}/database-fortests-${database.type}.properties" configurationfile="${conf.dir}/hibernate.cfg.xml" />
<hbm2ddl export="${hbm2ddl.export}" outputfilename="create-db.ddl" />
</hibernatetool>
</target>
<target name="sync-dbs" depends="create-ddl" description="Synchronise agilefant and aeftest databases">
<sql classpath="lib/mysql-connector-java-5.1.7-bin.jar" driver="com.mysql.jdbc.Driver" src="doc/sql/drop-create-databases.sql" url="${hibernate.connection.url}" userid="agilefant" password="agilefant" />
<sql classpath="lib/mysql-connector-java-5.1.7-bin.jar" driver="com.mysql.jdbc.Driver" src="build/create-db.ddl" url="${hibernate.connection.url}" userid="agilefant" password="agilefant" />
<!--<sql classpath="lib/mysql-connector-java-5.1.7-bin.jar" driver="com.mysql.jdbc.Driver" src="doc/sql/insert-users.sql" url="${hibernate.connection.url}" userid="agilefant" password="agilefant" /> -->
</target>
<target name="copy-spring-files" description="Internal target">
<mkdir dir="${destination}/WEB-INF" />
<copy file="${conf.dir}/configuration.properties" tofile="${destination}/WEB-INF/configuration.properties" />
<copy file="${conf.dir}/database-fortests-${database.type}.properties" tofile="${destination}/WEB-INF/database.properties" />
<copy file="${conf.dir}/hibernate.cfg.xml" tofile="${destination}/WEB-INF/hibernate.cfg.xml" />
<copy todir="${destination}">
<fileset dir="${conf.dir}" includes="*.xml" />
</copy>
</target>
<target name="test" depends="compile-tests">
<mkdir dir="${test.conf.dir}/WEB-INF" />
<mkdir dir="${test.reports.junit}" />
<junit fork="true" forkmode="once" dir="${basedir}" printsummary="true">
<jvmarg value="-Xmx512m"/>
<jvmarg value="-Xms512m"/>
<jvmarg value="-XX:PermSize=512m"/>
<jvmarg value="-XX:MaxPermSize=512m"/>
<classpath refid="compile.test.classpath" />
<formatter type="xml" />
<batchtest todir="${test.reports.junit}">
<fileset dir="${test.dir}">
<exclude name="**/TestUtility.java" />
<exclude name="**/SpringEnabledTestCase.java" />
<exclude name="**/SpringTestCase.java" />
<exclude name="**/selenium/*.java" />
<include name="**/*Test.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="test-clover-enable" description="Enables clover">
<clover-setup />
</target>
<target name="test-clover-clean" description="Cleans clover databases">
<clover-clean />
</target>
<target name="test-clover-xmlreport" description="Generate xml clover reports">
<mkdir dir="${test.reports.clover}" />
<clover-report>
<current outfile="${test.reports.clover}/coverage.xml">
<format type="xml" />
</current>
</clover-report>
</target>
<target name="test-clover-htmlreport" depends="clean,test-clover-enable,compile-tests,test" description="Generate html clover reports">
<mkdir dir="${test.reports.clover}" />
<clover-html-report outdir="${test.reports.clover}" title="Agilefant" />
<clover-clean />
</target>
<target name="test-clover-xml-and-html-report" depends="clean,test-clover-enable,compile-tests,test">
<mkdir dir="${test.reports.clover}" />
<clover-report>
<current outfile="${test.reports.clover}/coverage.xml">
<format type="xml" />
</current>
</clover-report>
<clover-html-report outdir="${test.reports.clover}" title="Agilefant" />
<clover-clean />
</target>
<target name="test-checkstyle-xmlreport" description="Generates a report of code convention violations.">
<mkdir dir="${test.reports.checkstyle}" />
<taskdef resource="checkstyletask.properties" classpath="${basedir}/lib/build/checkstyle-all-4.3.jar" />
<checkstyle config="${test.conf.dir}/checkstyle/sun_checks.xml" failureProperty="checkstyle.failure" failOnViolation="false">
<formatter type="xml" tofile="${test.reports.checkstyle}/checkstyle_report.xml" />
<fileset dir="src" includes="**/*.java" />
<fileset dir="test" includes="**/*.java" />
</checkstyle>
</target>
<target name="test-checkstyle-htmlreport" depends="test-checkstyle-xmlreport" description="Generates html report of code convention violations.">
<xslt in="${test.reports.checkstyle}/checkstyle_report.xml" out="${test.reports.checkstyle}/checkstyle_report.html" style="${test.conf.dir}/checkstyle/checkstyle-noframes-sorted.xsl" />
</target>
<target name="test-bamboo" depends="clean,test-clover-enable,compile-tests,test,test-clover-xml-and-html-report,test-clover-clean,test-checkstyle-xmlreport" description="Bamboo uses this target" />
<target name="compile-tests" depends="compile">
<mkdir dir="${build.test.classes.dir}" />
<javac debug="${javac.debug}" destdir="${build.test.classes.dir}" srcdir="${test.dir}">
<classpath refid="compile.test.classpath" />
</javac>
</target>
<target name="drop-create-db" depends="compile" description="Creates db using hibernate tools">
<hibernatetool destdir="${build.dir}">
<annotationconfiguration propertyfile="${conf.dir}/database-${database.type}.properties" configurationfile="${conf.dir}/hibernate.cfg.xml" />
<hbm2ddl drop="true" export="${hbm2ddl.export}" outputfilename="create-db.ddl" />
</hibernatetool>
</target>
<target name="update-db" depends="compile" description="Creates db using hibernate tools">
<hibernatetool destdir="${build.dir}">
<annotationconfiguration propertyfile="${conf.dir}/database-${database.type}.properties" configurationfile="${conf.dir}/hibernate.cfg.xml" />
<hbm2ddl export="${hbm2ddl.export}" outputfilename="create-db.ddl" update="true" />
</hibernatetool>
</target>
<target name="webapp" depends="make-jar" description="Builds webapp">
<copy includeEmptyDirs="true" todir="${build.webapp}">
<fileset dir="${webapp.root}" />
</copy>
<copy todir="${build.webapp}/WEB-INF/">
<fileset dir="${conf.dir}" excludes="database-*.properties" />
</copy>
<copy tofile="${build.webapp}/WEB-INF/database.properties">
<fileset file="${conf.dir}/database-${database.type}.properties" />
</copy>
<copy todir="${build.webapp}/WEB-INF/lib/">
<fileset dir="${lib}">
<include name="*.jar" />
<include name="*.zip" />
<include name="*.txt" />
</fileset>
</copy>
<copy todir="${build.webapp}/WEB-INF/lib/licenses/">
<fileset dir="${lib}/licenses" />
</copy>
<copy todir="${build.webapp}/WEB-INF/lib/">
<fileset file="${jarFile}" />
</copy>
</target>
<target name="deploy-local-web" depends="webapp, concat_javascript" description="Deploys web app to local server without reloading webapp">
<mkdir dir="${deploy.dir.local}" />
<copy todir="${deploy.dir.local}">
<fileset dir="${build.webapp}" />
</copy>
</target>
<target name="deploy-local" depends="deploy-local-web" description="Deploys web app to local server">
<touch file="${deploy.dir.local}/WEB-INF/web.xml" />
</target>
<!-- Deploys the project on local system but does not touch web.xml, therefore Tomcat should not redeploy entire project. -->
<target name="deploy-local-notouch" depends="deploy-local-web" description="Deploys web app to local server">
</target>
<target name="undeploy-local" description="Undeploys web app on local server">
<delete dir="${deploy.dir.local}" />
<delete dir="${catalina.home}/work/Catalina/localhost/${webapp.name}" />
</target>
<target name="clean" description="Removes build directory">
<delete dir="${build.dir}" />
<delete dir="${test.reports.dir}" />
</target>
<target name="javadoc" depends="init" description="Generates Javadocs from source code">
<!-- TODO: Generate docs for taglibs -->
<mkdir dir="${javadoc.dir}" />
<javadoc classpathref="compile.classpath" destdir="${javadoc.dir}" access="private">
<fileset dir="${src}" defaultexcludes="yes">
<include name="**" />
</fileset>
<doctitle>AgilEFant 2007 Javadoc</doctitle>
</javadoc>
</target>
<target name="war" depends="webapp, concat_javascript, concat_css">
<jar basedir="${build.webapp}" includes="**" destfile="${warFile}" />
</target>
<target name="production-war" depends="replace-static-expiration-time, compress-js, concat_css">
<jar basedir="${build.webapp}" includes="**" destfile="${warFile}" />
</target>
<target name="replace_version_number" depends="webapp">
<path id="svnant.libs.path">
<fileset dir="${lib}/build">
<include name="svnant.jar"/>
<include name="svnClientAdapter.jar"/>
</fileset>
</path>
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.libs.path" />
<svn javahl="false">
<!-- src directory is used as the ant task refuses to work on the root folder with Linux platforms -->
<info target="${basedir}/src" />
</svn>
<replaceregexp file="${build.dir}/webapp/WEB-INF/classes/messages.properties"
match="struts.agilefantVersionNumber = (.*)"
replace="struts.agilefantVersionNumber = \1 (r${svn.info.rev})"
byline="true"/>
<replaceregexp file="${build.dir}/webapp/WEB-INF/classes/messages.properties"
match="struts.agilefantReleaseId = (.*)"
replace="struts.agilefantReleaseId = agilefant_revision_${svn.info.rev}"
byline="true"/>
</target>
<!-- <param\-name>expirationTime<\/param\-name>\s*$\s*<param\-value>(\d+)<\/param\-value> -->
<target name="replace-static-expiration-time" depends="webapp">
<replaceregexp file="${build.dir}/webapp/WEB-INF/web.xml" flags="m"
match="<param\-name>expirationTime<\/param\-name>\s*$\s*<param\-value>\d+<\/param\-value>"
replace="<param\-name>expirationTime<\/param\-name><param\-value>31104000<\/param\-value>" />
</target>
<target name="debug-release-zip" depends="clean, compile, concat_javascript, replace_version_number, war, create-ddl" description="Generates release directory">
<mkdir dir="${release.dir}" />
<mkdir dir="${release.dir}/sql-updates" />
<copy file="${warFile}" todir="${release.dir}" />
<copy file="${basedir}/doc/License.txt" todir="${release.dir}" />
<copy file="${basedir}/doc/sql/insert-users.sql" todir="${release.dir}" />
<copy file="${build.dir}/create-db.ddl" todir="${release.dir}" />
<copy file="${basedir}/doc/Release_notes.txt" todir="${release.dir}" />
<copy file="${basedir}/doc/Summary_about_used_libraries.txt" todir="${release.dir}" />
<copy file="${basedir}/doc/Install.txt" todir="${release.dir}" />
<copy todir="${release.dir}/sql-updates">
<fileset dir="${basedir}/doc/sql/updates" />
</copy>
<zip destfile="${release.zip.dir}/agilefant2_snapshot_r${svn.info.rev}.zip" basedir="${release.dir}" update="true" />
</target>
<target name="release" depends="clean, production-war, create-ddl" description="Generates release directory">
<mkdir dir="${release.dir}" />
<mkdir dir="${release.dir}/upgrade" />
<copy file="${warFile}" todir="${release.dir}" />
<copy file="${basedir}/doc/License.txt" todir="${release.dir}" />
<copy file="${basedir}/doc/sql/insert-users.sql" todir="${release.dir}" />
<copy file="${build.dir}/create-db.ddl" todir="${release.dir}" />
<copy file="${basedir}/doc/Release_notes.txt" todir="${release.dir}" />
<copy file="${basedir}/doc/Summary_about_used_libraries.txt" todir="${release.dir}" />
<copy file="${basedir}/doc/Install.txt" todir="${release.dir}" />
<copy todir="${release.dir}/upgrade">
<fileset dir="${basedir}/doc/upgrade/" />
<fileset dir="${basedir}/doc/sql/upgrader/" />
</copy>
</target>
<target name="release-zip" depends="release" description="Packs all files in release directory to a zip file">
<zip destfile="${release.zip.dir}/agilefant.zip" basedir="${release.dir}" update="true" />
</target>
<target name="doccheck">
<mkdir dir="${doccheck.dir}" />
<javadoc classpathref="compile.classpath" doclet="com.sun.tools.doclets.doccheck.DocCheck" docletpathref="compile.classpath" destdir="${doccheck.dir}" sourcepath="${src}">
<package name="fi.hut.soberit.agilefant.*" />
</javadoc>
</target>
<target name="compress-js" depends="webapp, concat_javascript" description="Minifiy a set of files">
<taskdef name="yuicompress" classname="com.yahoo.platform.yui.compressor.YUICompressTask">
<classpath>
<path refid="yuicompressor.classpath"/>
</classpath>
</taskdef>
<delete dir="${build.webapp}/static/js-packed/"/>
<mkdir dir="${build.webapp}/static/js-packed/" />
<!--
<copy todir="${build.webapp}/static/js-packed/">
<fileset dir="${build.webapp}/static/js/" >
<include name="**/*jquery*.js"/>
<include name="**/*timeline*.js"/>
<include name="**/*simile*.js"/>
</fileset>
</copy>
-->
<yuicompress linebreak="300" warn="false" munge="yes" preserveallsemicolons="true"
outputfolder="${build.webapp}/static/js-packed/" >
<fileset dir="${build.webapp}/static/js/" >
<!--
<exclude name="**/*jquery*.js"/>
<exclude name="**/*timeline*.js"/>
<exclude name="**/*simile*.js"/>
-->
<include name="**/*.js" />
</fileset>
</yuicompress>
<delete dir="${build.webapp}/static/js/"/>
<mkdir dir="${build.webapp}/static/js/"/>
<copy todir="${build.webapp}/static/js/">
<fileset dir="${build.webapp}/static/js-packed/" >
<include name="**/*.js" />
</fileset>
</copy>
<delete dir="${build.webapp}/static/js-packed/"/>
</target>
<target name="jsdoc" description="Generate JSDoc documentation" depends="webapp">
<taskdef name="jsdoctoolkit" classname="uk.co.darrenhurley.ant.tasks.JsDocToolkit"
classpath="${lib}/build/jsdoctoolkit-ant-task-1.0.jar;${lib}/build/js4jsdoc.jar"/>
<jsdoctoolkit jsdochome="${lib}/build/jsdoc-toolkit-2.3.0/" template="jsdoc" outputdir="${build.dir}/jsdoc"
verbose="true" includeundocumented="true">
<fileset dir="${build.webapp}/static/js/">
<include name="autocomplete/*.js" />
<include name="dynamics/**/*.js" />
<include name="utils/*.js" />
</fileset>
</jsdoctoolkit>
</target>
<target name="jslint" description="javascript check" depends="webapp">
<taskdef name="jslint"
classname="net.happygiraffe.jslint.ant.JSLintTask"
classpath="${lib}/build/jslint4java-1.2.1_rhino.jar" />
<jslint options="laxbreak">
<formatter type="plain" />
<fileset dir="${build.webapp}/static/js/" >
<include name="dynamics/**/*.js" />
<include name="autocomplete/*.js" />
<include name="utils/*.js" />
</fileset>
</jslint>
</target>
<target name="concat_css" depends="webapp">
<concat destfile="${build.webapp}/static/css/main.css">
<filelist dir="${build.webapp}/static/css/" files="structure.css,
structure.tables.css, structure.text.css, structure.ui.css,
structure.hierarchy.css, jquery-ui.css, jquery.wysiwyg.css,
ui.dynatree.css, autocomplete.css, dynamictable.css, dynamics.messages.css,
portfolio.css, timesheets.css, autoSuggest.css, hyperLinks.css" />
</concat>
</target>
<target name="concat_javascript" depends="webapp">
<concat destfile="${build.webapp}/static/js/simile-widgets.js">
<filelist dir="${build.webapp}/static/js/simile/" files="init.js" />
<filelist dir="${build.webapp}/static/js/simile/ajax/" files="platform.js, debug.js, dom.js, graphics.js, date-time.js, string.js,
html.js, data-structure.js, units.js, ajax.js, history.js, window-manager.js"/>
<filelist dir="${build.webapp}/static/js/simile/timeline/" files="timeline.js, themes.js, ethers.js, event-utils.js, band.js,
sources.js, original-painter.js, detailed-painter.js, overview-painter.js, ether-painters.js, compact-painter.js, decorators.js, units.js, labellers.js"/>
<filelist dir="${build.webapp}/static/js/simile/timeplot/" files="timeplot.js, plot.js, sources.js, geometry.js, color.js, math.js,
processor.js"/>
<!-- <fileset dir="${build.webapp}/static/js/simile/extensions/">
<include name="**/*.js" />
</fileset>
-->
</concat>
<concat destfile="${build.webapp}/static/js/Dynamics.js">
<filelist dir="${build.webapp}/static/js/" files="utils/ArrayUtils.js, utils/ClassUtils.js, utils/Parsers.js, utils/XworkSerializer.js,
autocomplete/autocompleteSearchBox.js, autocomplete/autocompleteSelectedBox.js, autocomplete/autocompleteRecent.js,
autocomplete/autocompleteBundle.js, autocomplete/autocompleteDataProvider.js, autocomplete/autocompleteDialog.js,
autocomplete/autocompleteSingleDialog.js, autocomplete/autocompleteInline.js"></filelist>
<filelist dir="${build.webapp}/static/js/dynamics/"
files=" Dynamics.events.js, view/ViewPart.js, view/MessageDisplay.js, view/CommonSubView.js, view/CommonFragmentSubView.js, view/DynamicView.js, view/Table.js, view/Row.js, view/Cell.js, view/subviews/RowActions.js, view/TableConfiguration.js,
view/subviews/Toggle.js, view/TableCaption.js, view/TableCellEditors.js, view/decorators.js, view/subviews/SplitPanel.js, view/subviews/Tabs.js, view/subviews/Buttons.js, view/subviews/Button.js,
view/ValidationManager.js, view/ConfirmationDialog.js, view/ChangePasswordDialog.js, view/LazyLoadedDialog.js, view/UserSpentEffortWidget.js, view/subviews/LabelsView.js, view/subviews/LabelsIcon.js,
view/subviews/AutoSuggest.js, view/SearchByTextWidget.js, view/subviews/StoryInfoWidget.js, view/StoryFiltersView.js, view/StateFilterWidget.js, view/SpentEffortWidget.js, view/Bubble.js,
view/subviews/CellBubble.js, view/MultiEditWidget.js, model/CommonModel.js, model/BacklogModel.js, model/IterationModel.js, model/ProjectModel.js, model/ProductModel.js, model/StoryModel.js,
model/TaskModel.js, model/UserModel.js, model/TeamModel.js, model/comparators.js, model/AssignmentModel.js, model/HourEntryModel.js, model/TaskSplitContainer.js,
model/UserListContainer.js, model/TeamListContainer.js, model/HourEntryListContainer.js, model/PortfolioModel.js, model/LabelModel.js, model/DailyWorkModel.js,
model/WorkQueueTaskModel.js, model/ModelFactory.js, model/AccessListContainer.js, controller/AccessRowController.js, controller/AccessListController.js, controller/CommonController.js, controller/BacklogController.js, controller/TaskController.js,
controller/AssignmentController.js, controller/StoryController.js, controller/IterationController.js, controller/StoryListController.js, controller/ProductController.js,
controller/IterationRowController.js, controller/ProjectController.js, controller/ProjectRowController.js, controller/ROIterationController.js, controller/ROStoryListController.js, controller/DailyWorkController.js,
controller/TasksWithoutStoryController.js, controller/DailyWorkStoryListController.js, controller/DailyWorkTasksWithoutStoryController.js, controller/WorkQueueController.js,
controller/TaskSplitDialog.js, controller/UserController.js, controller/StoryInfoBubble.js, controller/UserListController.js, controller/UserRowController.js,
controller/TeamListController.js, controller/TeamRowController.js, controller/CreateDialog.js, controller/TaskInfoDialog.js, controller/HourEntryController.js,
controller/HourEntryListController.js, controller/StoryTreeController.js, controller/PortfolioController.js, controller/PortfolioRowController.js,
controller/MyAssignmentsMenuController.js, controller/AdministrationMenuController.js, controller/PersonalLoadController.js"></filelist>
</concat>
<!--<copy tofile="${build.webapp}/WEB-INF/jsp/inc/includeDynamics.jsp" file="${build.webapp}/WEB-INF/jsp/inc/includeDynamicsSingle.jsp" overwrite="on"/>
-->
</target>
<!-- Generates a rebel.xml configuration file for JRebel.
The file is generated both to basedir/classes and basedir/eclipse-classes so it should work both with Eclipse and command line deploying.
The configuration file is wiped out if you do a clean so if you want to continue using JRebel, you should always regenerate it.
-->
<target name="jrebel">
<filter token="webapp.root" value="${webapp.root}" />
<filter token="build.classes" value="${build.classes}" />
<filter token="eclipse.classes" value="${basedir}/eclipse-classes" />
<copy file="${basedir}/tools/rebel.xml.template" tofile="${build.webapp}/WEB-INF/classes/rebel.xml" filtering="true" />
<copy file="${basedir}/tools/rebel.xml.template" tofile="${basedir}/eclipse-classes/rebel.xml" filtering="true" />
</target>
<target name="development-redeploy" depends="clean, undeploy-local, jrebel, deploy-local-web" />
<!-- Selenium tests -->
<target name="tomcat-start" description="Start Tomcat application">
<taskdef name="start" classname="org.apache.catalina.ant.StartTask">
<classpath>
<fileset dir="lib/">
<include name="**/*.jar" />
</fileset>
</classpath>
</taskdef>
<start url="http://localhost:8080/manager" username="test" password="m0t0rh0m3" path="/agilefant" />
</target>
<target name="tomcat-stop" description="Stop Tomcat application">
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask">
<classpath>
<fileset dir="lib/">
<include name="**/*.jar" />
</fileset>
</classpath>
</taskdef>
<stop failonerror="no" url="http://localhost:8080/manager" username="test" password="m0t0rh0m3" path="/agilefant" />
</target>
<target name="selenium-start" description="Start the Selenium server">
<java jar="lib/build/selenium-server-1.0.3-standalone.jar" fork="true" spawn="true">
<arg line="-timeout 30" />
</java>
<echo message="Selenium server started" />
</target>
<target name="selenium-stop" description="Stop the Selenium server">
<get taskname="selenium-shutdown"
src="http://localhost:4444/selenium-server/driver/?cmd=shutDown"
dest="${build.dir}/selenium_result.txt" ignoreerrors="true" />
<echo taskname="selenium-shutdown" message="DGF Errors during shutdown are expected" />
</target>
<target name="selenium" depends="sync-dbs, selenium-start, selenium-tests, selenium-stop" description="Drop-create agilefant and aeftest databases, and run selenium tests"/>
<target name="compile-selenium-tests" depends="compile">
<mkdir dir="${build.test.selenium.classes.dir}" />
<javac debug="${javac.debug}" destdir="${build.test.selenium.classes.dir}" srcdir="${test.selenium.dir}">
<classpath refid="compile.test.classpath" />
</javac>
</target>
<target name="selenium-tests" depends="compile-selenium-tests">
<mkdir dir="${test.conf.dir}/WEB-INF" />
<mkdir dir="${test.reports.junit}" />
<junit fork="true" forkmode="once" dir="${basedir}" printsummary="true">
<jvmarg value="-Xmx512m"/>
<jvmarg value="-Xms512m"/>
<jvmarg value="-XX:PermSize=512m"/>
<jvmarg value="-XX:MaxPermSize=512m"/>
<classpath refid="compile.test.classpath"/>
<classpath>
<path refid="compile.classpath" />
<pathelement location="${build.test.selenium.classes.dir}" />
<!-- <pathelement location="${build.test.selenium.classes.dir}/selenium" /> -->
</classpath>
<formatter type="xml" usefile="true"/>
<formatter type="plain" usefile="false"/>
<batchtest todir="${test.reports.junit}">
<fileset dir="${test.selenium.dir}">
<include name="**/*Test.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="schema" depends="compile">
<mkdir dir="${build.dir}/schemas"/>
<schemagen destdir="${build.dir}/schemas" srcdir="${basedir}/src/fi/hut/soberit/agilefant/">
<schema namespace="http://agilefant.org/remote/" file="datamodel.xsd"/>
<classpath refid="compile.schema.classpath" />
<include name="model/*.java"/>
<include name="util/TimesheetNode.java" />
<include name="transfer/*TimesheetNode.java" />
<include name="transfer/*TO.java" />
</schemagen>
</target>
<target name="export-model" depends="schema">
<mkdir dir="${build.dir}/remotesrc"/>
<mkdir dir="${build.dir}/remotesrc_classes"/>
<xjc package="fi.hut.soberit.agilefant.model.export" destdir="${build.dir}/remotesrc">
<schema dir="${build.dir}/schemas" includes="*.xsd"/>
</xjc>
<javac debug="${javac.debug}" destdir="${build.dir}/remotesrc_classes" srcdir="${build.dir}/remotesrc">
<classpath refid="compile.classpath" />
</javac>
<jar basedir="${build.dir}/remotesrc_classes" includes="**" destfile="${build.dir}/agilefant-model.jar" />
</target>
<target name="tomcat-manager-deploy" description="Install web application" depends="war">
<tomcat-manager-deploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${webapp.name}" war="file:${warFile}"/>
</target>
<target name="tomcat-manager-reload" description="Reload web application">
<tomcat-manager-reload url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${webapp.name}"/>
</target>
<target name="tomcat-manager-undeploy" description="Remove web application">
<tomcat-manager-undeploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${webapp.name}"/>
</target>
<target name="tomcat-manager-redeploy" description="Undeploy and deploy web application" depends="tomcat-manager-undeploy,tomcat-manager-deploy" />
</project>