forked from NiklasPhabian/olfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreap_crawler_build.xml
705 lines (556 loc) · 28.8 KB
/
reap_crawler_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
694
695
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ /////////////////////////////////////////////////////////////////////////////
~ // This file is part of the "Hyrax Data Server" project.
~ //
~ //
~ // Copyright (c) 2013 OPeNDAP, Inc.
~ // Author: Nathan David Potter <ndp@opendap.org>
~ //
~ // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
~ //
~ // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
~ /////////////////////////////////////////////////////////////////////////////
-->
<!-- Build file for the REAP THREDDS/DDX/EML Crawler and related software -->
<project name="REAP Crawlers" default="all" basedir=".">
<!-- Compiler Settings -->
<property name="compile.debug" value="on" />
<property name="compile.debuglevel" value="lines,vars,source" />
<property name="compile.deprecation" value="on" />
<property name="modern.compiler" value="modern" />
<property name="classic.compiler" value="classic" />
<!-- build.compiler: This is a "magic" property.
In the javac task, if the "compiler" property is not
explicitly set, then javac will use the value of this
property ("build.compiler") to set the compiler type.
See the online ANT Users Manual.
Read the section the comipler attribute of the javac task.
http://ant.apache.org/manual/index.html
-->
<property name="build.compiler" value="${modern.compiler}" />
<!-- build.sysclasspath
This is a "magic" property. The value of the build.sysclasspath
property controls how the system classpath, ie. the classpath in
effect when Ant is run, affects the behaviour of classpaths in
Ant. The default behavior varies from Ant to Ant task.
The values and their meanings are:
only - Only the system classpath is used and classpaths
specified in build files, etc are ignored. This
situation could be considered as the person running
the build file knows more about the environment
than the person writing the build file
ignore - The system classpath is ignored. This situation is
the reverse of the above. The person running the
build trusts the build file writer to get the build
file right
last - The classpath is concatenated to any specified
classpaths at the end. This is a compromise, where
the build file writer has priority.
first - Any specified classpaths are concatenated to the
system classpath. This is the other form of compromise
where the build runner has priority.
Excerpted from the online ANT users Manual
http://ant.apache.org/manual/sysclasspath.html
-->
<property name="build.sysclasspath" value="ignore" />
<!-- ********************************************* -->
<target name="noop" description="Do Nothing Target">
<echo level="info" message="no-op target in ${ant.file}" />
</target>
<target name="show" description="Show build settings.">
<echo level="info" message="Project Name: ${ant.project.name}" />
<echo level="info" message="Project File: ${ant.file}" />
<echo level="info" message="" />
<echo level="info" message="Project Directories:" />
<echo level="info" message=" src.dir: ${src.dir}" />
<echo level="info" message=" doc.dir: ${doc.dir}" />
<echo level="info" message=" lib.dir: ${lib.dir}" />
<echo level="info" message=" resources.dir: ${resources.dir}" />
<echo level="info" message="" />
<echo level="info" message="Build Directories:" />
<echo level="info" message=" build.dir: ${build.dir}" />
<echo level="info" message=" build.classes: ${build.classes}" />
<echo level="info" message=" build.doc: ${build.doc}" />
<echo level="info" message="" />
<echo level="info" message="Ant Properties:" />
<echo level="info" message=" ant.file: ${ant.file}" />
<echo level="info" message=" ant.home: ${ant.home}" />
<echo level="info" message=" ant.java.version: ${ant.java.version}" />
<echo level="info" message=" ant.project.name: ${ant.project.name}" />
<echo level="info" message=" ant.version: ${ant.version}" />
<echo level="info" message=" basedir: ${basedir}" />
<echo level="info" message=" user.name: ${user.name}" />
<echo level="info" message=" user.home: ${user.home}" />
<echo level="info" message=" java.home: ${java.home}" />
<echo level="info" message="" />
</target>
<!-- ################################################################# -->
<!-- Project Settings -->
<!-- ................................................................. -->
<!-- Project directories -->
<property name="src.dir" location="src" />
<property name="doc.dir" location="doc" />
<property name="lib.dir" location="lib" />
<property name="resources.dir" location="resources" />
<property name="initialContent.dir" location="/initialContent" />
<property name="WebInfResources.dir" location="/resources/hyrax/WEB-INF" />
<property name="distributionResources.dir" location="${resources.dir}/distribution" />
<property name="THREDDSResources.dir" location="${resources.dir}/THREDDS" />
<!-- Build Directories -->
<property name="build.dir" location="build" />
<property name="build.classes" location="${build.dir}/classes" />
<property name="build.doc" location="${build.dir}/doc" />
<property name="build.dist" location="${build.dir}/dist" />
<property name="build.lib" location="${build.dir}/lib" />
<property name="build.run" location="${build.dir}/run" />
<property name="build.libexec" location="${build.dir}/libexec" />
<!-- Libraries -->
<property name="junit.lib" value="junit-4.4.jar" />
<property name="jdom.lib" value="jdom-1.1.1.jar" />
<property name="servlet.lib" value="tomcat-5.5.0-servlet.jar" />
<property name="echo.lib" value="echosoap.jar" />
<property name="slf4j.lib" value="slf4j-api-1.6.1.jar" />
<property name="logback-core.lib" value="logback-core-0.9.26.jar" />
<property name="logback-classic.lib" value="logback-classic-0.9.26.jar" />
<property name="owlim.lib" value="owlim-3.0.beta9.jar" />
<property name="trree.lib" value="trree-3.0.beta9.jar" />
<property name="openrdf-sesame.lib" value="openrdf-sesame-2.3.0-onejar.jar" />
<property name="commons-cli.lib" value="commons-cli-1.2.jar" />
<property name="commons-httpclient.lib" value="apache-commons-httpclient-3.1.jar" />
<property name="commons-logging.lib" value="apache-commons-logging-1.1.3.jar" />
<property name="commons-codec.lib" value="apache-commons-codec-1.8.jar" />
<property name="saxon-jdom.lib" value="saxon-9.1.0.5-jdom.jar" />
<property name="saxon-s9api.lib" value="saxon-9.1.0.5-s9api.jar" />
<property name="saxon.lib" value="saxon-9.1.0.5.jar" />
<property name="catalina.lib" value="catalina-6.0.14.jar" />
<!-- Used for metacat -->
<property name="metacat-client.lib" value="metacat-client.jar" />
<property name="nceas-utilities.lib" value="nceas-utilities.jar" />
<property name="httpclient.lib" value="httpclient.jar" />
<property name="servlet-api.lib" value="servlet-api-3.0.jar" />
<property name="catalina.lib" value="catalina-6.0.14.jar" />
<property name="xalan.lib" value="xalan.jar" />
<property name="postgres-jdbc.lib" value="postgresql-8.4-701.jdbc4.jar" />
<!-- ******************************************** -->
<path id="classpath">
<pathelement path="${build.classes}" />
<fileset dir="${lib.dir}">
<include name="${slf4j.lib}" />
<include name="${logback-core.lib}" />
<include name="${logback-classic.lib}" />
<include name="${jdom.lib}" />
<include name="${commons-cli.lib}" />
<include name="${commons-httpclient.lib}" />
<include name="${saxon-jdom.lib}" />
<include name="${saxon-s9api.lib}" />
<include name="${saxon.lib}" />
<!-- Used for metacat -->
<include name="${metacat-client.lib}" />
<include name="${nceas-utilities.lib}" />
<include name="${httpclient.lib}" />
<include name="${servlet-api.lib}" />
<include name="${catalina.lib}" />
<include name="${xalan.lib}" />
<include name="${postgres-jdbc.lib}" />
</fileset>
</path>
<!-- create a property containing all .jar files, prefix lib/, and seperated with a space -->
<pathconvert property="crawlers_libs.jar" pathsep=" ">
<mapper>
<chainedmapper>
<!-- remove absolute path -->
<flattenmapper />
<!-- add lib/ prefix -->
<globmapper from="*" to="../lib/*" />
</chainedmapper>
</mapper>
<path>
<!-- lib.home contains all jar files -->
<fileset dir="${lib.dir}">
<include name="${slf4j.lib}" />
<include name="${logback-core.lib}" />
<include name="${logback-classic.lib}" />
<include name="${jdom.lib}" />
<include name="${commons-cli.lib}" />
<include name="${commons-httpclient.lib}" />
<include name="${saxon-jdom.lib}" />
<include name="${saxon-s9api.lib}" />
<include name="${saxon.lib}" />
<include name="${postgres-jdbc.lib}" />
</fileset>
</path>
</pathconvert>
<!-- create a property containing all .jar files, prefix lib/, and seperated with a space -->
<pathconvert property="writer_libs.jar" pathsep=" ">
<mapper>
<chainedmapper>
<!-- remove absolute path -->
<flattenmapper />
<!-- add lib/ prefix -->
<globmapper from="*" to="../lib/*" />
</chainedmapper>
</mapper>
<path>
<!-- lib.home contains all jar files -->
<fileset dir="${lib.dir}">
<include name="${slf4j.lib}" />
<include name="${logback-core.lib}" />
<include name="${logback-classic.lib}" />
<include name="${jdom.lib}" />
<include name="${commons-cli.lib}" />
<include name="${commons-httpclient.lib}" />
<include name="${saxon-jdom.lib}" />
<include name="${saxon-s9api.lib}" />
<include name="${saxon.lib}" />
<include name="${postgres-jdbc.lib}" />
<!-- Used for metacat -->
<include name="${metacat-client.lib}" />
<include name="${nceas-utilities.lib}" />
<include name="${httpclient.lib}" />
<include name="${servlet-api.lib}" />
<include name="${catalina.lib}" />
<include name="${xalan.lib}" />
</fileset>
</path>
</pathconvert>
<!-- create a property containing all .jar files, prefix lib/, and seperated with a space -->
<pathconvert property="classifier_libs.jar" pathsep=" ">
<mapper>
<chainedmapper>
<!-- remove absolute path -->
<flattenmapper />
<!-- add lib/ prefix -->
<globmapper from="*" to="../lib/*" />
</chainedmapper>
</mapper>
<path>
<!-- lib.home contains all jar files -->
<fileset dir="${lib.dir}">
<include name="${slf4j.lib}" />
<include name="${logback-core.lib}" />
<include name="${logback-classic.lib}" />
<include name="${jdom.lib}" />
<include name="${commons-cli.lib}" />
<include name="${commons-httpclient.lib}" />
<include name="${postgres-jdbc.lib}" />
</fileset>
</path>
</pathconvert>
<!-- *********************** TARGETS *********************** -->
<target name="all" depends="clean,compile,executables" description="Builds lots of stuff." />
<target name="clean" description="Remove up ALL build products.">
<delete dir="${build.classes}" />
<delete dir="${build.doc}" />
<delete dir="${build.dist}" />
<delete dir="${build.lib}" />
<delete dir="${build.libexec}" />
</target>
<target name="init" description="Prepare all build directories.">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.classes}" />
<mkdir dir="${build.doc}" />
<mkdir dir="${build.dist}" />
<mkdir dir="${build.lib}" />
<mkdir dir="${build.run}" />
<mkdir dir="${build.libexec}" />
<tstamp />
<echo level="info" message="time: ${TSTAMP}" />
</target>
<target name="compile" depends="init" description="Compiles the crawlers.">
<echo level="info" message="AntFile: ${ant.file} Compiling REAP Crawlers" />
<echo level="info" message="Using the ${build.compiler} javac compiler" />
<echo level="info" message="" />
<javac compiler="${build.compiler}" destdir="${build.classes}" debug="${compile.debug}" debuglevel="${compile.debuglevel}" deprecation="${compile.deprecation}">
<classpath refid="classpath" />
<src path="${src.dir}" />
<include name="opendap/metacat/*.java" />
</javac>
</target>
<target name="executables"
depends="BuildDDXCrawler,BuildPrintVisitedCache,BuildDDXRetriever,BuildURLClassifier,BuildEMLWriter,BuildNCMLWriter"
description="Build all of the programs with their executable jar files and shell scripts" />
<!-- ******************* Executable JAR files ******************* -->
<!-- the DDX crawler just gets the DDX URLs so it runs much faster then
the DDX retriever which does all that this code does and then fetches
the DDX responses. For sites with many granules or with near-line data,
just crawling to get the URLs is a huge time savings. For sites where
the ratio of thredds catalogs to data granules is 1:1, the time savings
is less. -->
<target name="BuildDDXCrawler" depends="compile" description="Build the executable jar file run by the ddx_crawler.sh script">
<copy file="${resources.dir}/metacat/logback.xml" todir="${build.classes}" />
<copy file="${resources.dir}/metacat/ddx_crawler.sh" todir="${build.run}/" />
<copy file="${lib.dir}/${slf4j.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${logback-core.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${logback-classic.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${jdom.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${commons-cli.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${commons-httpclient.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon-jdom.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon-s9api.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${postgres-jdbc.lib}" todir="${build.lib}/" />
<jar destfile="${build.libexec}/DDXCrawler.jar">
<!-- manifest="${resources.dir}/META-INF/DDXCrawler.MANIFEST.MF" -->
<fileset dir="${build.classes}">
<include name="opendap/**/*.class" />
</fileset>
<!-- This adds the file to the jar at the top level. Using fileset
dir="..." and an <include .../> element adds the directory
structure, too -->
<fileset file="resources/metacat/logback.xml" />
<!-- define MANIFEST.MF -->
<manifest>
<attribute name="Built-By" value="ant" />
<attribute name="Main-Class" value="opendap.metacat.DDXCrawler" />
<!--section name="common">
<attribute name="Specification-Title" value="${component.name}" />
<attribute name="Specification-Version" value="${component.version}" />
<attribute name="Specification-Vendor" value="${component.vendor}" />
<attribute name="Implementation-Title" value="${component.name}" />
<attribute name="Implementation-Version" value="${component.version} ${TODAY}" />
<attribute name="Implementation-Vendor" value="${component.vendor}" />
</section-->
<!-- finally, use the magically generated libs path -->
<attribute name="Class-Path" value="${crawlers_libs.jar}" />
</manifest>
</jar>
</target>
<!-- Print the URLs in the DDX and/or THREDDS caches. This does not
print the documents in the cache, but it gives a quick view of what's
in those caches. -->
<target name="BuildPrintVisitedCache" depends="compile" description="Build the executable jar file run by the print_cached_urls.sh script">
<copy file="${resources.dir}/metacat/logback.xml" todir="${build.classes}" />
<copy file="${resources.dir}/metacat/print_cached_urls.sh" todir="${build.run}/" />
<copy file="${lib.dir}/${slf4j.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${logback-core.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${logback-classic.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${jdom.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${commons-cli.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${commons-httpclient.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon-jdom.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon-s9api.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${postgres-jdbc.lib}" todir="${build.lib}/" />
<jar destfile="${build.libexec}/PrintVisitedCache.jar">
<fileset dir="${build.classes}">
<include name="opendap/**/*.class" />
</fileset>
<fileset file="resources/metacat/logback.xml" />
<!-- define MANIFEST.MF -->
<manifest>
<attribute name="Built-By" value="ant" />
<attribute name="Main-Class" value="opendap.metacat.PrintVisitedCache" />
<attribute name="Class-Path" value="${crawlers_libs.jar}" />
</manifest>
</jar>
</target>
<target name="BuildDDXRetriever" depends="compile" description="Build the executable jar file run by the ddx_retriever.sh script">
<copy file="${resources.dir}/metacat/logback.xml" todir="${build.classes}" />
<copy file="${resources.dir}/metacat/ddx_retriever.sh" todir="${build.run}/" />
<copy file="${lib.dir}/${slf4j.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${logback-core.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${logback-classic.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${jdom.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${commons-cli.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${commons-httpclient.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon-jdom.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon-s9api.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${postgres-jdbc.lib}" todir="${build.lib}/" />
<jar destfile="${build.libexec}/DDXRetriever.jar">
<!-- manifest="${resources.dir}/META-INF/DDXCrawler.MANIFEST.MF" -->
<fileset dir="${build.classes}">
<include name="opendap/**/*.class" />
</fileset>
<fileset file="resources/metacat/logback.xml" />
<!-- define MANIFEST.MF -->
<manifest>
<attribute name="Built-By" value="ant" />
<attribute name="Main-Class" value="opendap.metacat.DDXRetriever" />
<attribute name="Class-Path" value="${crawlers_libs.jar}" />
</manifest>
</jar>
</target>
<target name="BuildURLClassifier" depends="compile" description="">
<copy file="${resources.dir}/metacat/logback.xml" todir="${build.libexec}/" />
<copy file="${resources.dir}/metacat/url_classifier.sh" todir="${build.run}/" />
<copy file="${lib.dir}/${slf4j.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${logback-core.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${logback-classic.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${jdom.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${commons-cli.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${commons-httpclient.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${postgres-jdbc.lib}" todir="${build.lib}/" />
<jar destfile="${build.libexec}/URLClassifier.jar">
<fileset dir="${build.classes}">
<include name="opendap/**/*.class" />
</fileset>
<fileset file="resources/metacat/logback.xml" />
<!-- define MANIFEST.MF -->
<manifest>
<attribute name="Built-By" value="ant" />
<attribute name="Main-Class" value="opendap.metacat.URLClassifier" />
<attribute name="Class-Path" value="${classifier_libs.jar}" />
</manifest>
</jar>
</target>
<target name="BuildEMLWriter" depends="compile" description="">
<copy file="${resources.dir}/metacat/logback.xml" todir="${build.libexec}/" />
<copy file="${resources.dir}/metacat/eml_writer.sh" todir="${build.run}/" />
<copy file="${resources.dir}/metacat/ddx2eml-3.2.xsl" todir="${build.run}/" />
<copy file="${resources.dir}/metacat/many_ddx2eml-1.0.xsl" todir="${build.run}/" />
<copy file="${lib.dir}/${slf4j.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${logback-core.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${logback-classic.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${jdom.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${commons-cli.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${commons-httpclient.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon-jdom.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon-s9api.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${metacat-client.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${nceas-utilities.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${httpclient.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${servlet-api.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${catalina.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${xalan.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${postgres-jdbc.lib}" todir="${build.lib}/" />
<jar destfile="${build.libexec}/EMLWriter.jar">
<fileset dir="${build.classes}">
<include name="opendap/**/*.class" />
</fileset>
<fileset file="resources/metacat/logback.xml" />
<!-- define MANIFEST.MF -->
<manifest>
<attribute name="Built-By" value="ant" />
<attribute name="Main-Class" value="opendap.metacat.EMLWriter" />
<attribute name="Class-Path" value="${writer_libs.jar}" />
</manifest>
</jar>
</target>
<target name="BuildNCMLWriter" depends="compile" description="">
<copy file="${resources.dir}/metacat/logback.xml" todir="${build.libexec}/" />
<copy file="${resources.dir}/metacat/ncml_writer.sh" todir="${build.run}/" />
<copy file="${resources.dir}/metacat/many_ddx2ncml-1.0.xsl" todir="${build.run}/" />
<copy file="${lib.dir}/${slf4j.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${logback-core.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${logback-classic.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${jdom.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${commons-cli.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${commons-httpclient.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon-jdom.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon-s9api.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${saxon.lib}" todir="${build.lib}/" />
<copy file="${lib.dir}/${postgres-jdbc.lib}" todir="${build.lib}/" />
<jar destfile="${build.libexec}/NCMLWriter.jar">
<fileset dir="${build.classes}">
<include name="opendap/**/*.class" />
</fileset>
<fileset file="resources/metacat/logback.xml" />
<!-- define MANIFEST.MF -->
<manifest>
<attribute name="Built-By" value="ant" />
<attribute name="Main-Class" value="opendap.metacat.NCMLWriter" />
<attribute name="Class-Path" value="${crawlers_libs.jar}" />
</manifest>
</jar>
</target>
<!-- ************************ Tests ******************************* -->
<target name="runEMLWriter" depends="compile">
<copy file="${resources.dir}/metacat/logback-test.xml" todir="${build.classes}" />
<java classname="opendap.metacat.EMLWriter" fork="true" dir="${build.run}">
<arg line="--groups-name=test.opendap.org" />
<arg line="--verbose" />
<arg line="--output" />
<classpath refid="classpath" />
</java>
</target>
<target name="runNCMLWriter" depends="compile">
<copy file="${resources.dir}/metacat/logback-test.xml" todir="${build.classes}" />
<copy file="${resources.dir}/metacat/many_ddx2ncml-1.0.xsl" todir="${build.run}" />
<java classname="opendap.metacat.NCMLWriter" fork="true" dir="${build.run}">
<jvmarg value="-Xms256m" />
<jvmarg value="-Xmx1024m" />
<jvmarg value="-javaagent:/Users/jimg/src/jip-src-1.2/profile/profile.jar" />
<jvmarg value="-Dprofile.properties=/Users/jimg/src/olfs/resources/metacat/profile.properties" />
<arg line="--groups-name=satdat1_urls_only" />
<arg line="--verbose" />
<arg line="--output" />
<classpath refid="classpath" />
</java>
</target>
<target name="runURLClassifier" depends="compile">
<copy file="${resources.dir}/metacat/logback-test.xml" tofile="${build.classes}/logback-test.xml" />
<java classname="opendap.metacat.URLClassifier" fork="true" dir="${build.run}">
<jvmarg value="-Xms256m" />
<jvmarg value="-Xmx1024m" />
<arg line="test.opendap.org" />
<classpath refid="classpath" />
</java>
</target>
<target name="runPrintVisitedCache" depends="compile">
<copy file="${resources.dir}/metacat/logback-test.xml" todir="${build.classes}" />
<java classname="opendap.metacat.PrintVisitedCache" fork="true" dir="${build.run}">
<!--arg line="- -catalog-root=http://test.opendap.org:8080/opendap/data/catalog.xml" /-->
<arg line="--cache-name=test.opendap.org" />
<arg line="--ddx-urls" />
<arg line="--thredds-urls" />
<classpath refid="classpath" />
</java>
</target>
<target name="runDDXRetrieverTest" depends="compile">
<copy file="${resources.dir}/metacat/logback-test.xml" todir="${build.classes}" />
<java classname="opendap.metacat.DDXRetriever" fork="true" dir="${build.run}">
<arg line="--cache-name=test.opendap.org" />
<arg line="--read-only" />
<arg line="--verbose" />
<classpath refid="classpath" />
</java>
</target>
<target name="runDDXCrawlerTest" depends="compile">
<copy file="${resources.dir}/metacat/logback-test.xml" todir="${build.classes}" />
<java classname="opendap.metacat.DDXCrawler" fork="true" dir="${build.run}">
<!--arg line="- -catalog-root=http://test.opendap.org:8080/opendap/data/catalog.xml" /-->
<arg line="--catalog-root=http://test.opendap.org/dap/data/catalog.xml" />
<arg line="--verbose" />
<!--arg line="- -read-from-thredds-cache" /-->
<classpath refid="classpath" />
</java>
</target>
<!-- *********** Old targets - might be useful someday *********** -->
<target name="Print_EML_from_cache" depends="compile">
<copy file="${resources.dir}/metacat/logback.xml" tofile="${build.classes}/logback.xml" />
<copy file="${resources.dir}/metacat/ddx2eml-3.1.xsl" tofile="${build.run}/ddx2eml-3.1.xsl" />
<java classname="opendap.metacat.DapIngest" fork="true" dir="${build.run}">
<arg line="--verbose" />
<arg line="--very-verbose" />
<arg line="--cache-name=test.opendap.org" />
<arg line="--eml-print-all-cached" />
<classpath refid="classpath" />
</java>
</target>
<target name="Insert_EML_from_cache" depends="compile">
<copy file="${resources.dir}/metacat/logback-test.xml" tofile="${build.classes}/logback-test.xml" />
<copy file="${resources.dir}/metacat/ddx2eml-3.1.xsl" tofile="${build.run}/ddx2eml-3.1.xsl" />
<java classname="opendap.metacat.DapIngest" fork="true" dir="${build.run}">
<arg line="--verbose" />
<arg line="--metacat=http://localhost:8080/knb/metacat" />
<arg line="--eml-insert-all-cached" />
<arg line="--cache-name=data.nodc.noaa.gov" />
<classpath refid="classpath" />
</java>
</target>
</project>