-
Notifications
You must be signed in to change notification settings - Fork 28
/
build.xml
693 lines (622 loc) · 24.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
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
<?xml version="1.0"?>
<!--
| JavaThumbnailer - A pluggable Java Thumbnail Generator Library
| Copyright (C) 2011 Come_IN Computerclubs (University of Siegen)
|
| This library is free software; you can redistribute it and/or
| modify it under the terms of the GNU Lesser General Public
| License as published by the Free Software Foundation; either
| version 2.1 of the License, or (at your option) any later version.
|
| This library is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
| Lesser General Public License for more details.
|
| You should have received a copy of the GNU Lesser General Public
| License along with this library; if not, write to the Free Software
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
| Contact: Come_IN-Team <[email protected]>
+-->
<project name="javathumbnailer" default="targets" basedir=".">
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask" classpath="lib/ant/xmltask.jar" />
<!--
| The properties and paths
+-->
<property file="build.properties"/>
<property environment="env"/>
<!-- set if java.dir not set in build.properties -->
<property name="java.dir" value="${env.JAVA_HOME}" />
<condition property="java_dir_empty">
<or>
<length string="${java.dir}" length="0" />
<equals arg1="${java.dir}" arg2="$${env.JAVA_HOME}" />
<not>
<isset property="java.dir" />
</not>
</or>
</condition>
<tstamp>
<format property="timestamp" pattern="yyMMdd-HHmm"/>
</tstamp>
<condition property="version" value="${version.prefix}-PREVIEW">
<istrue value="${is-preview}"/>
</condition>
<condition property="version" value="${version.prefix}-STABLE">
<isfalse value="${is-preview}"/>
</condition>
<property name="version.file" value="${version}"/>
<property name="programname" value="Java Thumbnailer"/>
<property name="programname.file" value="javathumbnailer"/>
<property name="doc.header" value="${programname} ${version} API"/>
<property name="doc.title" value="API documentation for ${programname} ${version}"/>
<property name="doc.bottom" value="${programname} ${version}, Copyright (C) 2011 Come_IN Computerclubs (University of Siegen)"/>
<property name="test.reports" value="build/tests" />
<property name="reportStorage" value="test/reports" />
<property name="package.file" value="${programname.file}-standalone-${version.file}.jar"/>
<property name="pluginname.file" value="${programname.file}-crawlerplugin-${version.file}.jar"/>
<property name="pluginname-taglib.file" value="${programname.file}-plugin-taglib-${version.file}.jar"/>
<!-- Autodetect the platform -->
<condition property="platform" value="linux">
<os family="unix"/>
</condition>
<condition property="platform" value="win">
<os family="windows"/>
</condition>
<path id="sourcepath">
<pathelement location="src"/>
</path>
<path id="sourcepath-plugin">
<pathelement location="plugin/src"/>
</path>
<path id="classpath" cache="true">
<pathelement location="build/classes"/>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<fileset dir="lib/jodconverter3">
<include name="*.jar"/>
</fileset>
<fileset dir="lib/shared-with-regain-preperators">
<include name="*.jar"/>
</fileset>
</path>
<path id="classpath-regain" cache="true">
<pathelement location="${regain-location}/build/classes"/>
<pathelement location="${regain-location}/build/included-lib-classes/common"/>
</path>
<path id="classpath-shared" cache="true">
<fileset dir="lib/shared-with-regain">
<include name="*.jar"/>
</fileset>
</path>
<path id="junit" cache="true">
<fileset dir="lib/ant">
<include name="junit-4.8.1.jar"/>
</fileset>
</path>
<path id="test-classpath" cache="true">
<fileset dir="test/lib">
<include name="*.jar" />
</fileset>
<pathelement location="build/classes-test"/>
</path>
<path id="docpath">
<path refid="sourcepath"/>
</path>
<!--
| Display all public targets
+-->
<target name="targets">
<echo message="usage: build [target]"/>
<echo message=""/>
<echo message="available targets:"/>
<echo message=" targets Shows this list of targets."/>
<echo message=" dump-info Dumps some information (VM-Version...)."/>
<echo message=" clean Deletes the classes directory."/>
<echo message=" clean-all Deletes all generated directories."/>
<echo message=" prepare Prepares the compilation. (Extracts the libs)"/>
<echo message=" prepare-once Prepares the compilation if needed. (Extracts the libs)"/>
<echo message=" doc Generates the JavaDoc documentation."/>
<echo message=" make Compiles the source code."/>
<echo message=" make-plugin Compiles the source code of the crawler plugin."/>
<echo message=" (and the regain project, if needed)"/>
<echo message=" make-test Compiles the test source code."/>
<echo message=" test Does the JUnit tests."/>
<echo message=" test-integration Does the integration tests."/>
<echo message=" test-overview Does the JUnit tests and give a quick overview."/>
<echo message=" test-generate-history Generates a test history from existing Unit-reports."/>
<echo message=" package Packages the thumbnailer lib as standalone library." />
<echo message=" (including dependencies)"/>
<echo message=" package-plugin Packages the lib as regain plugin." />
<echo message=" (including depencies except those that exist in regain)"/>
<echo message=" deploy-desktop Deploys the plugin to regain desktop version." />
<echo message=" deploy-server Deploys the plugin to regain server version." />
<echo message=" deploy-crawler Deploys the plugin to regain server version (only crawler)." />
<echo message=" deploy-tomcat Deploys the plugin to regain server version (only tomcat search)." />
<echo message=" all Creates all."/>
<echo message=" public Public release."/>
</target>
<!--
| Dump some information.
+-->
<target name="dump-info">
<echo message="java.dir=${java.dir}" />
<echo message="JAVA_HOME=${env.JAVA_HOME}" />
<echo message="java.vm.info=${java.vm.info}" />
<echo message="java.vm.name=${java.vm.name}" />
<echo message="java.vm.vendor=${java.vm.vendor}" />
<echo message="java.vm.version=${java.vm.version}" />
<echo message="os.arch=${os.arch}" />
<echo message="os.name=${os.name}" />
<echo message="os.version=${os.version}" />
<echo message="file.encoding=${file.encoding}" />
<echo message="user.language=${user.language}" />
</target>
<!--
| Deletes the classes directory.
+-->
<target name="clean">
<delete dir="build/classes"/>
<delete dir="build/classes-test"/>
</target>
<!--
| Deletes all generated directories.
+-->
<target name="clean-all" depends="clean">
<delete dir="build/included-lib-classes"/>
<delete dir="build/doc"/>
<delete dir="build/tests"/>
</target>
<!--
| Prepares the compilation. (Extracts the libs)
+-->
<target name="prepare">
<echo message="Extracting the lib jars ..." />
<delete dir="build/included-lib-classes"/>
<mkdir dir="build/included-lib-classes/common"/>
<unjar dest="build/included-lib-classes/">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<fileset dir="lib/jodconverter3">
<include name="*.jar"/>
</fileset>
<fileset dir="lib/shared-with-regain-preperators">
<include name="*.jar"/>
</fileset>
</unjar>
<unjar dest="build/included-lib-classes-shared/">
<fileset dir="lib/shared-with-regain">
<include name="*.jar"/>
</fileset>
</unjar>
</target>
<!--
| Prepares the compilation. (Extracts the libs)
| Does nothing if the libs were already extracted.
+-->
<target name="prepare-once" depends="-check-prepare, -prepare-if-needed"/>
<target name="-check-prepare">
<condition property="included-lib-classes.missing">
<not>
<available file="build/included-lib-classes" type="dir"/>
</not>
</condition>
</target>
<target name="-prepare-if-needed" if="included-lib-classes.missing">
<antcall target="prepare"/>
</target>
<!--
| Generates the JavaDoc documentation.
+-->
<target name="doc">
<echo message="Generating JavaDoc documentation ..." />
<delete dir="build/doc"/>
<mkdir dir="build/doc/javadoc"/>
<javadoc packagenames="*"
sourcepathref="docpath"
classpathref="classpath"
destdir="build/doc/javadoc"
doctitle="${doc.title}"
windowtitle="${doc.title}"
header="${doc.header}"
bottom="${doc.bottom}"
stylesheetfile="ressources/stylesheet.css"
access="private"
charset="UTF-8"
failonerror="true">
<!-- additionalparam="-breakiterator" -->
<link offline="true"
href="${java-api-location}"
packagelistLoc="ressources/dummy-jdk-api-doc"/>
</javadoc>
</target>
<!--
| Compiles the source code.
+-->
<target name="make">
<echo message="Compiling the source code using ${java.dir} ..." />
<fail if="java_dir_empty">
Neither 'java.dir' nor JAVA_HOME is set, so no compiling is possible. Please copy build.properties.sample to build.properties and edit its values.
</fail>
<mkdir dir="build/classes"/>
<javac destdir="build/classes"
debug="${debug}"
deprecation="true"
executable="${java.dir}/bin/javac"
source="1.8"
target="1.8"
fork="true"
includeantruntime="false">
<compilerarg value="-Xlint"/>
<src>
<path refid="sourcepath"/>
</src>
<classpath>
<path refid="classpath"/>
<path refid="classpath-shared"/>
</classpath>
</javac>
</target>
<target name="make-plugin" depends="make">
<echo message="Making sure everything is prepared at regain ..." />
<ant dir="${regain-location}" useNativeBasedir="true" inheritAll="false">
<target name="prepare-once"/>
<target name="make"/>
</ant>
<echo message="Compiling regain plugin ... (Regain is in ${regain-location})" />
<fail if="java_dir_empty">
Neither 'java.dir' nor JAVA_HOME is set, so no compiling is possible. Please copy build.properties.sample to build.properties and edit its values.
</fail>
<javac destdir="build/classes"
debug="${debug}"
deprecation="true"
executable="${java.dir}/bin/javac"
source="1.8"
target="1.8"
fork="true"
includeantruntime="false">
<compilerarg value="-Xlint"/>
<src>
<path refid="sourcepath-plugin"/>
</src>
<classpath>
<path refid="classpath"/>
<path refid="classpath-shared"/>
<path refid="classpath-regain"/>
</classpath>
</javac>
</target>
<!--
| Compiles the test source code.
+-->
<target name="make-test" depends="make">
<echo message="Compiling the test source code ..." />
<mkdir dir="build/classes-test"/>
<javac destdir="build/classes-test"
debug="true"
deprecation="true"
source="1.8"
target="1.8"
includeantruntime="false">
<src>
<pathelement location="test/src"/>
</src>
<classpath>
<path refid="classpath"/>
<path refid="classpath-shared"/>
<path refid="junit"/>
<path refid="test-classpath"/>
</classpath>
</javac>
</target>
<!--
| Package the thumbnailer as a standalone .jar-library/executable
+-->
<target name="package" depends="prepare-once, make">
<echo message="Creating standalone jar ..." />
<fileset id="ressources" dir="ressources">
</fileset>
<fileset id="lib-jars" dir="build/included-lib-classes">
</fileset>
<fileset id="lib-jars-shared" dir="build/included-lib-classes-shared">
</fileset>
<fileset id="classes" dir="build/classes">
<exclude name="de/uni_siegen/wineme/come_in/thumbnailer/plugin/ThumbnailerPlugin*"/>
</fileset>
<jar jarfile="build/${package.file}"
compress="false"
index="true">
<manifest>
<attribute name="Main-Class" value="de.uni_siegen.wineme.come_in.thumbnailer.Main"/>
</manifest>
<fileset refid="lib-jars"/>
<fileset refid="classes"/>
<fileset refid="lib-jars-shared"/>
<fileset refid="ressources" />
</jar>
<zip destfile="build/${programname.file}-standalone-${version.file}.zip" whenempty="fail">
<zipfileset prefix="${programname.file}" dir="build" includes="${package.file}" />
<zipfileset prefix="${programname.file}" dir=".">
<include name="CHANGELOG" />
<include name="INSTALL" />
<include name="README.md" />
<include name="LICENSE.TXT" />
</zipfileset>
</zip>
</target>
<!--
| Packages the thumbnailer as a plugin for regain
+-->
<target name="package-plugin" depends="prepare-once, make-plugin">
<echo message="Creating regain jar ..." />
<fileset id="lib-jars" dir="build/included-lib-classes">
</fileset>
<fileset id="ressources" dir="ressources">
</fileset>
<fileset id="classes" dir="build/classes">
</fileset>
<jar jarfile="build/${pluginname.file}"
compress="false"
index="true">
<manifest>
<attribute name="Main-Class" value="de.uni_siegen.wineme.come_in.thumbnailer.Main"/>
<attribute name="Plugin-Class" value="de.uni_siegen.wineme.come_in.thumbnailer.plugin.ThumbnailerPlugin"/>
</manifest>
<fileset refid="lib-jars"/>
<fileset refid="classes"/>
<fileset refid="ressources" />
</jar>
<echo message="Creating regain jar taglib ..." />
<jar jarfile="build/${pluginname-taglib.file}"
compress="false"
index="true">
<fileset dir="build/classes">
<include name="de/uni_siegen/wineme/come_in/thumbnailer/plugin/**" />
</fileset>
<fileset dir="build/classes">
<include name="de/uni_siegen/wineme/come_in/thumbnailer/ThumbnailerConstants.class" />
</fileset>
</jar>
<zip destfile="build/${programname.file}-plugin-${version.file}.zip" whenempty="fail">
<zipfileset prefix="${programname.file}" dir="build" includes="${pluginname.file}" />
<zipfileset fullpath="${programname.file}/web/taglib/thumbnailer.jar" dir="build" includes="${pluginname-taglib.file}" />
<zipfileset prefix="${programname.file}/web" dir="web">
<exclude name="**/_*" />
</zipfileset>
<zipfileset prefix="${programname.file}" dir=".">
<include name="CHANGELOG" />
<include name="INSTALL" />
<include name="README.md" />
<include name="LICENSE.TXT" />
</zipfileset>
</zip>
</target>
<!--
| Does the JUnit tests.
|
| If this target does not work, copy the file "junit-xxx.jar" from the directory
| "lib/ant" in your ANT_HOME/lib directory.
| (ANT_HOME/lib is on my machine "/usr/share/ant/lib" or "~/.ant/lib")
+-->
<target name="test" depends="make-test">
<junit haltonfailure="false" fork="true" filtertrace="on" > <!-- showoutput="true" -->
<classpath>
<path refid="classpath"/>
<path refid="test-classpath" />
<path refid="classpath-shared"/>
<path refid="junit"/>
</classpath>
<formatter type="plain" usefile="false"/>
<batchtest>
<fileset dir="test/src">
<include name="de/**/*Test.java" />
<exclude name="**/slow/*Test.java" /> <!-- Sorry, these tests currently don't work with ant. Run them inside Eclipse, for example. -->
<exclude name="**/integration/*Test.java" />
</fileset>
</batchtest>
</junit>
</target>
<!--
| Does the JUnit tests.
|
| If this target does not work, copy the file "junit-xxx.jar" from the directory
| "lib/ant" in your ANT_HOME/lib directory.
| (ANT_HOME/lib is on my machine "/usr/share/ant/lib" or "~/.ant/lib")
+-->
<target name="test-integration" depends="make-test">
<copy file="build/${package.file}" preservelastmodified="true" tofile="test/build/javathumbnailer-standalone.jar" />
<junit haltonfailure="true" fork="true" filtertrace="on" > <!-- showoutput="true" -->
<classpath>
<path refid="junit"/>
<path refid="test-classpath" />
<path location="test/build/javathumbnailer-standalone.jar" /> <!-- TODO: Remove depencies in test -->
</classpath>
<formatter type="plain" usefile="false"/>
<batchtest>
<fileset dir="test/src">
<include name="**/integration/*Test.java" />
</fileset>
</batchtest>
</junit>
</target>
<!--
| Does the JUnit tests and show an overview.
| Number of failed tests are logged to build/tests.
| These can be used to generate a nice report with test-generate-history
|
| If this target does not work, copy the file "junit-xxx.jar" from the directory
| "lib/ant" in your ANT_HOME/lib directory.
| (ANT_HOME/lib is on my machine "/usr/share/ant/lib" or "~/.ant/lib")
+-->
<target name="test-overview" depends="make-test">
<delete dir="${test.reports}"/>
<mkdir dir="${test.reports}" />
<junit haltonfailure="false" fork="true" filtertrace="on" > <!-- showoutput="true" -->
<classpath>
<path refid="classpath"/>
<path refid="classpath-shared"/>
<path refid="junit"/>
</classpath>
<formatter type="xml" usefile="true"/>
<batchtest todir="${test.reports}">
<fileset dir="test/src">
<include name="de/**/*Test.java" />
<exclude name="**/slow/*Test.java" />
</fileset>
</batchtest>
</junit>
<junitreport todir="${test.reports}">
<fileset dir="${test.reports}">
<include name="TEST-*.xml" />
</fileset>
<report todir="${test.reports}" />
</junitreport>
<tstamp>
<format property="start.timestamp" pattern="yyyyMMdd-HHmmss" />
</tstamp>
<copy todir="${reportStorage}/report-${start.timestamp}">
<fileset dir="build/tests" />
</copy>
</target>
<target name="test-generate-history" description="Generates a test history from existing Unit-reports.">
<apply executable="java" dir="." force="true" parallel="true">
<arg value="-jar" />
<arg value="lib/ant/unitth-1.3.1.jar" />
<dirset dir="${reportStorage}">
<include name="report-*" />
</dirset>
</apply>
</target>
<!--
| Creates all.
+-->
<target name="all" depends="package, package-plugin">
</target>
<!--
| Build release.
| (Todo: throw warning when ${is-preview}==false)
+-->
<target name="public" depends="clean-all, prepare, make, test-overview, package, package-plugin">
</target>
<!--
| Deploy crawler related changes
| Params:
${install} - Path to main folder
${install-conf} - Path to conf folder
-->
<target name="-deploy-crawler">
<available property="install.available" file="${install-conf}/CrawlerConfiguration.xml" />
<fail unless="install.available" message="Regain is not yet compiled / ${install-conf}/CrawlerConfiguration.xml is missing." />
<echo message="Copy Crawler plugin..." />
<delete quiet="true">
<fileset dir="${install}/plugins" includes="javathumbnailer-crawlerplugin-*.jar"/>
</delete>
<copy file="build/${pluginname.file}" preservelastmodified="true" todir="${install}/plugins" />
<echo message="Add to CrawlerConfiguration.xml..." />
<xmltask source="${install-conf}/CrawlerConfiguration.xml" dest="${install-conf}/CrawlerConfiguration.xml">
<call path="configuration/crawlerPluginList/crawlerPlugin/class">
<param name="class" path="text()" default="none" />
<actions>
<condition property="thumbnailer-present">
<equals arg1="@{class}" arg2="de.uni_siegen.wineme.come_in.thumbnailer.plugin.ThumbnailerPlugin" />
</condition>
<!-- <echo> Found crawler plugin config: @{class}</echo> -->
</actions>
</call>
<insert path="configuration/crawlerPluginList" unless="thumbnailer-present">
<![CDATA[
<crawlerPlugin enabled="true">
<class>de.uni_siegen.wineme.come_in.thumbnailer.plugin.ThumbnailerPlugin</class>
<config>
<section name="thumbnailing">
<param name="thumbnailFolder">web/thumbs/</param>
<param name="imageWidth">160</param>
<param name="imageHeight">120</param>
</section>
<section name="externalHelpers">
<!--
<param name="openOfficeHome">/path/to/open-office-binary (autodetect if not set)</param>
<param name="openOfficeProfile">/path/to/openoffice-profile (create a temporary if not set)</param>
-->
<param name="openOfficePort">8100</param>
</section>
</config>
</crawlerPlugin>
]]>
</insert>
</xmltask>
<antcall target="-clean-index">
<param name="index" value="${install}/searchindex" />
<param name="unless-cond" value="thumbnailer-present" />
</antcall>
</target>
<target name="-clean-index" unless="unless-cond">
<echo message="Delete searchindex to force re-indexing." />
<delete failonerror="false" dir="${index}" />
</target>
<!--
| Deploy search related changes
| Params:
${install} - Path to main folder
${install-conf} - Path to conf folder
-->
<target name="-deploy-search">
<available property="install.available" file="${install-web}/index.jsp" />
<fail unless="install.available" message="Regain is not yet compiled / ${install-web}/index.jsp is missing." />
<echo message="Copy Taglib..." />
<copy preservelastmodified="true" todir="${install-web}">
<fileset dir="web" />
</copy>
<copy file="build/${pluginname-taglib.file}" preservelastmodified="true" tofile="${install-web}/taglib/thumbnailer.jar" />
</target>
<!--
| Install to regain desktop version
-->
<target name="deploy-desktop"> <!-- depends="package-plugin" -->
<echo message="Deploying desktop version changes ..." />
<property name="desktop-install" value="${regain-location}/build/runtime/desktop/${platform}" />
<available property="conf.available" file="${desktop-install}/conf/DesktopConfiguration.xml" />
<copy todir="${desktop-install}/conf" overwrite="false" granularity="5256000000">
<fileset dir="${desktop-install}/conf/default" />
</copy>
<antcall target="-deploy-crawler">
<param name="install" value="${desktop-install}" />
<param name="install-conf" value="${desktop-install}/conf" />
</antcall>
<antcall target="-deploy-search">
<param name="install-web" value="${desktop-install}/web" />
</antcall>
<echo message="Add to DesktopConfiguration.xml..." />
<xmltask source="${desktop-install}/conf/DesktopConfiguration.xml" dest="${desktop-install}/conf/DesktopConfiguration.xml">
<remove path="configuration/simple_register_namespace/namespace[@name='thumbnailer']" />
<insert path="configuration/simple_register_namespace">
<![CDATA[
<namespace name="thumbnailer">de.uni_siegen.wineme.come_in.thumbnailer.plugin.sharedlib</namespace>
]]>
</insert>
</xmltask>
</target>
<target name="deploy-crawler">
<echo message="Deploying server version changes (Crawler) ..." />
<property name="crawler-install" value="${regain-location}/build/runtime/crawler" />
<antcall target="-deploy-crawler">
<param name="install" value="${crawler-install}" />
<param name="install-conf" value="${crawler-install}" />
</antcall>
<echo message="You may need to adjust the thumbnail Folder so that it is /thumbs/ inside the tomcat/regain app-folder." />
</target>
<target name="deploy-tomcat">
<echo message="Deploying server version changes (Search) ..." />
<property name="tomcat-install" value="${deploy-target.dir}/regain" />
<antcall target="-deploy-search">
<param name="install-web" value="${tomcat-install}" />
</antcall>
<copy file="${tomcat-install}/taglib/thumbnailer.jar" preservelastmodified="true" todir="${tomcat-install}/WEB-INF/lib" />
<echo message="You may need to restart tomcat in order to see the changes." />
</target>
<target name="deploy-server" depends="deploy-crawler, deploy-tomcat">
</target>
</project>