-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.xml
667 lines (615 loc) · 27.9 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
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
<?xml version="1.0" encoding="UTF-8"?>
<!--
** @author Matthias L. Jugel
** @version $Id$
-->
<project basedir="." default="all" name="SnipSnap">
<property file="conf/build.properties"/>
<property file="conf/libs.properties"/>
<property file="conf/snipsnap.conf"/>
<path id="server.classpath">
<pathelement location="${dir.libs}/javax.servlet.jar"/>
<pathelement location="${dir.libs}/org.apache.jasper.jar"/>
<pathelement location="${dir.libs}/org.apache.crimson.jar"/>
<pathelement location="${dir.libs}/org.mortbay.jetty.jar"/>
<pathelement location="${dir.libs}/mckoidb.jar"/>
<pathelement location="${dir.libs}/commons-codec-1.3.jar"/>
<pathelement location="${dir.libs}/commons-logging.jar"/>
<pathelement location="${dir.libs}/httpclient-3.0-rc3.jar"/>
<pathelement location="${dir.libs}/${xmlrpc.jar}"/>
<pathelement location="${dir.libs}/jdic.jar"/>
</path>
<path id="snipsnap.test">
<pathelement location="${dir.src}/apps/default/WEB-INF/lib/snipsnap-servlets.jar"/>
</path>
<!-- the overall class path -->
<path id="app.classpath">
<pathelement location="${dir.libs}/${jdbcstorage.jar}"/>
<pathelement location="${dir.libs}/${rss-ng.jar}"/>
<pathelement location="${dir.libs}/${search-ng.jar}"/>
<pathelement location="${dir.libs}/gabriel.jar"/>
<pathelement location="${dir.libs}/jmdns.jar"/>
<pathelement location="${dir.libs}/${rome.jar}"/>
<pathelement location="${dir.libs}/${jdom.jar}"/>
<pathelement location="${dir.libs}/${spring-core.jar}"/>
<pathelement location="${dir.libs}/${spring-beans.jar}"/>
<pathelement location="${dir.libs}/asm-1.4.1.jar"/>
<pathelement location="${dir.libs}/dynaop-1.0-beta.jar"/>
<pathelement location="${dir.libs}/cglib-asm-1.0.jar"/>
<pathelement location="${dir.libs}/groovy-1.0-beta-6.jar"/>
<pathelement location="${dir.libs}/graph-snipsnap.jar"/>
<pathelement location="${dir.libs}/radeox.jar"/>
<pathelement location="${dir.libs}/jena.jar"/>
<pathelement location="${dir.libs}/commons-logging.jar"/>
<pathelement location="${dir.libs}/commons-dbcp-1.1.jar"/>
<pathelement location="${dir.libs}/commons-pool-1.1.jar"/>
<pathelement location="${dir.libs}/commons-collections.jar"/>
<pathelement location="${dir.libs}/commons-codec-1.3.jar"/>
<pathelement location="${dir.libs}/commons-httpclient-3.0-rc3.jar"/>
<pathelement location="${dir.libs}/${xmlrpc.jar}"/>
<pathelement location="${dir.libs}/lucene-1.4.1.jar"/>
<pathelement location="${dir.libs}/jython.jar"/>
<pathelement location="${dir.libs}/smack.jar"/>
<pathelement location="${dir.libs}/aspectjrt.jar"/>
<pathelement location="${dir.libs}/dom4j.jar"/>
<pathelement location="${dir.src}/apps/default/WEB-INF/lib/jstl.jar"/>
<pathelement location="${dir.src}/apps/default/WEB-INF/lib/standard.jar"/>
<pathelement location="${dir.libs}/activation.jar"/>
<pathelement location="${dir.libs}/mail.jar"/>
<pathelement location="${dir.libs}/cvslib.jar"/>
<pathelement location="${dir.libs}/j2h.jar"/>
<pathelement location="${dir.libs}/picocontainer-1.0.jar"/>
<pathelement location="${dir.libs}/nanocontainer-1.0.jar"/>
<pathelement location="${dir.libs}/nanocontainer-dynaop-1.0-beta-1-SNAPSHOT.jar"/>
<pathelement location="${dir.libs}/jmock-1.0.0.jar"/>
</path>
<path id="all.classpath">
<path refid="server.classpath"/>
<path refid="app.classpath"/>
</path>
<path id="test.classpath">
<path refid="all.classpath"/>
<pathelement location="${dir.libs}/junit.jar"/>
</path>
<!-- build distribution -->
<target depends="tar-source, tar-binary" name="dist" description="tar complete distribution"/>
<!-- build binary distribution package -->
<target depends="clean" description="tar source package" name="tar-source">
<tstamp/>
<tar destfile="../${appname}-${snipsnap.server.version}-${DSTAMP}-src.tgz" compression="gzip">
<tarfileset dir="." prefix="${appname}-${snipsnap.server.version}" mode="700">
<include name="run.sh"/>
<include name="run.bat"/>
<include name="db.sh"/>
<include name="dbexport.sh"/>
<include name="dbimport.sh"/>
<include name="dbrepair.sh"/>
<include name="exportall.sh"/>
<include name="devlinks.sh"/>
<include name="renimg.sh"/>
</tarfileset>
<tarfileset dir="." prefix="${appname}-${snipsnap.server.version}">
<include name="**"/>
<exclude name="**/CVS"/>
<exclude name="applications"/>
<exclude name="run.sh"/>
<exclude name="run.bat"/>
<exclude name="db.sh"/>
<exclude name="dbexport.sh"/>
<exclude name="dbimport.sh"/>
<exclude name="dbrepair.sh"/>
<exclude name="exportall.sh"/>
<exclude name="devlinks.sh"/>
<exclude name="renimg.sh"/>
<exclude name="src/theme/drrockit/"/>
<exclude name="src/theme/javangelist/"/>
<exclude name="src/theme/sib/"/>
</tarfileset>
</tar>
</target>
<target depends="all" description="tar binary package" name="tar-binary">
<tstamp/>
<tar destfile="../${appname}-${snipsnap.server.version}-${DSTAMP}.tgz" compression="gzip">
<tarfileset dir="${basedir}" prefix="${appname}-${snipsnap.server.version}" mode="700">
<include name="run.sh"/>
<include name="run.bat"/>
</tarfileset>
<tarfileset dir="${basedir}" prefix="${appname}-${snipsnap.server.version}">
<include name="lib/${appname}.jar"/>
<include name="lib/${appname}.war"/>
<include name="lib/${appname}-server.jar"/>
<!-- <include name="lib/${appname}-theme-*.jar"/>-->
<include name="lib/${appname}-installer.war"/>
<include name="lib/${appname}-utils.jar"/>
<include name="lib/gabriel.jar"/>
<include name="lib/jmdns.jar"/>
<include name="lib/${rome.jar}"/>
<include name="lib/${jdom.jar}"/>
<include name="lib/${spring-core.jar}"/>
<include name="lib/${spring-beans.jar}"/>
<include name="lib/jdom-b10.jar"/>
<include name="lib/asm-1.4.1.jar"/>
<include name="lib/dynaop-1.0-beta.jar"/>
<include name="lib/cglib-asm-1.0.jar"/>
<include name="lib/asm-util-1.4.1.jar"/>
<include name="lib/groovy-1.0-rc1-snapshot.jar"/>
<include name="lib/org.apache.jasper.jar"/>
<include name="lib/org.apache.crimson.jar"/>
<include name="lib/org.mortbay.jetty.jar"/>
<include name="lib/javax.servlet.jar"/>
<include name="lib/commons-codec-1.3.jar"/>
<include name="lib/commons-logging.jar"/>
<include name="lib/commons-httpclient-3.0-rc3.jar"/>
<include name="lib/javax.servlet.jar"/>
<include name="lib/${xmlrpc.jar}"/>
<include name="lib/mckoidb.jar"/>
<include name="lib/dom4j.jar"/>
<include name="lib/mysql-connector.jar"/>
<include name="lib/postgres-jdbc.jar"/>
<include name="conf/jetty.conf"/>
<include name="license.txt"/>
<include name="validate.xsl"/>
<include name="README"/>
<exclude name="**/CVS"/>
<exclude name="run.sh"/>
<exclude name="run.bat"/>
<exclude name="db.sh"/>
<exclude name="dbrepair.sh"/>
</tarfileset>
</tar>
</target>
<!-- delete compiled class files and created jar/war archives -->
<target description="clean up compiled code" name="clean">
<delete failonerror="false" includeEmptyDirs="true">
<fileset dir="${dir.out}" includes="**" excludes="CVS"/>
</delete>
<delete failonerror="false">
<fileset dir="${dir.libs}" includes="${appname}*.jar"/>
<fileset dir="${dir.libs}" includes="${appname}*.war"/>
<fileset dir="${dir.src}/apps/default/WEB-INF/lib" includes="${appname}-servlets.jar"/>
<fileset dir="${dir.src}/apps/installer/WEB-INF/lib" includes="installer-servlets.jar"/>
<fileset dir="${dir.src}/org/snipsnap/config" includes="Options.java"/>
</delete>
</target>
<!-- create all archives -->
<target depends="jar-server,jar-util,snipsnap-war" description="create all" name="all"/>
<target name="buildtask">
<mkdir dir="${dir.out}/ant"/>
<javac deprecation="false" debug="false"
srcdir="${dir.src}" destdir="${dir.out}/ant">
<include name="org/snipsnap/util/PropertyConstantBuilder.java"/>
</javac>
</target>
<target depends="buildtask" name="declaretask">
<taskdef name="constants"
classname="org.snipsnap.util.PropertyConstantBuilder"
classpath="${dir.out}/ant"/>
</target>
<!-- prepare special generated classes -->
<target depends="declaretask" name="generate">
<constants
properties="${dir.src}/org/snipsnap/config/defaults.conf"
file="${dir.out}/ant/config.stub" prefix="app."
/>
<loadfile property="config-stub" srcfile="${dir.out}/ant/config.stub" failonerror="false"/>
<copy file="${dir.src}/org/snipsnap/config/Configuration.java.tmpl"
tofile="${dir.src}/snipsnap/api/config/Configuration.java" filtering="true" overwrite="true">
<filterset>
<filter token="DEFAULTS" value="${config-stub}"/>
</filterset>
</copy>
<constants
properties="${dir.src}/org/snipsnap/config/globals.conf"
file="${dir.out}/ant/globals.stub" prefix="app."
/>
<loadfile property="globals-stub" srcfile="${dir.out}/ant/globals.stub" failonerror="false"/>
<copy file="${dir.src}/org/snipsnap/config/Globals.java.tmpl"
tofile="${dir.src}/org/snipsnap/config/Globals.java" filtering="true" overwrite="true">
<filterset>
<filter token="DEFAULTS" value="${globals-stub}"/>
</filterset>
</copy>
</target>
<target depends="compile-api" description="create api jar" name="jar-api">
<jar destfile="${dir.libs}/snipsnap-api.jar">
<fileset dir="${dir.out}/api/" includes="snipsnap/api/**"/>
</jar>
</target>
<target description="compile api code" name="compile-api">
<mkdir dir="${dir.out}/api"/>
<javac deprecation="${deprecation}" debug="${debug}"
srcdir="${dir.src}"
destdir="${dir.out}/api"
classpathref="all.classpath">
<include name="snipsnap/api/**"/>
</javac>
</target>
<target description="compile implementation code" name="compile-impl">
<mkdir dir="${dir.out}/impl"/>
<javac deprecation="${deprecation}" debug="${debug}"
srcdir="${dir.src}"
destdir="${dir.out}/impl"
classpathref="all.classpath">
<include name="org/snipsnap/util/ApplicationAwareMap.java"/>
<include name="org/snipsnap/interceptor/Aspects.java"/>
<include name="org/snipsnap/snip/SnipFactory.java"/>
<include name="org/snipsnap/versioning/VersionInfo.java"/>
<include name="org/snipsnap/user/Security.java"/>
<include name="org/snipsnap/snip/storage/query/*.java"/>
<include name="org/snipsnap/render/PlainTextRenderEngine.java"/>
</javac>
</target>
<target depends="compile-impl" description="create implementation jar" name="jar-impl">
<jar destfile="${dir.libs}/snipsnap-impl.jar">
<fileset dir="${dir.out}/impl/" includes="**"/>
</jar>
</target>
<!-- create server code -->
<target depends="compile-jsp, compile-server,installer-war,snipsnap-war" description="create server jar"
name="jar-server">
<copy file="conf/copyright.txt" tofile="${dir.out}/server/conf/copyright.txt" filtering="true">
<filterset>
<filter token="VERSION" value="${snipsnap.server.version}"/>
</filterset>
</copy>
<jar destfile="${dir.libs}/${appname}-server.jar" excludes="**/CVS, org/snipsnap/server/*Launcher*"
manifest="conf/manifest">
<fileset dir="${dir.out}/server" includes="**">
<exclude name="org/snipsnap/server/*Launcher*"/>
</fileset>
<fileset dir=".">
<include name="conf/gabriel/access.acl"/>
<include name="conf/gabriel/methods.acl"/>
<include name="conf/snipsnap.conf"/>
<include name="conf/snipsnap.conf"/>
<include name="conf/jetty.conf"/>
</fileset>
<fileset dir="${dir.src}" includes="org/snipsnap/config/globals.conf"/>
<fileset dir="${dir.src}" includes="org/snipsnap/config/defaults.conf"/>
<fileset dir="${dir.src}" includes="org/snipsnap/config/transpose.map"/>
</jar>
<jar destfile="${dir.libs}/${appname}.jar" excludes="**/CVS" manifest="conf/launcher.manifest">
<fileset dir="${dir.out}/server" includes="org/snipsnap/server/*Launcher*"/>
<fileset dir="${dir.libs}">
<include name="jdic.jar"/>
<include name="snipsnap-server.jar"/>
<include name="org.mortbay.jetty.jar"/>
<include name="javax.servlet.jar"/>
<include name="org.apache.crimson.jar"/>
<include name="org.apache.jasper.jar"/>
<include name="commons-codec-1.3.jar"/>
<include name="commons-logging.jar"/>
<include name="commons-httpclient-3.0-rc3.jar"/>
<include name="${xmlrpc.jar}"/>
<include name="mckoidb.jar"/>
<include name="mysql-connector.jar"/>
<include name="postgres-jdbc.jar"/>
<include name="snipsnap-server.jar"/>
<include name="snipsnap-installer.war"/>
<include name="snipsnap.war"/>
</fileset>
</jar>
</target>
<target depends="generate" description="compile server code" name="compile-server">
<mkdir dir="${dir.out}/server"/>
<javac deprecation="${deprecation}" debug="${debug}"
srcdir="${dir.src}"
destdir="${dir.out}/server"
classpathref="server.classpath">
<include name="org/snipsnap/server/**"/>
<exclude name="org/snipsnap/server/Admin*"/>
</javac>
</target>
<!-- create utility code -->
<target depends="compile-util" description="build util jar" name="jar-util">
<jar destfile="${dir.libs}/${appname}-utils.jar" excludes="**/CVS" manifest="conf/utils.manifest">
<fileset dir="${dir.out}/util" includes="**"/>
<fileset dir="." includes="conf/snipsnap.conf"/>
<fileset dir="." includes="conf/copyright.txt"/>
<fileset dir="${dir.src}" includes="org/snipsnap/config/defaults.conf"/>
<fileset dir="${dir.src}" includes="org/snipsnap/config/transpose.map"/>
</jar>
</target>
<target depends="generate" description="compile util code" name="compile-util">
<mkdir dir="${dir.out}/util"/>
<javac deprecation="${deprecation}" debug="${debug}"
srcdir="${dir.src}"
classpathref="all.classpath"
destdir="${dir.out}/util">
<include name="org/snipsnap/util/Test*"/>
<include name="org/snipsnap/util/*Util.java"/>
<include name="org/snipsnap/util/DB*.java"/>
<include name="org/snipsnap/util/*JDBC*.java"/>
<include name="org/snipsnap/util/mail/**"/>
<include name="org/snipsnap/util/*Test.java"/>
<include name="org/snipsnap/server/AdminClient.java"/>
<include name="org/snipsnap/util/XMLSnipRepair.java"/>
<include name="org/snipsnap/util/LocaleComparator.java"/>
</javac>
</target>
<target name="checkstyle">
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
<pmd rulesetfiles="${check_rules}" shortFilenames="true" printToConsole="true">
<!-- <pmd rulesetfiles="rulesets/coupling.xml,rulesets/unusedcode.xml,rulesets/basic.xml,rulesets/imports.xml" shortFilenames="true" printToConsole="true"> -->
<formatter type="html" toFile="pmd_report.html"/>
<fileset dir="./src">
<include name="**/*.java"/>
</fileset>
</pmd>
</target>
<target depends="generate" description="compile test code" name="compile-test">
<mkdir dir="${dir.out}/test"/>
<javac deprecation="${deprecation}" debug="${debug}"
srcdir="${dir.src}"
classpathref="test.classpath"
destdir="${dir.out}/test"
includes="org/snipsnap/test/**"/>
</target>
<target depends="generate" description="compile template application code" name="compile-servlets">
<mkdir dir="${dir.out}/default/WEB-INF/classes"/>
<!-- fix, why junit to compile servlets? -->
<javac deprecation="${deprecation}" debug="${debug}"
srcdir="${dir.src}"
classpathref="test.classpath"
destdir="${dir.out}/default/WEB-INF/classes"
excludes="org/snipsnap/admin/**, org/snipsnap/server/**">
<src path="${dir.src}"/>
<include name="org/snipsnap/**"/>
</javac>
</target>
<target depends="compile-servlets" name="servlets-jar">
<copy todir="${dir.out}/default/WEB-INF/classes" filtering="true" overwrite="true">
<filterset>
<filter token="VERSION" value="${snipsnap.server.version}"/>
</filterset>
<fileset dir="${dir.src}" includes="org/snipsnap/net/dispatcher.conf"/>
<fileset dir="${dir.src}" includes="org/snipsnap/config/globals.conf"/>
<fileset dir="${dir.src}" includes="org/snipsnap/config/defaults.conf"/>
<fileset dir="${dir.src}" includes="org/snipsnap/config/transpose.map"/>
<fileset dir="${dir.src}" includes="org/snipsnap/snip/storage/SnipSerializer.properties"/>
<fileset dir="${dir.src}" includes="org/snipsnap/net/handler/*.gsp"/>
</copy>
<jar destfile="${dir.src}/apps/default/WEB-INF/lib/snipsnap-servlets.jar" excludes="**/CVS">
<fileset dir="${dir.out}/default/WEB-INF/classes" includes="**"/>
<fileset dir="${dir.src}" includes="META-INF/**"/>
<fileset dir="./conf/" includes="gabriel/**"/>
</jar>
</target>
<target if="precompile.jsp" depends="servlets-jar" name="compile-jsp" description="compile jsp files">
<mkdir dir="${dir.out}/jsp/source"/>
<mkdir dir="${dir.out}/jsp/classes"/>
<jspc destdir="${dir.out}/jsp/source"
verbose="1" srcdir="${dir.src}/apps/default"
classpathref="all.classpath"
webinc="${dir.out}/jsp/web.inc">
<include name="**/*.jsp"/>
<webapp basedir="${dir.src}/apps/default"/>
</jspc>
<depend
srcdir="${dir.out}/jsp/source"
destdir="${dir.out}/jsp/classes"
cache="${dir.out}/jsp/dependencies"
classpathref="all.classpath"/>
<javac deprecation="${deprecation}" debug="${debug}"
srcdir="${dir.out}/jsp/source"
classpath="${dir.src}/apps/default/WEB-INF/lib/snipsnap-servlets.jar"
classpathref="all.classpath"
destdir="${dir.out}/jsp/classes">
<include name="**"/>
</javac>
</target>
<target name="make-edittest-jsp">
<mkdir dir="${dir.out}/jsp/source"/>
<mkdir dir="${dir.out}/jsp/classes"/>
<jspc destdir="${dir.out}/jsp/source"
verbose="1" srcdir="${dir.src}"
package="org.snipsnap.jsp"
classpathref="all.classpath">
<include name="**/EditTest.jsp"/>
</jspc>
<depend
srcdir="${dir.out}/jsp/source"
destdir="${dir.out}/jsp/classes"
cache="${dir.out}/jsp/dependencies"
classpathref="all.classpath"/>
<javac deprecation="${deprecation}" debug="${debug}"
srcdir="${dir.out}/jsp/source"
classpath="${dir.src}/apps/default/WEB-INF/lib/snipsnap-servlets.jar"
classpathref="all.classpath"
destdir="${dir.out}/jsp/classes">
<include name="**"/>
</javac>
<jar destfile="${dir.src}/apps/default/WEB-INF/lib/edittest.jar" excludes="**/CVS">
<fileset dir="${dir.out}/jsp/classes" includes="**"/>
<!-- <fileset dir="${dir.src}" includesfile="META-INF/services/javax.servlet.HttpServlet"/> -->
</jar>
</target>
<target if="precompile.jsp" depends="compile-jsp" name="jsp-jar" description="package precompiled jsp files">
<jar destfile="${dir.src}/apps/default/WEB-INF/lib/snipsnap-jsp.jar" excludes="**/CVS">
<fileset dir="${dir.out}/jsp/classes" includes="**"/>
</jar>
</target>
<!-- create web archive of the template application -->
<target depends="jsp-jar,jar-api" description="build template war" name="snipsnap-war">
<mkdir dir="${dir.out}/webapp"/>
<copy todir="${dir.out}/webapp">
<fileset dir="${dir.src}/apps/default">
<exclude name="**/CVS"/>
<exclude name="**/*.jsp" if="precompile.jsp"/>
<exclude name="WEB-INF/web-xml.tmpl"/>
</fileset>
</copy>
<copy tofile="${dir.out}/webapp/WEB-INF/classes/i18n/messages.properties"
file="${dir.src}/apps/default/WEB-INF/classes/i18n/messages_en.properties"/>
<loadfile property="web.inc" srcfile="${dir.out}/jsp/web.inc" failonerror="false"/>
<condition property="web.inc" value="">
<not>
<isset property="${web.inc}"/>
</not>
</condition>
<!-- copy with filter if web.inc is available -->
<copy
tofile="${dir.out}/webapp/WEB-INF/web.xml"
file="${dir.src}/apps/default/WEB-INF/web-xml.tmpl" overwrite="true">
<filterset>
<filter token="VERSION" value="${snipsnap.server.version}"/>
<filter token="PRECOMPILED-JSP" value="${web.inc}"/>
</filterset>
</copy>
<copy file="${dir.src}/apps/default/index.jsp" tofile="${dir.out}/webapp/index.jsp"/>
<copy file="conf/copyright.txt" filtering="true"
todir="${dir.out}/webapp/WEB-INF/classes/defaults">
<filterset>
<filter token="VERSION" value="${snipsnap.server.version}"/>
</filterset>
</copy>
<copy todir="${dir.out}/webapp/WEB-INF/lib">
<fileset dir="${dir.libs}">
<include name="asm-1.4.1.jar"/>
<include name="gabriel.jar"/>
<include name="jmdns.jar"/>
<include name="${rome.jar}"/>
<include name="${jdom.jar}"/>
<include name="${spring-core.jar}"/>
<include name="${spring-beans.jar}"/>
<include name="dynaop-1.0-beta.jar"/>
<include name="cglib-asm-1.0.jar"/>
<include name="asm-util-1.4.1.jar"/>
<include name="groovy-1.0-beta-6.jar"/>
<include name="graph-snipsnap.jar"/>
<include name="radeox.jar"/>
<include name="jena.jar"/>
<include name="commons-logging.jar"/>
<include name="commons-dbcp-1.1.jar"/>
<include name="commons-pool-1.1.jar"/>
<include name="commons-collections.jar"/>
<include name="lucene-1.4.1.jar"/>
<include name="commons-codec-1.3.jar"/>
<include name="commons-httpclient-3.0-rc3.jar"/>
<include name="${xmlrpc.jar}"/>
<include name="dom4j.jar"/>
<include name="smack.jar"/>
<include name="aspectjrt.jar"/>
<include name="jython.jar"/>
<include name="mail.jar"/>
<include name="activation.jar"/>
<include name="j2h.jar"/>
<include name="picocontainer-1.0.jar"/>
<include name="nanocontainer-1.0.jar"/>
<include name="nanocontainer-dynaop-1.0-beta-1-SNAPSHOT.jar"/>
<include name="rss-ng-1.0-alpha-1.jar"/>
<include name="${search-ng.jar}"/>
<include name="jdbcstorage-1.0-alpha-1.jar"/>
<include name="snipsnap-api.jar"/>
</fileset>
</copy>
<jar destfile="${dir.libs}/${appname}.war">
<fileset dir="${dir.out}/webapp" includes="**"/>
</jar>
</target>
<target if="precompile.jsp" depends="installer-servlets-jar" name="compile-installer-jsp"
description="compile installer jsp files">
<mkdir dir="${dir.out}/installer/jsp/source"/>
<mkdir dir="${dir.out}/installer/jsp/classes"/>
<jspc destdir="${dir.out}/installer/jsp/source"
verbose="1"
classpathref="all.classpath"
webinc="${dir.out}/installer/jsp/web.inc">
<include name="**/*.jsp"/>
<webapp basedir="${dir.src}/apps/installer"/>
</jspc>
<depend
srcdir="${dir.out}/installer/jsp/source"
destdir="${dir.out}/installer/jsp/classes"
cache="${dir.out}/installer/jsp/dependencies"
classpathref="all.classpath"/>
<javac deprecation="${deprecation}" debug="${debug}"
srcdir="${dir.out}/installer/jsp/source"
classpath="${dir.out}/installer/webapp/WEB-INF/lib/installer-servlets.jar"
classpathref="all.classpath"
destdir="${dir.out}/installer/jsp/classes">
<include name="**"/>
</javac>
</target>
<target description="compile installer application code" name="compile-installer">
<mkdir dir="${dir.out}/installer/servlets"/>
<javac deprecation="${deprecation}" debug="${debug}"
srcdir="${dir.src}"
classpathref="all.classpath"
destdir="${dir.out}/installer/servlets">
<include name="org/snipsnap/admin/AdminInitFilter.java"/>
<include name="org/snipsnap/admin/Installer.java"/>
</javac>
</target>
<target if="precompile.jsp" depends="compile-installer-jsp" name="installer-jsp-jar"
description="package precompiled installer jsp files">
<mkdir dir="${dir.out}/installer/webapp/WEB-INF/lib"/>
<jar destfile="${dir.out}/installer/webapp/WEB-INF/lib/installer-jsp.jar" excludes="**/CVS">
<fileset dir="${dir.out}/installer/jsp/classes" includes="**"/>
</jar>
</target>
<target depends="compile-installer" description="package installer servlets" name="installer-servlets-jar">
<mkdir dir="${dir.out}/installer/webapp/WEB-INF/lib"/>
<jar destfile="${dir.out}/installer/webapp/WEB-INF/lib/installer-servlets.jar" excludes="**/CVS">
<fileset dir="${dir.out}/installer/servlets" includes="**"/>
<fileset dir="." includes="conf/snipsnap.conf"/>
<fileset dir="${dir.src}" includes="org/snipsnap/config/defaults.conf"/>
<fileset dir="${dir.src}" includes="org/snipsnap/config/globals.conf"/>
</jar>
</target>
<!-- create web archive of the installer web application -->
<target depends="installer-jsp-jar" description="build installer war" name="installer-war">
<mkdir dir="${dir.out}/installer/webapp"/>
<copy todir="${dir.out}/installer/webapp">
<fileset dir="${dir.src}/apps/installer">
<exclude name="**/CVS"/>
<exclude name="**/*.jsp" if="precompile.jsp"/>
<exclude name="WEB-INF/web-xml.tmpl"/>
</fileset>
<fileset dir="${dir.src}/apps/default">
<include name="WEB-INF/lib/standard.jar"/>
<include name="WEB-INF/lib/jstl.jar"/>
</fileset>
</copy>
<copy file="${dir.src}/apps/default/admin/css/config.css" tofile="${dir.out}/installer/webapp/default.css"/>
<copy file="${dir.src}/apps/installer/index.jsp" tofile="${dir.out}/installer/webapp/index.jsp"/>
<!-- copy if installer-web.inc is available -->
<loadfile property="installer-web.inc" srcfile="${dir.out}/installer/jsp/web.inc" failonerror="false"/>
<condition property="installer-web.inc" value="">
<not>
<isset property="${installer-web.inc}"/>
</not>
</condition>
<copy
tofile="${dir.out}/installer/webapp/WEB-INF/web.xml"
file="${dir.src}/apps/installer/WEB-INF/web-xml.tmpl" overwrite="true">
<filterset>
<filter token="PRECOMPILED-JSP" value="${installer-web.inc}"/>
</filterset>
</copy>
<jar destfile="${dir.libs}/${appname}-installer.war">
<fileset dir="${dir.out}/installer/webapp" includes="**"/>
</jar>
</target>
<import file="build.test.xml"/>
<target description="generation javadocs" name="javadoc">
<javadoc packagenames="org.snipsnap.*"
sourcepath="src"
excludepackagenames="org.snipsnap.test.*"
defaultexcludes="yes"
destdir="docs/api"
author="true"
version="true"
use="true"
windowtitle="SnipSnap API">
<doctitle><![CDATA[<h1>SnipSnap</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2001-2006 Matthias L. Jugel, Stephan J. Schmidt. All Rights Reserved
.</i>]]></bottom>
<!-- <tag name="todo" scope="all" description="To do:" />
<group title="Group 1 Packages" packages="com.dummy.test.a*"/>
<group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
-->
<link href="http://java.sun.com/j2se/1.4/docs/api/package-list"/>
</javadoc>
</target>
</project>