1
|
<?xml version="1.0"?>
|
2
|
<!--
|
3
|
* '$RCSfile$'
|
4
|
* Authors: Matt Jones, Chad Berkley, Jivka Bojilova
|
5
|
* Copyright: 2000 Regents of the University of California and the
|
6
|
* National Center for Ecological Analysis and Synthesis
|
7
|
* For Details: http://www.nceas.ucsb.edu/
|
8
|
*
|
9
|
* '$Author: tao $'
|
10
|
* '$Date: 2003-07-15 14:04:39 -0700 (Tue, 15 Jul 2003) $'
|
11
|
* '$Revision: 1729 $'
|
12
|
*
|
13
|
* Build file for the Ant cross-platform build system for metacat
|
14
|
* See http://jakarta.apache.org for details on Ant
|
15
|
*
|
16
|
* usage: ant [compile|jar|install|jdoc]
|
17
|
*
|
18
|
* This program is free software; you can redistribute it and/or modify
|
19
|
* it under the terms of the GNU General Public License as published by
|
20
|
* the Free Software Foundation; either version 2 of the License, or
|
21
|
* (at your option) any later version.
|
22
|
*
|
23
|
* This program is distributed in the hope that it will be useful,
|
24
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26
|
* GNU General Public License for more details.
|
27
|
*
|
28
|
* You should have received a copy of the GNU General Public License
|
29
|
* along with this program; if not, write to the Free Software
|
30
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
31
|
-->
|
32
|
<project name="metacat" default="jar" basedir=".">
|
33
|
|
34
|
<target name="oracle">
|
35
|
<!-- Customize these properties if you are using oracle -->
|
36
|
<property name="jdbc-connect"
|
37
|
value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
|
38
|
<property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
|
39
|
<property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
|
40
|
<property name="oracle_home" value="/oracle01/app/oracle/product/8.1.6" />
|
41
|
<property name="jdbc" value="${oracle_home}/jdbc/lib/classes111.zip" />
|
42
|
</target>
|
43
|
|
44
|
<target name="postgresql">
|
45
|
<!-- Customize these properties if you are using postgres -->
|
46
|
<property name="jdbc-connect"
|
47
|
value="jdbc:postgresql://localhost/exp"/>
|
48
|
<property name="dbDriver" value="org.postgresql.Driver"/>
|
49
|
<property name="dbAdapter"
|
50
|
value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
|
51
|
<property name="jdbc" value="lib/jdbc7.1-1.2.jar" />
|
52
|
</target>
|
53
|
|
54
|
<target name="config" depends="postgresql">
|
55
|
<!-- Change the 'depends' attribute above to 'postgresql' to install
|
56
|
metacat with postgres instead of oracle -->
|
57
|
|
58
|
<!-- Customize these properties for your system -->
|
59
|
<property name="tomcat" value="/usr/local/devtools/jakarta-tomcat" />
|
60
|
<property name="webapps" value="/usr/local/devtools/jakarta-tomcat/webapps" />
|
61
|
<property name="context" value="tao" />
|
62
|
<property name="user" value="tao"/>
|
63
|
<property name="password" value=""/>
|
64
|
<!-- Tomcat version, if you use tomcat 3, please fill it "tomcat3". If you using tomcat4, please fill it "tomcat4"-->
|
65
|
<property name="tomcatversion" value="tomcat3"/>
|
66
|
|
67
|
<property name="server" value="pine.nceas.ucsb.edu:8080"/>
|
68
|
<property name="systemidserver" value="http://pine.nceas.ucsb.edu:8080" />
|
69
|
<property name="datafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/data" />
|
70
|
<property name="inlinedatafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/inlinedata" />
|
71
|
<property name="debuglevel" value="40" />
|
72
|
|
73
|
<property name="forcereplicationwaitingtime" value="30000"/>
|
74
|
<property name="cvsroot"
|
75
|
value=":ext:tao@cvs.ecoinformatics.org:/cvs" />
|
76
|
<property name="web-base-url"
|
77
|
value="http://knb.ecoinformatics.org"/>
|
78
|
<property name="default-style" value="knb" />
|
79
|
<property name="morphosourcedir" value="../morpho" />
|
80
|
<property name="defaultcontenttype" value="application/octet-stream" />
|
81
|
|
82
|
<!-- Make sure these paths match the location of the jar files
|
83
|
on your system, the defaults should usually work -->
|
84
|
<property name="jsdk"
|
85
|
value="${tomcat}/lib/common/servlet.jar" />
|
86
|
<property name="xmlp"
|
87
|
value="lib/xercesImpl.jar" />
|
88
|
<property name="srb"
|
89
|
value="lib/srbrmi" />
|
90
|
<property name="cos"
|
91
|
value="lib/cos.jar" />
|
92
|
<property name="morpho"
|
93
|
value="lib/morpho.jar" />
|
94
|
<property name="xalan"
|
95
|
value="lib/xalan/xalan.jar" />
|
96
|
<property name="apis"
|
97
|
value="lib/xalan/xml-apis.jar" />
|
98
|
<property name="httpclient"
|
99
|
value="${morphosourcedir}/lib/httpclient.jar" />
|
100
|
<property name="itis"
|
101
|
value="${morphosourcedir}/lib/itislib.jar" />
|
102
|
<property name="emlparser"
|
103
|
value="lib/eml.jar" />
|
104
|
<property name="configxml"
|
105
|
value="lib/configxml.jar" />
|
106
|
<property name="itislib"
|
107
|
value="lib/itislib.jar" />
|
108
|
<property name="emlparser"
|
109
|
value="lib/eml.jar" />
|
110
|
</target>
|
111
|
|
112
|
<target name="init" depends="config">
|
113
|
<!-- It is less likely you'll need to make any changes from here down,
|
114
|
but customization is possible -->
|
115
|
<property name="installdir" value="${webapps}/${context}" />
|
116
|
<property name="name" value="metacat"/>
|
117
|
<property name="Name" value="MetaCat"/>
|
118
|
<property name="debugprefix" value="${Name}:"/>
|
119
|
<property name="release" value="1.2.1"/>
|
120
|
<property name="replication-path"
|
121
|
value="/${context}/servlet/replication"/>
|
122
|
<property name="servlet-path" value="/${context}/servlet/metacat"/>
|
123
|
<property name="html-path" value="/${context}"/>
|
124
|
<property name="image-path" value="/${context}" />
|
125
|
<property name="style-path" value="/${context}/style"/>
|
126
|
<property name="replication-log" value="/tmp/metacatreplication.log"/>
|
127
|
<property name="replicationerrorlog" value="/tmp/metacatreplication.err"/>
|
128
|
<property name="config-dir" value="${installdir}" />
|
129
|
<property name="eml-module" value="eml" />
|
130
|
<property name="eml-version" value="2.0.0beta6" />
|
131
|
<property name="eml-tag" value="RELEASE_EML_2_0_0_BETA_6_REV1" />
|
132
|
<property name="eml2-tag" value="STMML_SCHEMA_UPDATE" />
|
133
|
<property name="eml2namespace" value="eml://ecoinformatics.org/eml-2.0.0" />
|
134
|
<property name="stmmlnamespace" value="http://www.xml-cml.org/schema/stmml" />
|
135
|
|
136
|
<property name="cpath"
|
137
|
value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${srb}:${cos}:${morpho}:${emlparser}"/>
|
138
|
|
139
|
<filter token="docrooturl" value="./" />
|
140
|
<filter token="jdbc-connect" value="${jdbc-connect}"/>
|
141
|
<filter token="dbDriver" value="${dbDriver}"/>
|
142
|
<filter token="dbAdapter" value="${dbAdapter}"/>
|
143
|
<filter token="install-dir" value="${installdir}"/>
|
144
|
<filter token="server" value="${server}"/>
|
145
|
<filter token="systemidserver" value="${systemidserver}"/>
|
146
|
<filter token="replication-log" value="${replication-log}"/>
|
147
|
<filter token="replicationerrorlog" value="${replicationerrorlog}"/>
|
148
|
<filter token="release" value="${release}"/>
|
149
|
<filter token="servlet-path" value="${servlet-path}"/>
|
150
|
<filter token="html-path" value="${html-path}"/>
|
151
|
<filter token="user" value="${user}"/>
|
152
|
<filter token="password" value="${password}"/>
|
153
|
<filter token="image-path" value="${image-path}"/>
|
154
|
<filter token="style-path" value="${style-path}"/>
|
155
|
<filter token="web-base-url" value="${web-base-url}"/>
|
156
|
<filter token="replication-path" value="${replication-path}"/>
|
157
|
<filter token="config-dir" value="${config-dir}"/>
|
158
|
<filter token="default-style" value="${default-style}"/>
|
159
|
<filter token="eml-version" value="${eml-version}"/>
|
160
|
<filter token="eml2namespace" value="${eml2namespace}"/>
|
161
|
<filter token="stmmlnamespace" value="${stmmlnamespace}"/>
|
162
|
<filter token="context" value="${context}"/>
|
163
|
<filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" />
|
164
|
<filter token="debuglevel" value="${debuglevel}" />
|
165
|
<filter token="datafilepath" value="${datafilepath}" />
|
166
|
<filter token="inlinedatafilepath" value="${inlinedatafilepath}" />
|
167
|
<filter token="defaultcontenttype" value="${defaultcontenttype}" />
|
168
|
<filter token="debugprefix" value="${debugprefix}"/>
|
169
|
|
170
|
<property name="srcdir" value="./src" />
|
171
|
<property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
|
172
|
<property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
|
173
|
<property name="build.dir" value="./build"/>
|
174
|
<property name="build.src" value="${build.dir}/src"/>
|
175
|
<property name="build.dest" value="${build.dir}/classes"/>
|
176
|
<property name="build.docs" value="${build.dir}/docs"/>
|
177
|
<property name="build.samples" value="${build.dir}/samples"/>
|
178
|
<property name="build.tests" value="${build.dir}/tests"/>
|
179
|
<property name="build.metacattest" value="${build.tests}/metacattest"/>
|
180
|
<property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
|
181
|
<property name="build.data" value="${build.dir}/data"/>
|
182
|
<property name="build.javadocs" value="${build.dir}/docs/api"/>
|
183
|
<property name="build.img" value="${installdir}"/>
|
184
|
|
185
|
<property name="dist.dir" value="dist"/>
|
186
|
<property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
|
187
|
<property name="ver.src" value="${ver.dir}/src"/>
|
188
|
|
189
|
<property name="package.home" value="edu/ucsb/nceas/metacat" />
|
190
|
</target>
|
191
|
|
192
|
<target name="prepare" depends="init">
|
193
|
<mkdir dir="${build.dir}"/>
|
194
|
<mkdir dir="${build.src}"/>
|
195
|
<mkdir dir="${build.dest}"/>
|
196
|
<mkdir dir="${build.javadocs}"/>
|
197
|
|
198
|
<copy todir="${build.src}" filtering="yes">
|
199
|
<fileset dir="${srcdir}">
|
200
|
<include name="edu/**"/>
|
201
|
<include name="com/**"/>
|
202
|
<include name="**/*.sql"/>
|
203
|
<exclude name="**/CVS*"/>
|
204
|
<exclude name="**/.#*"/>
|
205
|
<exclude name="edu/ucsb/nceas/metacat/harvesterClient/*.*"/>
|
206
|
</fileset>
|
207
|
</copy>
|
208
|
</target>
|
209
|
|
210
|
<target name="compile" depends="prepare">
|
211
|
<javac srcdir="${build.src}"
|
212
|
destdir="${build.dest}"
|
213
|
classpath="${cpath}"
|
214
|
excludes="**/*.sql" />
|
215
|
<copy file="lib/metacat.properties"
|
216
|
tofile="${build.dest}/${package.home}/metacat.properties"
|
217
|
filtering="yes" />
|
218
|
<copy file="lib/srbProps.properties"
|
219
|
tofile="${build.dest}/${package.home}/srbProps.properties"/>
|
220
|
</target>
|
221
|
|
222
|
<target name="jar" depends="compile">
|
223
|
<delete file="${build.dir}/${name}.jar" />
|
224
|
<copy todir="${build.dest}">
|
225
|
<fileset dir="lib/srbrmi"/>
|
226
|
</copy>
|
227
|
<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
|
228
|
excludes="**/protocols/" />
|
229
|
</target>
|
230
|
|
231
|
<target name="protocol" depends="compile">
|
232
|
<delete file="${build.dir}/protocol.jar" />
|
233
|
<jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
|
234
|
includes="**/protocols/" />
|
235
|
</target>
|
236
|
|
237
|
<target name="getdtdschema" depends="prepare">
|
238
|
<echo>Enter CVS password: </echo>
|
239
|
<cvs cvsRoot="${cvsroot}"
|
240
|
package="${eml-module}"
|
241
|
tag="${eml-tag}"
|
242
|
dest="${build.src}" />
|
243
|
<mkdir dir="lib/dtd" />
|
244
|
<copy todir="lib/dtd" filtering="yes">
|
245
|
<fileset dir="${build.src}/${eml-module}">
|
246
|
<include name="*.dtd"/>
|
247
|
</fileset>
|
248
|
<mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
|
249
|
</copy>
|
250
|
<echo>Enter CVS password: </echo>
|
251
|
<cvs cvsRoot="${cvsroot}"
|
252
|
package="${eml-module}"
|
253
|
tag="${eml2-tag}"
|
254
|
dest="${build.src}" />
|
255
|
<mkdir dir="lib/schema" />
|
256
|
<copy todir="lib/schema" filtering="yes">
|
257
|
<fileset dir="${build.src}/${eml-module}">
|
258
|
<include name="*.xsd"/>
|
259
|
</fileset>
|
260
|
</copy>
|
261
|
<copy todir="lib/style">
|
262
|
<fileset dir="${build.src}/${eml-module}/style">
|
263
|
<include name="*.xsl"/>
|
264
|
</fileset>
|
265
|
</copy>
|
266
|
</target>
|
267
|
|
268
|
<target name="getdtd" depends="prepare">
|
269
|
<echo>Enter CVS password: </echo>
|
270
|
<cvs cvsRoot="${cvsroot}"
|
271
|
package="${eml-module}"
|
272
|
tag="${eml-tag}"
|
273
|
dest="${build.src}" />
|
274
|
<mkdir dir="lib/dtd" />
|
275
|
<copy todir="lib/dtd" filtering="yes">
|
276
|
<fileset dir="${build.src}/${eml-module}">
|
277
|
<include name="*.dtd"/>
|
278
|
</fileset>
|
279
|
<mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
|
280
|
</copy>
|
281
|
</target>
|
282
|
|
283
|
<target name="getschema" depends="prepare">
|
284
|
<echo>Enter CVS password: </echo>
|
285
|
<cvs cvsRoot="${cvsroot}"
|
286
|
package="${eml-module}"
|
287
|
tag="${eml2-tag}"
|
288
|
dest="${build.src}" />
|
289
|
<mkdir dir="lib/schema" />
|
290
|
<copy todir="lib/schema" filtering="yes">
|
291
|
<fileset dir="${build.src}/${eml-module}">
|
292
|
<include name="*.xsd"/>
|
293
|
</fileset>
|
294
|
</copy>
|
295
|
<copy todir="lib/style">
|
296
|
<fileset dir="${build.src}/${eml-module}/style">
|
297
|
<include name="*.xsl"/>
|
298
|
</fileset>
|
299
|
</copy>
|
300
|
</target>
|
301
|
|
302
|
<target name="dtdschemasql" depends="prepare">
|
303
|
<echo/>
|
304
|
<echo>Registering the DTDs with the new Metacat instance...</echo>
|
305
|
<sql driver="${dbDriver}"
|
306
|
classpath="${jdbc}"
|
307
|
url="${jdbc-connect}"
|
308
|
userid="${user}"
|
309
|
password="${password}"
|
310
|
src="${build.src}/loaddtdschema.sql" />
|
311
|
</target>
|
312
|
|
313
|
<target name="schemasql" depends="prepare">
|
314
|
<echo/>
|
315
|
<echo>Registering the DTDs with the new Metacat instance...</echo>
|
316
|
<sql driver="${dbDriver}"
|
317
|
classpath="${jdbc}"
|
318
|
url="${jdbc-connect}"
|
319
|
userid="${user}"
|
320
|
password="${password}"
|
321
|
src="${build.src}/loadschema.sql" />
|
322
|
</target>
|
323
|
|
324
|
<target name="install" depends="jar">
|
325
|
<mkdir dir="${datafilepath}" />
|
326
|
<mkdir dir="${inlinedatafilepath}" />
|
327
|
<chmod dir="${datafilepath}" perm="ug+w" />
|
328
|
<mkdir dir="${installdir}/WEB-INF/lib" />
|
329
|
<copy file="${build.dir}/${name}.jar"
|
330
|
tofile="${installdir}/WEB-INF/lib/${name}.jar" />
|
331
|
<copy file="${xmlp}"
|
332
|
tofile="${installdir}/WEB-INF/lib/xercesImpl.jar" />
|
333
|
<copy file="${xalan}"
|
334
|
tofile="${installdir}/WEB-INF/lib/xalan.jar" />
|
335
|
<copy file="${apis}"
|
336
|
tofile="${installdir}/WEB-INF/lib/xml-apis.jar" />
|
337
|
<copy file="${jdbc}"
|
338
|
tofile="${installdir}/WEB-INF/lib/jdbc.jar" />
|
339
|
<copy file="${cos}"
|
340
|
tofile="${installdir}/WEB-INF/lib/cos.jar" />
|
341
|
<copy file="${morpho}"
|
342
|
tofile="${installdir}/WEB-INF/lib/morpho.jar" />
|
343
|
<copy file="${emlparser}"
|
344
|
tofile="${installdir}/WEB-INF/lib/eml.jar" />
|
345
|
<copy file="${configxml}"
|
346
|
tofile="${installdir}/WEB-INF/lib/configxml.jar" />
|
347
|
<copy file="${itislib}"
|
348
|
tofile="${installdir}/WEB-INF/lib/itislib.jar" />
|
349
|
<copy file="lib/web.xml.${tomcatversion}"
|
350
|
tofile="${installdir}/WEB-INF/web.xml" />
|
351
|
<copy todir="${build.img}" filtering="no">
|
352
|
<fileset dir="lib">
|
353
|
<include name="**/*.jpg"/>
|
354
|
<include name="**/*.png"/>
|
355
|
<include name="**/*.gif"/>
|
356
|
</fileset>
|
357
|
</copy>
|
358
|
<copy todir="${installdir}" filtering="yes">
|
359
|
<fileset dir="lib">
|
360
|
<exclude name="*.jar"/>
|
361
|
<exclude name="*.properties"/>
|
362
|
<exclude name="web.xml"/>
|
363
|
<exclude name="**/srbrmi*"/>
|
364
|
<exclude name="**/*.jpg"/>
|
365
|
<exclude name="**/*.png"/>
|
366
|
<exclude name="**/*.gif"/>
|
367
|
</fileset>
|
368
|
</copy>
|
369
|
<echo>
|
370
|
***********************************************************
|
371
|
Remember to register the default DTDs by running the
|
372
|
"${build.src}/loaddtd.sql script". This is most easily
|
373
|
done by using the "ant dtdsql" which will run it for you.
|
374
|
***********************************************************
|
375
|
</echo>
|
376
|
</target>
|
377
|
|
378
|
<target name="test" depends="install">
|
379
|
<!-- copy and compile the tests into a jar file -->
|
380
|
<mkdir dir="${build.metacattest}"/>
|
381
|
<javac srcdir="${junittestsdir}"
|
382
|
destdir="${build.metacattest}"
|
383
|
classpath="${cpath}:${build.dir}/${name}.jar"
|
384
|
debug="on"
|
385
|
includes="**/*.java" />
|
386
|
|
387
|
<jar jarfile="${build.dir}/${name}-junittests.jar"
|
388
|
basedir="${build.metacattest}"
|
389
|
includes="**/*.class" />
|
390
|
|
391
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
392
|
<junit printsummary="yes" haltonfailure="no" fork="no"
|
393
|
haltonerror="no">
|
394
|
<classpath>
|
395
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-junittests.jar" />
|
396
|
</classpath>
|
397
|
|
398
|
<formatter type="plain" />
|
399
|
|
400
|
<batchtest fork="yes" todir="${build.dir}">
|
401
|
<fileset dir="${build.metacattest}">
|
402
|
<include name="**/*.class" />
|
403
|
</fileset>
|
404
|
</batchtest>
|
405
|
</junit>
|
406
|
</target>
|
407
|
|
408
|
<target name="runonetest" depends="install">
|
409
|
<!-- copy and compile the tests into a jar file -->
|
410
|
<!--<property name="testtorun" value="SubTreeTest"/> -->
|
411
|
<echo>testtorun: ${testtorun}</echo>
|
412
|
<mkdir dir="${build.metacattest}"/>
|
413
|
<javac srcdir="${junittestsdir}"
|
414
|
destdir="${build.metacattest}"
|
415
|
classpath="${cpath}:${build.dir}/${name}.jar"
|
416
|
includes="**/*.java" />
|
417
|
|
418
|
<jar jarfile="${build.dir}/${name}-junittests.jar"
|
419
|
basedir="${build.metacattest}"
|
420
|
includes="**/*.class" />
|
421
|
|
422
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
423
|
<junit printsummary="yes" haltonfailure="no" fork="no"
|
424
|
haltonerror="no">
|
425
|
<classpath>
|
426
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-junittests.jar" />
|
427
|
</classpath>
|
428
|
|
429
|
<formatter type="plain" />
|
430
|
|
431
|
<batchtest fork="yes" todir="${build.dir}">
|
432
|
<fileset dir="${build.metacattest}">
|
433
|
|
434
|
<include name="**/${testtorun}.class" />
|
435
|
</fileset>
|
436
|
</batchtest>
|
437
|
</junit>
|
438
|
</target>
|
439
|
|
440
|
<target name="gethttpclient" depends="prepare">
|
441
|
<!--mkdir dir="${morphosourcedir}" -->
|
442
|
<cvs cvsRoot="${cvsroot}"
|
443
|
package="morpho"
|
444
|
dest="." />
|
445
|
<ant dir="${morphosourcedir}" inheritAll="false" target="jar" />
|
446
|
</target>
|
447
|
|
448
|
<!-- run this target, we need to check out a another morpho souce dir was checked out. -->
|
449
|
<target name="nettest" depends="install">
|
450
|
<echo>***********************************
|
451
|
Please run ant gethttpclient first!
|
452
|
***********************************
|
453
|
</echo>
|
454
|
<!-- copy and compile the tests into a jar file -->
|
455
|
<mkdir dir="${build.metacatnettest}"/>
|
456
|
<javac srcdir="${junitnettestsdir}"
|
457
|
destdir="${build.metacatnettest}"
|
458
|
classpath="${cpath}:${build.dir}/${name}.jar:${httpclient}"
|
459
|
includes="**/*.java" />
|
460
|
|
461
|
<jar jarfile="${build.dir}/${name}-junitnettests.jar"
|
462
|
basedir="${build.metacatnettest}"
|
463
|
includes="**/*.class" />
|
464
|
|
465
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
466
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
467
|
haltonerror="no">
|
468
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
|
469
|
<classpath>
|
470
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${httpclient}:${build.dir}/${name}-junitnettests.jar:${itis}" />
|
471
|
</classpath>
|
472
|
|
473
|
<formatter type="plain" />
|
474
|
|
475
|
<batchtest fork="yes" todir="${build.dir}">
|
476
|
<fileset dir="${build.metacatnettest}">
|
477
|
<include name="**/*.class" />
|
478
|
</fileset>
|
479
|
</batchtest>
|
480
|
</junit>
|
481
|
</target>
|
482
|
|
483
|
<target name="servletclean" depends="clean">
|
484
|
<delete dir="${installdir}" />
|
485
|
</target>
|
486
|
|
487
|
|
488
|
<target name="clean" depends="init">
|
489
|
<delete dir="${build.dir}" />
|
490
|
</target>
|
491
|
|
492
|
<target name="jdoc" depends="prepare">
|
493
|
<javadoc packagenames="edu.ucsb.nceas.*"
|
494
|
sourcepath="${build.src}"
|
495
|
destdir="${build.javadocs}"
|
496
|
author="true"
|
497
|
version="true"
|
498
|
use="true"
|
499
|
windowtitle="${Name} API"
|
500
|
doctitle="<h1>${Name}</h1>"
|
501
|
bottom="<i>Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>"
|
502
|
/>
|
503
|
</target>
|
504
|
|
505
|
<target name="dist" depends="jar,protocol,jdoc,getdtd,getschema">
|
506
|
<mkdir dir="${dist.dir}"/>
|
507
|
<delete dir="${ver.dir}" />
|
508
|
<mkdir dir="${ver.dir}"/>
|
509
|
<copy todir="${ver.dir}">
|
510
|
<fileset dir="."
|
511
|
excludes="**/CVS* **/.#* **/src* **/test* **/build* **/docs* ${dist.dir}"/>
|
512
|
</copy>
|
513
|
<copy todir="${ver.dir}" file="build.xml"/>
|
514
|
<copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
|
515
|
<copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
|
516
|
|
517
|
<copy todir="${ver.dir}/docs" filtering="yes">
|
518
|
<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
|
519
|
</copy>
|
520
|
<copy todir="${ver.dir}/docs" filtering="no">
|
521
|
<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
|
522
|
</copy>
|
523
|
<copy todir="${ver.dir}/docs/dev">
|
524
|
<fileset dir="${build.dir}/docs"/>
|
525
|
</copy>
|
526
|
<copy todir="${ver.dir}/src">
|
527
|
<fileset dir="${build.dir}/src"/>
|
528
|
</copy>
|
529
|
|
530
|
<delete dir="./${ver.dir}/${build.dir}"/>
|
531
|
<delete dir="./${ver.dir}/dist"/>
|
532
|
<delete file="./${name}-${release}.zip"/>
|
533
|
<zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
534
|
<delete file="./${name}-${release}.tar.gz" />
|
535
|
<tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
536
|
<gzip zipfile="./${name}-${release}.tar.gz"
|
537
|
src="./${name}-${release}.tar"/>
|
538
|
<delete file="./${name}-${release}.tar" />
|
539
|
</target>
|
540
|
|
541
|
<target name="distsrc" depends="dist">
|
542
|
<mkdir dir="${ver.src}"/>
|
543
|
<copy todir="${ver.src}">
|
544
|
<fileset dir="./src"/>
|
545
|
</copy>
|
546
|
|
547
|
<delete file="./${name}-src-${release}.zip"/>
|
548
|
<zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
|
549
|
<delete file="./${name}-src-${release}.tar.gz" />
|
550
|
<tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
|
551
|
<gzip zipfile="./${name}-src-${release}.tar.gz"
|
552
|
src="./${name}-src-${release}.tar"/>
|
553
|
<delete file="./${name}-src-${release}.tar" />
|
554
|
<delete dir="${dist.dir}"/>
|
555
|
</target>
|
556
|
|
557
|
<target name="stylesheettest">
|
558
|
<xslt in="${input}" out="eml.html" style="lib/style/eml2/eml-2.0.0.xsl">
|
559
|
<param name="displaymodule" expression="${displaymodule}"/>
|
560
|
<param name="docid" expression="${input}"/>
|
561
|
<param name="entitytype" expression="${entitytype}"/>
|
562
|
<param name="entityindex" expression="${entityindex}"/>
|
563
|
<outputproperty name="method" value="html"/>
|
564
|
<outputproperty name="standalone" value="yes"/>
|
565
|
<outputproperty name="encoding" value="iso8859_1"/>
|
566
|
<outputproperty name="indent" value="yes"/>
|
567
|
</xslt>
|
568
|
</target>
|
569
|
|
570
|
</project>
|