Project

General

Profile

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: leinfelder $'
10
	*    '$Date: 2011-01-05 12:54:25 -0800 (Wed, 05 Jan 2011) $'
11
	*    '$Revision: 5773 $'
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
         xmlns:artifact="antlib:org.apache.maven.artifact.ant">
34
	<property environment="env" />
35
	<property file="build.properties" /><!-- USER SPECIFIC PROPS -->
36

    
37

    
38
    <!-- Configure the maven2 ant tasks -->
39
    <path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.0.jar" />
40
    <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
41
             uri="antlib:org.apache.maven.artifact.ant"
42
             classpathref="maven-ant-tasks.classpath" />
43

    
44
	<!-- Determine if ecogrid should be installed-->
45
	<condition property="enable.ecogrid">
46
		<equals arg1="${install.ecogrid}" arg2="true" />
47
	</condition>
48

    
49
	<!-- Determine if perl should be built-->
50
	<condition property="build.perl">
51
		<equals arg1="${make.perl.code}" arg2="true" />
52
	</condition>
53

    
54
	<!-- Determine if dataone-service should be built-->
55
	<condition property="d1.available">
56
        <and>
57
	        <available file="${d1.dir}"/>
58
	        <available file="${maven.home}"/>
59
        </and>
60
	</condition>
61

    
62
	<available file="${build.tomcat.dir}/common/lib/servlet-api.jar" 
63
			property="tomcat.common.exists" />
64

    
65
	<target name="config" depends="setTomcatCommon, setTomcatNoCommon">
66
		<!-- usr for client testing, generally you don't need change-->
67
		<property name="mcuser"
68
			value="uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org" />
69
		<property name="mcpassword" value="kepler" />
70
		<property name="mcanotheruser"
71
			value="uid=tao,o=NCEAS,dc=ecoinformatics,dc=org" />
72
		<property name="mcanotherpassword" value="yourpass" />
73
		<property name="piscouser"
74
			value="uid=tao,o=PISCO,dc=ecoinformatics,dc=org" />
75
		<property name="piscopassword" value="yourpass" />
76
		<property name="lteruser"
77
			value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org" />
78
		<property name="lterpassword" value="yourpass" />
79

    
80
		<property name="debug" value="on" />
81
		<property name="morphosourcedir" value="../morpho" />
82
		<property name="utilitiesdir" value="../utilities" />
83
		<property name="installdir"
84
			value="${app.deploy.dir}/${metacat.context}" />
85

    
86
		<echo>*********** set jsdk to ${jsdk}</echo>
87
	</target>
88
	
89
	<target name="setTomcatCommon" if="tomcat.common.exists" >
90
		<property name="jsdk"
91
			value="${build.tomcat.dir}/common/lib/servlet-api.jar" />
92
	</target>
93
	
94
	<target name="setTomcatNoCommon" unless="tomcat.common.exists" >
95
		<property name="jsdk"
96
			value="${build.tomcat.dir}/lib/servlet-api.jar" />
97
	</target>
98
	
99
	<target name="init" depends="config">
100
		<path id="compile.classpath">
101
			<pathelement location="${jsdk}" />
102
			<pathelement location="lib" />
103
			<fileset dir="lib">
104
				<include name="*.jar" />
105
			</fileset>
106
			<fileset dir="lib">
107
				<include name="xalan.jar" />
108
			</fileset>
109
			<fileset dir="lib/lsid_lib">
110
				<include name="*.jar" />
111
			</fileset>
112

    
113
			<!-- Include geoserver, geotools, et. al. -->
114
			<fileset dir="lib/spatial/geoserver/WEB-INF/lib">
115
				<include name="*.jar" />
116
			</fileset>
117
			<pathelement
118
				location="lib/spatial/geoserver/WEB-INF/classes" />
119

    
120
			<!-- Include OAI-PMH -->
121
			<fileset dir="lib/oaipmh">
122
				<include name="*.jar" />
123
			</fileset>
124

    
125
		</path>
126
		
127
		<path id="test.classpath">
128
			<pathelement location="${jsdk}" />
129
			<pathelement location="lib" />
130
			<fileset dir="lib">
131
				<include name="*.jar" />
132
				<exclude name="maven-ant-tasks-2.1.0.jar" />
133
			</fileset>
134
			<fileset dir="lib">
135
				<include name="xalan.jar" />
136
			</fileset>
137
			<fileset dir="lib/lsid_lib">
138
				<include name="*.jar" />
139
			</fileset>
140

    
141
			<!-- Include geoserver, geotools, et. al. -->
142
			<fileset dir="lib/spatial/geoserver/WEB-INF/lib">
143
				<include name="*.jar" />
144
			</fileset>
145
			<pathelement
146
				location="lib/spatial/geoserver/WEB-INF/classes" />
147

    
148
			<!-- Include OAI-PMH -->
149
			<fileset dir="lib/oaipmh">
150
				<include name="*.jar" />
151
			</fileset>
152

    
153
		</path>
154

    
155
		<!-- It is less likely you'll need to make any changes from here down,
156
			but customization is possible -->
157
		<property name="name" value="metacat" />
158
		<property name="Name" value="MetaCat" />
159
		<property name="debugprefix" value="${Name}:" />
160
		<property name="release" value="${metacat.version}" />
161
		<property name="style-common-relpath" value="/style/common" />
162
		<property name="style-shared-relpath" value="/style/shared" />
163
		<property name="schema-relpath" value="/schema" />
164
		<property name="style-common-cvsrelpath"
165
			value="lib${style-common-relpath}" />
166
		<property name="schema-cvsrelpath" value="lib${schema-relpath}" />
167
		<property name="style-skins-relpath" value="/style/skins" />
168
		<property name="util-module" value="utilities" />
169
		<!-- property name="utilities-tag" value="/tags/UTILITIES_1_0_1_RC2" / -->
170
		<property name="utilities-tag" value="trunk" />
171
		<property name="eml-module" value="eml" />
172
		<property name="eml-version" value="2.0.0beta6" />
173
		<property name="eml-beta-tag"
174
			value="BRANCH_EML_2_0_0_BETA_6_FOR_METACAT" />
175
		<property name="eml2_0_0-schema-tag"
176
			value="RELEASE_EML_2_0_0_UPDATE_1" />
177
		<property name="eml2_0_1-schema-tag" value="RELEASE_EML_2_0_1" />
178
		<property name="eml2_1_0-schema-tag" value="RELEASE_EML_2_1_0" />
179
		<property name="eml2_1_1-schema-tag" value="RELEASE_EML_2_1_1_RC_1" />
180
		<property name="dataone-schema-tag" value="D1_SCHEMA_0_5_1" />
181
		<property name="eml2-style-tag" value="RELEASE_EML_UTILS_1_0_0_RC3" />
182
		<property name="eml2_0_0namespace"
183
			value="eml://ecoinformatics.org/eml-2.0.0" />
184
		<property name="eml2_0_1namespace"
185
			value="eml://ecoinformatics.org/eml-2.0.1" />
186
		<property name="eml2_1_0namespace"
187
			value="eml://ecoinformatics.org/eml-2.1.0" />
188
		<property name="eml2_1_1namespace"
189
			value="eml://ecoinformatics.org/eml-2.1.1" />
190
		<property name="stmmlnamespace"
191
			value="http://www.xml-cml.org/schema/stmml" />
192
		<property name="eml-css" value="eml_xsl.css" />
193
		<property name="eml-module.default.css" value="default.css" />
194
		<property name="systemidserver" value="" />
195
		<property name="html-path" value="" />
196

    
197

    
198
		<!-- Config for registry variables -->
199
		<!-- TODO: SCW remove these, covered in metacat.properties or in skin.properties -->
200
		<property name="scope" value="obfs" />
201
		<property name="responseForm" value="genericResponse.tmpl" />
202
		<property name="entryForm" value="entryForm.tmpl" />
203
		<property name="guide" value="genericGuide.tmpl" />
204
		<property name="loginForm" value="loginForm.tmpl" />
205
		<property name="confirmData" value="confirmData.tmpl" />
206
		<property name="deleteData" value="deleteData.tmpl" />
207
		<property name="genericHeader" value="genericHeader.tmpl" />
208
		<property name="genericFooter" value="genericFooter.tmpl" />
209

    
210
		<filter token="scope" value="${scope}" />
211
		<filter token="responseForm" value="${responseForm}" />
212
		<filter token="entryForm" value="${entryForm}" />
213
		<filter token="guide" value="${guide}" />
214
		<filter token="loginForm" value="${loginForm}" />
215
		<filter token="confirmData" value="${confirmData}" />
216
		<filter token="deleteData" value="${deleteData}" />
217
		<filter token="genericHeader" value="${genericHeader}" />
218
		<filter token="genericFooter" value="${genericFooter}" />
219
		<filter token="adminname" value="${adminname}" />
220
		<filter token="recipient" value="${recipient}" />
221
		<filter token="metacatVersion" value="${metacat.version}" />
222
		<filter token="metacatRC" value="${metacat.releaseCandidate}" />
223
		<filter token="build.context" value="${metacat.context}" />
224

    
225
		<filter token="docrooturl" value="./" />
226
		<filter token="mcuser" value="${mcuser}" />
227
		<filter token="mcpassword" value="${mcpassword}" />
228
		<filter token="mcanotheruser" value="${mcanotheruser}" />
229
		<filter token="mcanotherpassword" value="${mcanotherpassword}" />
230
		<filter token="eml-css" value="${eml-css}" />
231
		<filter token="style-skins-relpath"
232
			value="${style-skins-relpath}" />
233
		<filter token="style-common-relpath"
234
			value="${style-common-relpath}" />
235

    
236
		<filter token="eml-version" value="${eml-version}" />
237
		<filter token="eml2_0_0namespace" value="${eml2_0_0namespace}" />
238
		<filter token="eml2_0_1namespace" value="${eml2_0_1namespace}" />
239
		<filter token="eml2_1_0namespace" value="${eml2_1_0namespace}" />
240
		<filter token="eml2_1_1namespace" value="${eml2_1_1namespace}" />
241
		<filter token="stmmlnamespace" value="${stmmlnamespace}" />
242
		<filter token="debugprefix" value="${debugprefix}" />
243

    
244
		<filter token="defaultStage" value="${defaultStage}" />
245
		<filter token="defaultHeader" value="${defaultHeader}" />
246
		<filter token="defaultFooter" value="${defaultFooter}" />
247
		<filter token="defaultChangePass" value="${defaultChangePass}" />
248
		<filter token="defaultResetPass" value="${defaultResetPass}" />
249
		<filter token="changePassSuccess" value="${changePassSuccess}" />
250
		<filter token="resetPassSuccess" value="${resetPassSuccess}" />
251
		<filter token="registerFailed" value="${registerFailed}" />
252
		<filter token="registerLter" value="${registerLter}" />
253
		<filter token="registerMatch" value="${registerMatch}" />
254
		<filter token="registerSuccess" value="${registerSuccess}" />
255
		<filter token="register" value="${register}" />
256
		<filter token="searchResults" value="${searchResults}" />
257
		<filter token="ldapMainServerFailure"
258
			value="${ldapMainServerFailure}" />
259
		<filter token="lter-user" value="${lteruser}" />
260
		<filter token="lter-pass" value="${lterpassword}" />
261
		<filter token="pisco-user" value="${piscouser}" />
262
		<filter token="pisco-pass" value="${piscopassword}" />
263

    
264

    
265
		<!-- MCD BYE filter token="timedreplication"     value="${timedreplication}" / -->
266
		<!-- MCD BYE filter token="firsttimedreplication" value="${firsttimedreplication}" / -->
267
		<!-- MCD BYE filter token="timedreplicationinterval" value="${timedreplicationinterval}" / -->
268

    
269
		<property name="srcdir" value="./src" />
270
		<property name="lib.dir" value="./lib" />
271
		<property name="docdir" value="./docs" />
272
		<property name="cgidir" value="./cgi-bin" />
273
		<property name="testdir" value="./test" />
274
		<property name="testtorun" value="InternationalizationTest" />
275
		<property name="junittestsdir"
276
			value="./test/edu/ucsb/nceas/metacattest" />
277
		<property name="junitnettestsdir"
278
			value="./test/edu/ucsb/nceas/metacatnettest" />
279
		<property name="build.dir" value="./build" />
280
		<property name="build.src" value="${build.dir}/src" />
281
		<property name="build.dest" value="${build.dir}/classes" />
282
		<property name="build.samples" value="${build.dir}/samples" />
283
		<property name="build.tests" value="${build.dir}/tests" />
284
		<property name="build.tmp" value="${build.dir}/tmp" />
285
		<property name="build.metacattest"
286
			value="${build.tests}/metacattest" />
287
		<property name="build.metacatnettest"
288
			value="${build.tests}/metacatnettest" />
289
		<property name="build.data" value="${build.dir}/data" />
290
		<property name="build.javadocs" value="${build.dir}/docs/api" />
291
		<property name="build.war" value="${build.dir}/war" />
292
		<property name="dist.dir" value="dist" />
293
		<property name="ver.dir" value="${dist.dir}/${name}-${release}" />
294
		<property name="ver.src" value="${ver.dir}/src" />
295
		<property name="util.dir" value="${dist.dir}/${util-module}" />
296
		<property name="test.dir" value="${dist.dir}/test" />
297
		<!-- directories for creating a Harvest List Editor distribution -->
298
		<property name="dist.dir.hle" value="disthle" />
299
		<property name="ver.dir.hle"
300
			value="${dist.dir.hle}/harvest-list-editor-${release}" />
301
		<property name="pkg.dir" value="./package" />
302
		<property name="deb.pkg.dir" value="${pkg.dir}/debian" />
303

    
304
		<property name="ecogrid-target-name" value="metacatImpl" />
305
		<property name="ecogrid-module-dest-dir" value=".." />
306
		<property name="ecogrid-module" value="seek/projects/ecogrid" />
307
		<property name="ecogrid-dist-dir"
308
			value="${dist.dir}/${ecogrid-module}" />
309
		<property name="ecogrid-dir"
310
			value="${ecogrid-module-dest-dir}/${ecogrid-module}" />
311

    
312
		<property name="package.home" value="edu/ucsb/nceas/metacat" />
313

    
314
		<!-- set up svn -->
315
		<property name="svnant.lib" value="lib" />
316
		<property name="svnant.jar" value="${svnant.lib}/svnant.jar" />
317
		<property name="svnClientAdapter.jar"
318
			value="${svnant.lib}/svnClientAdapter.jar" />
319
		<property name="svnjavahl.jar"
320
			value="${svnant.lib}/svnjavahl.jar" />
321
		<property name="svn.utilitiesUrl"
322
			value="https://code.ecoinformatics.org/code/utilities/${utilities-tag}" />
323
		<property name="svn.ecogridUrl"
324
			value="https://code.ecoinformatics.org/code/seek/trunk/projects/ecogrid/" />
325
		<property name="svn.emlBetaUrl"
326
			value="https://code.ecoinformatics.org/code/eml/branches/${eml-beta-tag}" />
327
		<property name="svn.eml200SchemaUrl"
328
			value="https://code.ecoinformatics.org/code/eml/tags/${eml2_0_0-schema-tag}" />
329
		<property name="svn.eml201SchemaUrl"
330
			value="https://code.ecoinformatics.org/code/eml/tags/${eml2_0_1-schema-tag}" />
331
		<property name="svn.eml210SchemaUrl"
332
			value="https://code.ecoinformatics.org/code/eml/tags/${eml2_1_0-schema-tag}" />
333
		<property name="svn.eml211SchemaUrl"
334
			value="https://code.ecoinformatics.org/code/eml/tags/${eml2_1_1-schema-tag}" />
335
		<property name="svn.dataone-0.1-schema-url"
336
			value="https://repository.dataone.org/software/cicore/tags/${dataone-schema-tag}" />
337
		<property name="svn.eml2StyleUrl"
338
			value="https://code.ecoinformatics.org/code/eml/tags/${eml2-style-tag}" />
339

    
340
		<!-- load the svn task -->
341
		<path id="svn.classpath">
342
			<pathelement location="${svnjavahl.jar}" />
343
			<pathelement location="${svnant.jar}" />
344
			<pathelement location="${svnClientAdapter.jar}" />
345
		</path>
346
		<taskdef resource="svntask.properties"
347
			classpathref="svn.classpath" />
348

    
349
		<condition property="utilities.required">
350
			<or>
351
				<not>
352
					<available file="lib/httpclient.jar" />
353
				</not>
354
				<not>
355
					<available file="lib/utilities.jar" />
356
				</not>
357
				<not>
358
					<available file="${utilitiesdir}" type="dir" />
359
				</not>
360
			</or>
361
		</condition>
362
		<!-- peer.utilities.required is used when there is no utilities 
363
			directory at ${utilitiesdir} -->
364
		<condition property="peer.utilities.required">
365
			<or>
366
				<not>
367
					<available file="${utilitiesdir}" type="dir" />
368
				</not>
369
			</or>
370
		</condition>
371
		<condition property="eml.required">
372
			<or>
373
				<not>
374
					<available file="lib/schema/eml-2.0.1/eml.xsd" />
375
				</not>
376
				<not>
377
					<available file="lib/schema/eml-2.0.0/eml.xsd" />
378
				</not>
379
				<not>
380
					<available file="lib/schema/eml-2.1.0/eml.xsd" />
381
				</not>
382
				<not>
383
					<available
384
						file="lib/dtd/eml-dataset-2.0.0beta6.dtd" />
385
				</not>
386
			</or>
387
		</condition>
388

    
389
		<condition property="ecogrid.required">
390
			<or>
391
				<not>
392
					<available file="${ecogrid-dir}/build.properties" />
393
				</not>
394
				<not>
395
					<available
396
						file="${ecogrid-dir}/buildfiles/metacatImpl.xml" />
397
				</not>
398
			</or>
399
		</condition>
400

    
401
	</target>
402

    
403
	<target name="prepare" depends="init">
404
		<mkdir dir="${build.dir}" />
405
		<mkdir dir="${build.src}" />
406
		<mkdir dir="${build.dest}" />
407
		<mkdir dir="${build.javadocs}" />
408
		<mkdir dir="${build.tmp}" />
409

    
410
		<copy todir="${build.src}" filtering="yes">
411
			<fileset dir="${srcdir}">
412
				<include name="edu/**" />
413
				<include name="com/**" />
414
				<include name="org/**" />
415
				<!-- include name="java/**" / -->
416
				<include name="**/*.sql" />
417
				<exclude name="**/CVS*" />
418
				<exclude name="**/.#*" />
419
				<exclude name="edu/ucsb/nceas/workflowscheduler/**" />
420
			</fileset>
421
		</copy>
422
		<available file="lib/style/common/emlb6toeml2" type="dir"
423
			property="styles.not.needed" />
424
	</target>
425

    
426
	<taskdef resource="axis-tasks.properties"
427
		classpathref="compile.classpath" />
428

    
429
	<target name="generateStubs" depends="prepare">
430
		<echo
431
			message=" Generating stubs for execution service from ${/tmp/KeplerWebService.wsdl}" />
432
		<axis-wsdl2java verbose="true" output="${srcdir}"
433
			url="/tmp/KeplerWebService.wsdl" />
434
	</target>
435

    
436
	<target name="compile" depends="dataone-service,prepare,utilities"
437
		description="Compiles java code to build dir, and copies metacat props files there">
438

    
439
		<javac srcdir="${build.src}" destdir="${build.dest}"
440
			debug="${debug}"
441
			excludes="**/*.sql **/stringclient/** **/client/*.java **/harvesterClient/*.java">
442
			<classpath>
443
				<path refid="compile.classpath" />
444
			</classpath>
445
		</javac>
446
	</target>
447

    
448
	<target name="jar" depends="compile,geteml,getd1schemas"
449
		description="Compiles and jars metacat java code to metacat.jar in build dir ">
450

    
451
		<delete file="${build.dir}/${name}.jar" />
452
		<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
453
			excludes="**/protocols/ **/harvesterClient/" />
454
	</target>
455

    
456
	<target name="protocol" depends="compile"
457
		description="Compiles and jars protocol java code to protocol.jar in build dir">
458
		<delete file="${build.dir}/protocol.jar" />
459
		<jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
460
			includes="**/protocols/" />
461
	</target>
462

    
463
	<target name="utilities" depends="config,getpeerutilities"
464
		if="utilities.required">
465
		<ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
466
		<ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
467
		<copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
468
		<copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
469
	</target>
470

    
471
	<target name="getpeerutilities" depends="prepare"
472
		if="peer.utilities.required"
473
		description="Checks utilities out of svn and copies it to your utilitiesdir if it does not already exist">
474
		<echo message="Exporting utilities files from svn repository:" />
475
		<svn>
476
			<export srcUrl="${svn.utilitiesUrl}"
477
				destPath="${utilitiesdir}" />
478
		</svn>
479

    
480
		<!--  ant dir="${utilitiesdir}" inheritAll="false"  target="dist" / -->
481
	</target>
482

    
483
	<target name="getutilities" depends="prepare"
484
		description="Checks utility out of svn and copies it to your metacat sandbox">
485
		<svn>
486
			<export srcUrl="${svn.utilitiesUrl}"
487
				destPath="${utilitiesdir}" />
488
		</svn>
489
	</target>
490

    
491
	<target name="client" depends="utilities, prepare"
492
		description="Compiles metacat-client java code to build dir">
493
		<javac srcdir="${build.src}" destdir="${build.dest}"
494
			includes="edu/ucsb/nceas/metacat/client/*">
495
			<classpath>
496
				<path refid="compile.classpath" />
497
			</classpath>
498
		</javac>
499
	</target>
500

    
501
	<target name="clientjar" depends="client"
502
		description="Compiles and jars metacat-client java code to metacat-client.jar in build dir">
503
		<delete file="${build.dir}/${name}-client.jar" />
504
		<jar jarfile="${build.dir}/${name}-client.jar"
505
			basedir="${build.dest}" includes="**/metacat/client/" />
506
	</target>
507

    
508
	<target name="advancedsearchjar" depends="compile"
509
		description="Compiles and jars advanced search Java code to advancedsearch.jar in build dir">
510
		<delete file="${build.dir}/advancedsearch.jar" />
511
		<jar jarfile="${build.dir}/advancedsearch.jar"
512
			basedir="${build.dest}" includes="**/metacat/advancedsearch/" />
513
	</target>
514

    
515
	<target name="harvester" depends="client"
516
		description="Compiles harvester java code to build dir">
517
		<javac srcdir="${build.src}" destdir="${build.dest}"
518
			includes="edu/ucsb/nceas/metacat/harvesterClient/*">
519
			<classpath>
520
				<path refid="compile.classpath" />
521
			</classpath>
522
		</javac>
523
	</target>
524

    
525
	<target name="harvesterjar" depends="harvester"
526
		description="Compiles and jars harvester java code to harvester.jar in build dir">
527
		<delete file="${build.dir}/harvester.jar" />
528
		<jar jarfile="${build.dir}/harvester.jar"
529
			basedir="${build.dest}" includes="**/metacat/harvesterClient/" />
530
	</target>
531

    
532
	<target name="harvestListEditorDist" depends="harvesterjar"
533
		description="Prepares a distribution of the Harvest List Editor tool">
534
		<mkdir dir="${dist.dir.hle}" />
535
		<delete dir="${ver.dir.hle}" />
536
		<mkdir dir="${ver.dir.hle}" />
537
		<copy todir="${ver.dir.hle}" file="${build.dir}/harvester.jar" />
538
		<copy todir="${ver.dir.hle}" file="lib/xercesImpl.jar" />
539
		<copy todir="${ver.dir.hle}"
540
			file="lib/harvester/harvestList.xsd" />
541
		<copy todir="${ver.dir.hle}"
542
			file="lib/harvester/harvestListEditor.bat" />
543
		<copy todir="${ver.dir.hle}"
544
			file="lib/harvester/harvestListEditor.sh" />
545
		<delete file="./harvest-list-editor-${release}.zip" />
546
		<zip zipfile="./harvest-list-editor-${release}.zip"
547
			basedir="${ver.dir.hle}" />
548
		<delete file="./harvest-list-editor-${release}.tar.gz" />
549
		<tar tarfile="./harvest-list-editor-${release}.tar"
550
			basedir="${ver.dir.hle}" />
551
		<gzip zipfile="./harvest-list-editor-${release}.tar.gz"
552
			src="./harvest-list-editor-${release}.tar" />
553
		<delete file="./harvest-list-editor-${release}.tar" />
554
	</target>
555

    
556
	<target name="geteml" depends="getemlpre2,geteml2+,getConversionXSL"
557
		if="eml.required" description="Calls getemlpre2 and geteml2+ targets" />
558

    
559
	<target name="getemlpre2" depends="prepare" if="eml.required"
560
		description="Checks EML-beta6 out of svn and copies dtds and xsl to your metacat sandbox">
561
		<svn>
562
			<export srcUrl="${svn.emlBetaUrl}"
563
				destPath="${build.tmp}/eml_${eml-beta-tag}" />
564
		</svn>
565
		<mkdir dir="lib/dtd" />
566
		<copy todir="lib/dtd" filtering="yes">
567
			<fileset
568
				dir="${build.tmp}/eml_${eml-beta-tag}">
569
				<include name="*.dtd" />
570
			</fileset>
571
			<mapper type="glob" from="eml-*.dtd"
572
				to="eml-*-${eml-version}.dtd" />
573
		</copy>
574

    
575
		<copy todir="${style-common-cvsrelpath}" filtering="yes">
576
			<fileset
577
				dir="${build.tmp}/eml_${eml-beta-tag}/style">
578
				<include name="**/*.xsl" />
579
			</fileset>
580
		</copy>
581
	</target>
582

    
583
	<target name="geteml2+" depends="prepare" if="eml.required"
584
		description="Checks eml-2 out of svn and copies schema and xsl to your metacat sandbox">
585
		<svn>
586
			<export srcUrl="${svn.eml200SchemaUrl}"
587
				destPath="${build.tmp}/eml_${eml2_0_0-schema-tag}" />
588
		</svn>
589
		<mkdir dir="lib/schema/eml-2.0.0" />
590
		<copy todir="lib/schema/eml-2.0.0" filtering="yes">
591
			<fileset
592
				dir="${build.tmp}/eml_${eml2_0_0-schema-tag}">
593
				<include name="*.xsd" />
594
			</fileset>
595

    
596
			<!-- shouldn't we have a mapper here like this??
597
				<mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" />
598
				
599
				Jing's code didn't nave one - does it need to be added?
600
				NOTE that eml-version is set to beta 6, so this would need changing -->
601

    
602
		</copy>
603
		<!-- <antcall target="copyxsl">
604
			<param name="cvs.tagname" value="${eml2_0_0-schema-tag}" />
605
			<param name="dirname" value="eml-2.0.0" />
606
			</antcall> -->
607

    
608
		<!-- Checkout eml201 for given schema tag-->
609
		<svn>
610
			<export srcUrl="${svn.eml201SchemaUrl}"
611
				destPath="${build.tmp}/eml_${eml2_0_1-schema-tag}" />
612
		</svn>
613
		<mkdir dir="lib/schema/eml-2.0.1" />
614
		<copy todir="lib/schema/eml-2.0.1" filtering="yes">
615
			<fileset
616
				dir="${build.tmp}/eml_${eml2_0_1-schema-tag}">
617
				<include name="*.xsd" />
618
			</fileset>
619
		</copy>
620

    
621
		<!-- Checkout eml201 again for given style sheet tag-->
622
		<!-- echo>Enter CVS password: </echo>
623
			<cvs cvsRoot="${cvsroot}"
624
			package="${eml-module}"
625
			tag="${eml2_0_1-style-tag}"
626
			dest="${build.tmp}/eml_${eml2_0_1-style-tag}" />
627
			<antcall target="copyxsl">
628
			<param name="cvs.tagname" value="${eml2_0_1-style-tag}" />
629
			<param name="dirname" value="eml-2.0.1" />
630
			</antcall -->
631

    
632
		<!-- Checkout eml210 for given schema tag-->
633
		<svn>
634
			<export srcUrl="${svn.eml210SchemaUrl}"
635
				destPath="${build.tmp}/eml_${eml2_1_0-schema-tag}" />
636
		</svn>
637
		<mkdir dir="lib/schema/eml-2.1.0" />
638
		<copy todir="lib/schema/eml-2.1.0" filtering="yes">
639
			<fileset
640
				dir="${build.tmp}/eml_${eml2_1_0-schema-tag}">
641
				<include name="*.xsd" />
642
			</fileset>
643
		</copy>
644

    
645
		<!-- Checkout eml210 for given style sheet tag-->
646
		<svn>
647
			<export srcUrl="${svn.eml2StyleUrl}"
648
				destPath="${build.tmp}/eml_${eml2-style-tag}" />
649
		</svn>
650
		<antcall target="copyxsl">
651
			<param name="cvs.tagname" value="${eml2-style-tag}" />
652
			<!-- param name="dirname" value="eml-2.1.0" / -->
653
			<param name="dirname" value="eml-2" />
654
		</antcall>
655
		
656
		<!-- Checkout eml210 for given schema tag-->
657
		<svn>
658
			<export srcUrl="${svn.eml211SchemaUrl}"
659
				destPath="${build.tmp}/eml_${eml2_1_1-schema-tag}" />
660
		</svn>
661
		<mkdir dir="lib/schema/eml-2.1.1" />
662
		<copy todir="lib/schema/eml-2.1.1" filtering="yes">
663
			<fileset
664
				dir="${build.tmp}/eml_${eml2_1_1-schema-tag}">
665
				<include name="*.xsd" />
666
			</fileset>
667
		</copy>
668
	</target>
669
	
670
	<!-- copies the dataone schemas from a local source if you don't want
671
	     to have to make a ton of svn calls when you're testing (see getd1schemas) -->
672
	<target name="install-dataone" depends="init">
673
	  <property name="dataone-shema-dir" value="../cicore/schemas"/>
674
	  <property name="install-dataone-schema-dir" value="${installdir}/schema/${dataone-schema-tag}"/>
675
	  <mkdir dir="${install-dataone-schema-dir}"/>
676
	  <copy todir="${install-dataone-schema-dir}">
677
	    <fileset dir="${dataone-shema-dir}">
678
	      <include name="**/*.xsd"/>
679
	    </fileset>
680
	  </copy>
681
	</target>
682

    
683
	<!-- get the dataone schemas from svn -->
684
	<target name="getd1schemas" depends="prepare" 
685
		description="Checkout dataone schemas from svn and copy to metacat sandbox">
686
		<delete dir="${build.tmp}/${dataone-schema-tag}"/>
687
        <svn>
688
            <export srcUrl="${svn.dataone-0.1-schema-url}"
689
                destPath="${build.tmp}/${dataone-schema-tag}" />
690
        </svn>
691
        <mkdir dir="lib/schema/${dataone-schema-tag}" />
692
        <copy todir="lib/schema/${dataone-schema-tag}" filtering="yes">
693
            <fileset dir="${build.tmp}/${dataone-schema-tag}">
694
                <include name="*.xsd" />
695
            </fileset>
696
        </copy>
697
    </target>
698

    
699
	<target name="copyxsl"
700
		description="Copies xsl stylesheets from checkout in build/tmp to your metacat sandbox">
701

    
702
		<delete file="${style-common-cvsrelpath}/${eml-css}" />
703

    
704
		<copy todir="${style-common-cvsrelpath}/${dirname}"
705
			filtering="yes">
706
			<fileset
707
				dir="${build.tmp}/eml_${cvs.tagname}/style/eml">
708
				<include name="**/*.xsl" />
709
			</fileset>
710
		</copy>
711

    
712

    
713
		<!-- now copy default css from eml module and put it in style-common-path
714
			dir with a new name, so other skin-specific css can import it if reqd -->
715
		<copy
716
			file="${build.tmp}/eml_${cvs.tagname}/${eml-module.default.css}"
717
			tofile="${style-common-cvsrelpath}/${eml-css}" />
718

    
719
	</target>
720

    
721
	<target name="correctEML201Docs" depends="jar"
722
		description="Uses the ant  task to run a JAVA patch class to correct invalide eml201 documents which were generated by wrong schema">
723
		<copy todir="${build.dir}" file="lib/metacat.properties"
724
			filtering="yes" />
725
		<java
726
			classname="edu.ucsb.nceas.metacat.EML201DocumentCorrector">
727
			<classpath>
728
				<path refid="compile.classpath" />
729
				<fileset dir="${build.dir}">
730
					<include name="${name}.jar" />
731
				</fileset>
732
			</classpath>
733
		</java>
734
	</target>
735

    
736
	<target name="install-spatial" depends="jar,clientjar,harvesterjar"
737
		description="Installs spatial option for metacat">
738

    
739
		<property name="spatial.dir" value="./lib/spatial" />
740
		<property name="spatial.geoserver.dir"
741
			value="${spatial.dir}/geoserver" />
742
		<property name="spatial.webinf-mods"
743
			value="${spatial.dir}/WEB-INF" />
744

    
745
		<!-- Copy geoserver libs into ${war.lib} -->
746
		<copy todir="${war.lib}" filtering="no">
747
			<fileset dir="${spatial.geoserver.dir}/WEB-INF/lib">
748
				<include name="**" />
749
			</fileset>
750
		</copy>
751

    
752
		<!-- Copy everything in geoservers WEB-INF (except the libs) into ${war.webinf} -->
753
		<copy todir="${war.webinf}" filtering="no">
754
			<fileset dir="${spatial.geoserver.dir}/WEB-INF">
755
				<exclude name="lib/**" />
756
				<exclude name="web.xml" />
757
			</fileset>
758
		</copy>
759

    
760
		<!-- Copy the rest of the geoserver codebase into ${war.context} -->
761
		<copy todir="${war.context}" filtering="no">
762
			<fileset dir="${spatial.geoserver.dir}">
763
				<exclude name="WEB-INF/**" />
764
				<exclude name="index.jsp" />
765
			</fileset>
766
		</copy>
767

    
768
		<!-- Copy the geoserver index.jsp but rename it to avoid conflicting w/metcat   -->
769
		<copy file="${spatial.geoserver.dir}/WEB-INF/pages/index.jsp"
770
			tofile="${war.context}/geoserver.jsp" overwrite="true"
771
			filtering="no" />
772

    
773
		<!-- Copy the rest of the modified geoserver web-inf files
774
			<copy todir="${war.webinf}" filtering="no">
775
			<fileset dir="${spatial.webinf-mods}">
776
			<exclude name="web.xml.combined"/>
777
			</fileset>
778
			</copy> -->
779

    
780
	</target>
781

    
782
	<target name="install" depends="build-metacat"
783
		description="* Full Install For Development *">
784
		<copy file="${dist.dir}/${metacat.context}.war"
785
			todir="${app.deploy.dir}" />
786
               <!-- <copy file="${dist.dir}/${metacat.context}.war"
787
                        todir="${app.deploy.dir2}" />-->
788
		<delete dir="${app.deploy.dir}/${metacat.context}" />
789
		<!--<delete dir="${app.deploy.dir2}/${metacat.context}" />-->
790
		<tstamp>
791
			<format property="NOW" pattern="MM/dd/yyyy hh:mm:ss aa" />
792
		</tstamp>
793
		<echo>Dev install completed at ${NOW}</echo>
794
	</target>
795

    
796
	<target name="build-metacat" depends="install-ecogrid"
797
		description="Build Metacat">
798
	</target>
799

    
800
	<target name="install-ecogrid" depends="warPrepare, get-ecogrid"
801
		if="enable.ecogrid" description="Install Ecogrid Compentent">
802
		<ant antfile="build.xml" dir="${ecogrid-dir}" target="clean"
803
			inheritall="false">
804
			<property name="context" value="${metacat.context}" />
805
			<property name="target" value="${ecogrid-target-name}" />
806
		</ant>
807
		<ant antfile="build.xml" dir="${ecogrid-dir}" target="war"
808
			inheritall="false">
809
			<property name="context" value="${metacat.context}" />
810
			<property name="target" value="${ecogrid-target-name}" />
811
			<property name="metacat.dir" value="${basedir}"/>
812
		</ant>
813
		<!-- war destfile="${ecogrid-dir}/build/${metacat.context}.war" update="true">
814
			<webinf dir="${ecogrid-dir}/lib">
815
			<include name="server-config.wsdd"/>
816
			</webinf>
817
			</war -->
818
		<copy file="${ecogrid-dir}/build/${metacat.context}.war"
819
			todir="${dist.dir}" overwrite="true" />
820

    
821

    
822
	</target>
823

    
824
	<target name="get-ecogrid" depends="init"
825
		description="Check out ecogrid module" if="ecogrid.required">
826
		<svn>
827
			<export srcUrl="${svn.ecogridUrl}" force="true"
828
				destPath="${ecogrid-dir}" />
829
		</svn>
830
	</target>
831

    
832
	<!-- target name="deploy-ecogrid" depends="clean-ecogrid-server-config-wsdd" if="enable.ecogrid" description="Automately generate wsdd for ecogrid service">
833
		<ant antfile="build.xml" dir="${ecogrid-dir}" target ="deploy" inheritall="false">
834
		<property name="context" value="${metacat.context}"/>
835
		<property name="target" value="${ecogrid-target-name}"/>
836
		<property name="metacat.dir" value="."/>
837
		<property name="hostname" value="${ecogrid.hostname}"/>
838
		<property name="port" value="${config.port}"/>
839
		</ant>
840
		</target -->
841

    
842
	<target name="clean-ecogrid-server-config-wsdd" depends="init"
843
		description="Automately generate wsdd for ecogrid service">
844
		<delete
845
			file="${app.deploy.dir}/${metacat.context}/WEB-INF/server-config.wsdd" />
846
	</target>
847

    
848
	<target name="install-skin" depends="init"
849
		description="Install a Skin">
850

    
851
		<input message="Please enter name of the skin"
852
			addproperty="skin-name" />
853

    
854
		<mkdir dir="${installdir}/style/skins/${skin-name}" />
855
		<copy todir="${installdir}/style/skins/${skin-name}"
856
			filtering="yes">
857
			<fileset dir="lib/style/skins/${skin-name}">
858
				<exclude name="**/*.png" />
859
				<exclude name="**/*.gif" />
860
				<exclude name="**/*.jpg" />
861
				<exclude name="**/CVS*" />
862
				<exclude name="**/.#*" />
863
			</fileset>
864
		</copy>
865
		<copy todir="${installdir}/style/skins/${skin-name}"
866
			filtering="no">
867
			<fileset dir="lib/style/skins/${skin-name}">
868
				<include name="**/*.png" />
869
				<include name="**/*.gif" />
870
				<include name="**/*.jpg" />
871
				<exclude name="**/CVS*" />
872
				<exclude name="**/.#*" />
873
			</fileset>
874
		</copy>
875
		<copy todir="${installdir}/style/common" filtering="yes">
876
			<fileset dir="lib/style/common">
877
				<include name="*.js" />
878
				<include name="*.jsp" />
879
				<include name="*.css" />
880
				<exclude name="*.png" />
881
				<exclude name="*.gif" />
882
				<exclude name="*.jpg" />
883
				<exclude name="**/CVS*" />
884
				<exclude name="**/.#*" />
885
			</fileset>
886
		</copy>
887
		<!--
888
			<mkdir dir="${installdir}/style/skins/${skin-name}/images" />
889
			<copy todir="${installdir}/style/skins/${skin-name}/images" filtering="no">
890
			<fileset dir="lib/style/skins/${skin-name}/images">
891
			<include name="*.png"/>
892
			<include name="*.gif"/>
893
			<include name="*.jpg"/>
894
			</fileset>
895
			</copy>
896
		-->
897

    
898
		<echo message="Install Skin completed." />
899
	</target>
900

    
901
	<target name="war" depends="warPrepare,install-spatial"
902
		description="Create a web archive (WAR) for servlet deployment">
903
		<mkdir dir="${dist.dir}" />
904
		<war destfile="${dist.dir}/${metacat.context}.war"
905
			webxml="${build.war}/web.xml">
906
			<fileset dir="${war.context}" />
907
			<lib dir="${war.lib}" />
908
			<webinf dir="${war.webinf}" />
909
		</war>
910
	</target>
911

    
912
	<target name="warPrepare"
913
		depends="cgiPrepare,jar,clientjar,harvesterjar,testPrepare"
914
		description="Prepare files for creating a web archive (WAR)">
915

    
916
		<property name="war.lib" value="${build.war}/lib" />
917
		<property name="war.webinf" value="${build.war}/WEB-INF" />
918
		<property name="war.context"
919
			value="${build.war}/${metacat.context}" />
920
		<property name="war.webinf.sql" value="${war.webinf}/sql" />
921
		<property name="war.webinf.scripts"
922
			value="${war.webinf}/scripts" />
923
		<property name="war.context.cgi" value="${war.context}/cgi-bin" />
924
		<property name="war.context.docs" value="${war.context}/docs" />
925
		<property name="war.context.temp" value="${war.context}/temp" />
926
		<property name="war.context.templates"
927
			value="${war.context}${style-common-relpath}/templates" />
928
		<mkdir dir="${war.lib}" />
929
		<mkdir dir="${war.webinf}" />
930
		<mkdir dir="${war.context}" />
931
		<mkdir dir="${war.webinf.sql}" />
932
		<mkdir dir="${war.context.cgi}" />
933
		<mkdir dir="${war.context.docs}" />
934
		<mkdir dir="${war.context.temp}" />
935
		<mkdir dir="${war.context.templates}" />
936

    
937
		<!--copy file="${lib.dir}/${jdbc.lib.postgres}" todir="${war.lib}" / -->
938
		<!--copy file="${lib.dir}/${jdbc.lib.sqlserver1}" todir="${war.lib}" / -->
939
		<!--copy file="${lib.dir}/${jdbc.lib.sqlserver2}" todir="${war.lib}" / -->
940
		<!--copy file="${lib.dir}/${jdbc.lib.sqlserver3}" todir="${war.lib}" / -->
941
		<copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
942
		<copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
943
		<copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
944
		<copy todir="${war.lib}" filtering="no">
945
			<fileset dir="lib">
946
				<!--
947
					<not>
948
					<filename name="${jdbc-jar-name}"/>
949
					</not>
950
				-->
951
				<include name="*.jar" />
952
				<exclude name="maven-ant-tasks*.jar" />
953
			</fileset>
954
			<fileset dir="lib">
955
				<include name="xalan.jar" />
956
				<include name="gwt*.jar" />
957
			</fileset>
958
			<fileset dir="lib/oaipmh">
959
				<include name="oaicat.jar" />
960
			</fileset>
961
		</copy>
962
		<!-- MCD copy file="lib/web.xml.${tomcatversion}"
963
			tofile="${build.war}/web.xml" / -->
964
		<!-- MCD added next - Remove the tomcat5 reference-->
965
		<copy file="lib/web.xml.tomcat5" tofile="${build.war}/web.xml" />
966
		<copy file="lib/metacat.properties" todir="${war.webinf}"
967
			filtering="yes" />
968
		<copy file="lib/metacat.properties.metadata.xml"
969
			todir="${war.webinf}" filtering="no" />
970
		<copy file="lib/org.properties.metadata.xml"
971
			todir="${war.webinf}" filtering="no" />
972
		<copy file="lib/auth.properties.metadata.xml"
973
			todir="${war.webinf}" filtering="no" />
974
		<copy todir="${war.webinf}" filtering="yes">
975
			<fileset dir="lib">
976
				<include name="skin.configs/**" />
977
			</fileset>
978
		</copy>
979
		<copy file="lib/log4j.properties" todir="${war.webinf}"
980
			filtering="yes" />
981
		<copy todir="${war.context}" filtering="no">
982
			<fileset dir="lib">
983
				<include name="**/*.jpg" />
984
				<include name="**/*.png" />
985
				<include name="**/*.gif" />
986
				<include name="LiveMap_30/**" />
987
				<include name="oaipmh/**" />
988
			</fileset>
989
		</copy>
990
		<copy todir="${war.context}" filtering="yes">
991
			<fileset dir="lib">
992
				<exclude name="*.jar" />
993
				<exclude name="*.properties" />
994
				<exclude name="*.metadata.xml" />
995
				<exclude name="web.xml" />
996
				<exclude name="**/*.jpg" />
997
				<exclude name="**/*.png" />
998
				<exclude name="**/*.gif" />
999
				<exclude name="lsid_lib/**" />
1000
				<exclude name="lsid_conf/**" />
1001
				<exclude name="LiveMap_30/**" />
1002
				<exclude name="oaipmh/**" />
1003
				<exclude name="skin.configs/**" />
1004
				<exclude name="spatial/geoserver/**" />
1005
				<exclude name="spatial/WEB-INF/**" />
1006
			</fileset>
1007
		</copy>
1008
		<copy todir="${war.context.docs}" filtering="yes">
1009
			<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
1010
		</copy>
1011
		<copy todir="${war.context.docs}" filtering="no">
1012
			<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
1013
		</copy>
1014
		<copy todir="${war.webinf.sql}" filtering="yes">
1015
			<fileset dir="src">
1016
				<include name="**/*.sql" />
1017
			</fileset>
1018
		</copy>
1019
		<copy todir="${war.webinf.scripts}" filtering="yes">
1020
			<fileset dir="src/scripts" />
1021
		</copy>
1022
		<copy todir="${war.webinf.scripts}"
1023
			file="src/perl/Metacat/blib/lib/auto/Metacat/autosplit.ix"
1024
			failonerror="false" />
1025

    
1026
		<copy file="src/perl/register-dataset.cgi"
1027
			todir="${war.context.cgi}" />
1028
		<copy file="src/perl/ldapweb.cgi" todir="${war.context.cgi}" />
1029
		<copy file="src/perl/Metacat/Metacat.pm" todir="${war.lib}" />
1030

    
1031
		<!-- registry cgi section -->
1032
		<!-- TODO SCW: use relative paths to grab these instead of copying to tmp,
1033
			used in readDocumentFromMetacat -->
1034
		<!-- TODO MCD copy temp files to actual location using config util?? -->
1035
		<copy todir="${war.context.temp}" filtering="yes">
1036
			<fileset dir="lib/style/common/emlb6toeml2">
1037
				<include name="*.xsl" />
1038
				<include name="*.xml" />
1039
			</fileset>
1040
		</copy>
1041
		<available file="lib/style/common/emlb6toeml2" type="dir"
1042
			property="styles.not.needed" />
1043

    
1044
		<!-- ldap cgi section -->
1045
		<copy todir="${war.context.templates}">
1046
			<fileset dir="lib/style/common/templates">
1047
				<!-- SCW: Copy all files -->
1048
			</fileset>
1049
		</copy>
1050
	</target>
1051

    
1052
	<target name="cgiPrepare" if="build.perl">
1053
		<exec dir="src/perl/Metacat/" executable="make">
1054
			<arg value="clean" />
1055
		</exec>
1056
		<exec dir="src/perl/Metacat/" executable="perl">
1057
			<arg value="Makefile.PL" />
1058
		</exec>
1059
		<exec dir="src/perl/Metacat/" executable="make" />
1060
	</target>
1061

    
1062
	<target name="testPrepare"
1063
		description="Copies test files into the war directories">
1064
		<echo>in testPrepare</echo>
1065
		<property name="war.context.test"
1066
			value="${build.war}/${metacat.context}/test" />
1067
		<mkdir dir="${war.context.test}" />
1068
		<copy todir="${war.context.test}" filtering="yes">
1069
			<fileset dir="test/servertestfiles">
1070
				<include name="*/**" />
1071
			</fileset>
1072
		</copy>
1073
	</target>
1074

    
1075
	<target name="getConversionXSL" depends="prepare"
1076
		unless="styles.not.needed"
1077
		description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
1078

    
1079
		<svn>
1080
			<export srcUrl="${svn.eml2StyleUrl}"
1081
				destPath="${build.tmp}/conv_eml_${eml2-style-tag}" />
1082
		</svn>
1083

    
1084
		<mkdir dir="lib/style/common/emlb6toeml2" />
1085
		<copy todir="lib/style/common/emlb6toeml2" filtering="yes">
1086
			<fileset
1087
				dir="${build.tmp}/conv_eml_${eml2-style-tag}/lib/beta6toeml2/xsl">
1088
				<include name="*.xsl" />
1089
				<include name="*.xml" />
1090
			</fileset>
1091
		</copy>
1092
	</target>
1093

    
1094
	<target name="testprep" depends="jar,clientjar,harvesterjar">
1095
		<mkdir dir="${build.tests}" />
1096
		<copy todir="${build.tests}" encoding="UTF-8">
1097
			<fileset dir="${testdir}">
1098
				<include name="edu/**" />
1099
			</fileset>
1100
		</copy>
1101
		<copy todir="${build.tests}" file="${testdir}/test.properties" />
1102

    
1103
		<!-- copy and compile the tests into a jar file -->
1104
		<javac srcdir="${build.tests}" destdir="${build.tests}"
1105
			debug="on" includes="**/*.java" encoding="UTF-8">
1106
			<classpath>
1107
				<path refid="compile.classpath" />
1108
				<fileset dir="${build.dir}">
1109
					<include name="${name}.jar" />
1110
					<include name="${name}-client.jar" />
1111
					<include name="harvester.jar" />
1112
				</fileset>
1113
			</classpath>
1114
		</javac>
1115

    
1116
		<jar jarfile="${build.dir}/${name}-junittests.jar"
1117
			basedir="${build.tests}" includes="**/*.class" />
1118
	</target>
1119

    
1120
	<target name="test" depends="testprep"
1121
		description="Uses the ant junit task to run all JUnit tests">
1122

    
1123
		<!-- use the ant "junit" task to run JUnit tests. -->
1124
		<junit printsummary="yes" haltonfailure="no" fork="yes"
1125
			haltonerror="no">
1126
			<jvmarg value="-Dfile.encoding=UTF-8"/>
1127
			<classpath>
1128
				<path refid="test.classpath" />
1129
				<fileset dir="${build.dir}">
1130
					<include name="${name}.jar" />
1131
					<include name="${name}-client.jar" />
1132
					<include name="harvester.jar" />
1133
					<include name="${name}-junittests.jar" />
1134
				</fileset>
1135
			</classpath>
1136

    
1137
			<formatter type="plain" />
1138

    
1139
			<batchtest fork="yes" todir="${build.dir}">
1140
				<fileset dir="${build.tests}">
1141
					<include name="**/*.class" />
1142
					<exclude name="**/MCTestCase.class" />
1143
					<exclude name="**/ClientViewHelperTest.class" />
1144
				</fileset>
1145
			</batchtest>
1146
		</junit>
1147
	</target>
1148

    
1149
	<target name="runonetest" depends="testprep"
1150
		description="Uses the ant junit task to run a single JUnit test, defined by the ${testtorun} property">
1151

    
1152
		<echo>testtorun: ${testtorun}</echo>
1153

    
1154
		<!-- use the ant "junit" task to run JUnit tests. -->
1155
		<junit printsummary="yes" haltonfailure="no" fork="yes"
1156
			haltonerror="no" showoutput="yes">
1157
			<!--<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>-->
1158
			<jvmarg value="-Dfile.encoding=UTF-8"/>
1159
			<classpath>
1160
				<path refid="test.classpath" />
1161
				<fileset dir="${build.dir}">
1162
					<include name="${name}.jar" />
1163
					<include name="${name}-client.jar" />
1164
					<include name="harvester.jar" />
1165
					<include name="${name}-junittests.jar" />
1166
				</fileset>
1167
			</classpath>
1168

    
1169
			<formatter type="plain" />
1170

    
1171
			<batchtest fork="yes" todir="${build.dir}">
1172
				<fileset dir="${build.tests}">
1173
					<include name="**/${testtorun}.class" />
1174
				</fileset>
1175
			</batchtest>
1176
		</junit>
1177
	</target>
1178

    
1179
	<target name="testharvester" depends="testprep"
1180
		description="Uses the ant junit task to test only the Harvester code">
1181
		<junit printsummary="yes" haltonfailure="off" fork="yes"
1182
			haltonerror="off">
1183
			<classpath>
1184
				<path refid="compile.classpath" />
1185
				<fileset dir="${build.dir}">
1186
					<include name="${name}.jar" />
1187
					<include name="${name}-client.jar" />
1188
					<include name="harvester.jar" />
1189
					<include name="${name}-junittests.jar" />
1190
				</fileset>
1191
			</classpath>
1192
			<formatter type="plain" />
1193
			<batchtest fork="yes" todir="${build.dir}">
1194
				<fileset dir="${build.tests}">
1195
					<include name="**/harvesterClient/*.class" />
1196
				</fileset>
1197
			</batchtest>
1198
		</junit>
1199
	</target>
1200

    
1201
	<target name="gethttpclient" depends="prepare"
1202
		description="checks out and compiles morpho httpclient code">
1203
		<!--mkdir dir="${morphosourcedir}" -->
1204
		<cvs cvsRoot="${cvsroot}" package="morpho" dest="." />
1205
		<ant dir="${morphosourcedir}" inheritAll="false" target="jar" />
1206
	</target>
1207

    
1208
	<!-- run this target, we need to check out a another morpho souce dir was checked out. -->
1209
	<target name="nettest" depends="install"
1210
		description="compiles and runs the metacatnettest code">
1211

    
1212
		<echo>
1213
			*********************************** Please run ant
1214
			gethttpclient first! ***********************************
1215
		</echo>
1216
		<!-- copy and compile the tests into a jar file -->
1217
		<mkdir dir="${build.metacatnettest}" />
1218
		<javac srcdir="${junitnettestsdir}"
1219
			destdir="${build.metacatnettest}" includes="**/*.java">
1220
			<classpath>
1221
				<path refid="compile.classpath" />
1222
				<fileset dir="${build.dir}">
1223
					<include name="${name}.jar" />
1224
				</fileset>
1225
			</classpath>
1226
		</javac>
1227

    
1228
		<jar jarfile="${build.dir}/${name}-junitnettests.jar"
1229
			basedir="${build.metacatnettest}" includes="**/*.class" />
1230

    
1231
		<!-- use the ant "junit" task to run JUnit tests. -->
1232
		<junit printsummary="yes" haltonfailure="no" fork="yes"
1233
			haltonerror="no">
1234
			<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
1235
			<classpath>
1236
				<path refid="compile.classpath" />
1237
				<fileset dir="${build.dir}">
1238
					<include name="${name}.jar" />
1239
					<include name="${name}-junitnettests.jar" />
1240
				</fileset>
1241
			</classpath>
1242

    
1243
			<formatter type="plain" />
1244

    
1245
			<batchtest fork="yes" todir="${build.dir}">
1246
				<fileset dir="${build.metacatnettest}">
1247
					<include name="**/*.class" />
1248
				</fileset>
1249
			</batchtest>
1250
		</junit>
1251
	</target>
1252

    
1253
	<target name="cleanweb" depends="clean"
1254
		description="deletes tomcat web context dir and all its contents">
1255
		<delete dir="${installdir}" />
1256
	</target>
1257

    
1258

    
1259
	<target name="clean" depends="init"
1260
		description="deletes build dir and files that can be regenerated form the release">
1261
		<delete dir="${build.dir}" />
1262
		<delete dir="${dist.dir}" />
1263
	</target>
1264

    
1265
	<target name="localclean" depends="clean"
1266
		description="deletes even jars that depend on external sources such as stylesheets and jars">
1267
		<delete file="lib/httpclient.jar" />
1268
		<delete file="lib/utilities.jar" />
1269
	</target>
1270

    
1271
	<target name="fullclean" depends="localclean"
1272
		description="deletes code and eml">
1273
		<delete includeEmptyDirs="true" failonerror="false">
1274
			<fileset dir="${style-common-cvsrelpath}">
1275
				<include name="${eml-css}" />
1276
				<include name="eml-*/*.xsl" />
1277
				<include name="eml-*" />
1278
			</fileset>
1279
			<fileset dir="${schema-cvsrelpath}">
1280
				<include name="eml-*/*.xsd" />
1281
			</fileset>
1282
			<fileset dir="${ecogrid-dir}">
1283
				<include name="build.properties" />
1284
				<include name="buildfiles/metacatImpl.xml" />
1285
			</fileset>
1286
		</delete>
1287
	</target>
1288

    
1289
	<target name="jdoc" depends="prepare"
1290
		description="generates javadoc documentation">
1291
		<javadoc packagenames="edu.ucsb.nceas.*"
1292
			sourcepath="${build.src}" destdir="${build.javadocs}" author="true"
1293
			version="true" use="true" windowtitle="${Name} API"
1294
			doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
1295
			bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;">
1296
			<classpath>
1297
				<path refid="compile.classpath" />
1298
			</classpath>
1299
		</javadoc>
1300
	</target>
1301

    
1302
	<target name="dist"
1303
		depends="geteml,getd1schemas,get-ecogrid,jar,protocol,jdoc,getConversionXSL,getutilities"
1304
		description="prepares a full release distribution">
1305
		<mkdir dir="${dist.dir}" />
1306
		<delete dir="${ver.dir}" />
1307
		<mkdir dir="${ver.dir}" />
1308
		<copy todir="${ver.dir}">
1309
			<fileset dir="."
1310
				excludes="**/CVS* **/.#* src/** test/** build/** docs/** ${dist.dir}/** ${dist.dir.hle}/** metacat*.tar.gz metacat*.tar metacat*.zip" />
1311
		</copy>
1312
		<copy todir="${ver.dir}" file="build.xml" />
1313
		<copy todir="${ver.dir}" file="build.properties" />
1314

    
1315
		<copy todir="${ver.dir}/docs" filtering="yes">
1316
			<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
1317
		</copy>
1318
		<copy todir="${ver.dir}/docs" filtering="no">
1319
			<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
1320
		</copy>
1321
		<copy todir="${ver.dir}/docs/dev">
1322
			<fileset dir="${build.dir}/docs" />
1323
		</copy>
1324
		<copy todir="${ver.dir}/src">
1325
			<fileset dir="${build.dir}/src" />
1326
		</copy>
1327

    
1328
		<mkdir dir="${ver.dir}/tests/servertestfiles" />
1329
		<copy todir="${ver.dir}/test/servertestfiles">
1330
			<fileset dir="./test/servertestfiles" />
1331
		</copy>
1332
	</target>
1333

    
1334
	<target name="distbin" depends="build-metacat,war-lsid"
1335
		description="prepares a binary distribution">
1336
		<copy todir="${dist.dir}">
1337
			<fileset dir="./src/scripts" />
1338
		</copy>
1339
		<delete file="./${name}-bin-${release}.zip" />
1340
		<zip zipfile="./${name}-bin-${release}.zip"
1341
			basedir="${dist.dir}" excludes="metacat-*/**" />
1342
		<delete file="./${name}-bin-${release}.tar.gz" />
1343
		<tar tarfile="./${name}-bin-${release}.tar"
1344
			basedir="${dist.dir}" excludes="metacat-*/**" />
1345
		<gzip zipfile="./${name}-bin-${release}.tar.gz"
1346
			src="./${name}-bin-${release}.tar" />
1347
		<delete file="./${name}-bin-${release}.tar" />
1348
	</target>
1349

    
1350
	<target name="distsrc" depends="dist"
1351
		description="prepares a source distribution">
1352
		<mkdir dir="${ver.src}" />
1353
		<copy todir="${ver.src}">
1354
			<fileset dir="./src" />
1355
		</copy>
1356
		<mkdir dir="${util.dir}" />
1357
		<copy todir="${util.dir}">
1358
			<fileset dir="${build.tmp}/utilities" excludes="**/CVS*" />
1359
		</copy>
1360

    
1361
		<mkdir dir="${ecogrid-dist-dir}" />
1362
		<copy todir="${ecogrid-dist-dir}">
1363
			<fileset dir="${ecogrid-dir}" excludes="**/CVS*" />
1364
		</copy>
1365

    
1366
		<delete file="${ver.dir}/lib/utilities.jar" />
1367

    
1368
		<delete file="./${name}-src-${release}.zip" />
1369
		<zip zipfile="./${name}-src-${release}.zip"
1370
			basedir="${dist.dir}" excludes="metacat*.tar.gz,metacat*.zip" />
1371
		<delete file="./${name}-src-${release}.tar.gz" />
1372
		<tar tarfile="./${name}-src-${release}.tar"
1373
			basedir="${dist.dir}" excludes="metacat*.tar.gz,metacat*.zip" />
1374
		<gzip zipfile="./${name}-src-${release}.tar.gz"
1375
			src="./${name}-src-${release}.tar" />
1376
		<delete file="./${name}-src-${release}.tar" />
1377
		<!--delete dir="${dist.dir}"/ -->
1378
	</target>
1379

    
1380
	<target name="deb-package" depends="distbin"
1381
		description="create a debian installation package">
1382
		<delete dir="${deb.pkg.dir}" />
1383
		<mkdir dir="${deb.pkg.dir}/DEBIAN" />
1384
		<copy todir="${deb.pkg.dir}/DEBIAN" filtering="yes">
1385
			<fileset dir="./src/scripts/debian"
1386
				includes="control postinst" />
1387
		</copy>
1388

    
1389
		<mkdir
1390
			dir="${deb.pkg.dir}/usr/share/metacat-${metacat.version}" />
1391
		<copy
1392
			todir="${deb.pkg.dir}/usr/share/metacat-${metacat.version}"
1393
			filtering="yes">
1394
			<fileset dir="./src/scripts/debian"
1395
				excludes="control postinst" />
1396
		</copy>
1397
		<chmod file="${deb.pkg.dir}/DEBIAN/postinst" perm="755" />
1398

    
1399
		<copy file="${dist.dir}/knb.war"
1400
			todir="${deb.pkg.dir}/usr/share/metacat-${metacat.version}" />
1401
		<copy file="./metacat-bin-${metacat.version}.tar.gz"
1402
			tofile="${deb.pkg.dir}/metacat_${metacat.version}.orig.tar.gz" />
1403

    
1404
		<exec dir="${pkg.dir}" executable="dpkg" os="Linux, Unix"
1405
			failonerror="true">
1406
			<arg line="--build debian" />
1407
		</exec>
1408

    
1409
		<move file="${pkg.dir}/debian.deb"
1410
			tofile="${pkg.dir}/metacat_${metacat.version}${metacat.releaseCandidate}_all.deb" />
1411
	</target>
1412

    
1413
	<target name="stylesheettest">
1414
		<xslt in="${input}" out="eml.html"
1415
			style="${style-common-cvsrelpath}/eml-2.0.0/eml-2.0.0.xsl">
1416
			<param name="displaymodule" expression="${displaymodule}" />
1417
			<param name="docid" expression="${input}" />
1418
			<param name="entitytype" expression="${entitytype}" />
1419
			<param name="entityindex" expression="${entityindex}" />
1420
			<outputproperty name="method" value="html" />
1421
			<outputproperty name="standalone" value="yes" />
1422
			<outputproperty name="encoding" value="iso8859_1" />
1423
			<outputproperty name="indent" value="yes" />
1424
		</xslt>
1425
	</target>
1426

    
1427

    
1428
	<target name="compilewebclient" depends="prepare">
1429
		<javac srcdir="${build.src}" destdir="${build.dest}"
1430
			includes="**/application/*.java" classpathref="webservicepath" />
1431
	</target>
1432

    
1433
	<target name="runwebclient" depends="compilewebclient">
1434
		<java
1435
			classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
1436
			dir="${build.dest}" fork="yes" classpathref="webservicepath"
1437
			classpath="./lib/utilities.jar" failonerror="true">
1438
			<arg value="${serviceUrl}" />
1439
			<arg value="${docid}" />
1440
		</java>
1441
	</target>
1442

    
1443
	<target name="spatial_option" depends="prepare"
1444
		description=" -- compiles code for the spatial option">
1445

    
1446
		<echo message="Compiling the metatcat shapefile creator" />
1447
		<echo message="using the shapelib at: ${shapelib.dir}" />
1448
		<exec dir="." executable="g++" os="Linux, Unix"
1449
			failonerror="true">
1450
			<arg
1451
				line="./src/spatial/cpp/metacat_shapefile.cpp -I ${shapelib.dir} -c -o build/metacat_shapefile.o" />
1452
		</exec>
1453

    
1454
		<exec dir="." executable="g++" os="Linux, Unix"
1455
			failonerror="true">
1456
			<arg
1457
				line="build/metacat_shapefile.o ${shapelib.dir}/.libs/libshp.a -o bin/metacat_shapefile" />
1458
		</exec>
1459
	</target>
1460

    
1461
	<!-- LSID Authority support -->
1462
	<patternset id="lsid.jars">
1463
		<include name="axis.jar" />
1464
		<include name="commons-discovery-0.2.jar" />
1465
		<include name="jaxrpc.jar" />
1466
		<include name="lsid-client-1.1.1.jar" />
1467
		<include name="lsid-server-1.1.1.jar" />
1468
		<include name="saaj.jar" />
1469
		<include name="wsdl4j-1.5.1.jar" />
1470
		<include name="activation.jar" />
1471
		<include name="castor-0.9.5.jar" />
1472
		<include name="dnsjava-1.3.2.jar" />
1473
		<include name="mail.jar" />
1474
		<include name="commons-logging-1.0.4.jar" />
1475
		<!-- These jars may be needed but seem to not actually be,
1476
			so leaving them out for now
1477
			<include name="axis-ant.jar" />
1478
		-->
1479
		<!--<include name="GenCastor.class" />-->
1480
	</patternset>
1481
	<patternset id="lib.jars">
1482
		<include name="httpclient.jar" />
1483
		<include name="log4j-1.2.12.jar" />
1484
		<include name="utilities.jar" />
1485
		<include name="xercesImpl.jar" />
1486
		<include name="xalan.jar" />
1487
		<include name="xml-apis.jar" />
1488
	</patternset>
1489

    
1490
	<path id="lsid.classpath">
1491
		<fileset dir="${lsid.lib.dir}">
1492
			<patternset refid="lsid.jars" />
1493
		</fileset>
1494
		<fileset dir="${lib.dir}">
1495
			<patternset refid="lsid.jars" />
1496
		</fileset>
1497
		<fileset dir="${lib.dir}">
1498
			<include name="xalan.jar" />
1499
			<include name="xml-apis.jar" />
1500
		</fileset>
1501
		<fileset dir="${build.dir}">
1502
			<include name="metacat-client.jar" />
1503
		</fileset>
1504
	</path>
1505

    
1506
	<filterset id="configFilters">
1507
		<!-- MCD BYE filter token="LSID_AUTHORITY_HOSTNAME"
1508
			value="${config.hostname}" / -->
1509
		<!-- MCD BYE filter token="LSID_AUTHORITY_PORT"
1510
			value="${config.port}" / -->
1511
		<!-- MCD BYE filter token="METADATA_LABELS"
1512
			value="${config.metadataLabelLsid}" / -->
1513
		<!-- MCD BYE filter token="METACAT_SERVER"
1514
			value="${config.metacatserver}" / -->
1515
		<!-- MCD BYE filter token="LSID_AUTHORITY_STRING"
1516
			value="${config.lsidauthority}" / -->
1517
	</filterset>
1518

    
1519
	<target name="prepare-lsid" depends="prepare,utilities,clientjar"
1520
		description="Configure files prior to compilation">
1521
		<mkdir dir="${lsid.build.dir}" />
1522
		<!-- Copy the properties file into the build -->
1523
		<copy file="${conf.dir}/metacat-lsid.properties"
1524
			tofile="${lsid.build.dir}/WEB-INF/classes/metacat-lsid.properties"
1525
			overwrite="true">
1526
			<filterset refid="configFilters" />
1527
		</copy>
1528
		<copy file="${conf.dir}/log4j.properties"
1529
			tofile="${lsid.build.dir}/WEB-INF/classes/log4j.properties"
1530
			overwrite="true">
1531
			<filterset refid="configFilters" />
1532
		</copy>
1533
		<!-- Copy config files into the build -->
1534
		<copy todir="${lsid.build.dir}/WEB-INF">
1535
			<fileset dir="${webinf.dir}" includes="**/*.wsdd" />
1536
		</copy>
1537
		<!-- Copy the metadata configuration files into the build -->
1538
		<mkdir
1539
			dir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}" />
1540
		<copy
1541
			todir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}">
1542
			<fileset dir="${conf.dir}" includes="**/*.xml" />
1543
			<fileset dir="${conf.dir}" includes="**/*.xslt" />
1544
			<filterset refid="configFilters" />
1545
		</copy>
1546
		<!-- Copy services files into the build -->
1547
		<mkdir dir="${lsid.build.dir}/services" />
1548
		<copy todir="${lsid.build.dir}/services">
1549
			<fileset dir="${services.dir}" />
1550
			<filterset refid="configFilters" />
1551
		</copy>
1552
		<!-- Copy axis files into the build -->
1553
		<mkdir dir="${lsid.build.dir}" />
1554
		<copy todir="${lsid.build.dir}">
1555
			<fileset dir="${conf.dir}/axis" excludes="*.properties" />
1556
		</copy>
1557
		<mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
1558
		<copy todir="${lsid.build.dir}/WEB-INF/classes">
1559
			<fileset dir="${conf.dir}/axis" includes="*.properties" />
1560
		</copy>
1561
	</target>
1562

    
1563
	<target name="compile-lsid" depends="prepare-lsid"
1564
		description="Compile Java sources">
1565
		<mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
1566
		<javac srcdir="src/edu/ucsb/nceas/metacat/lsid"
1567
			destdir="${lsid.build.dir}/WEB-INF/classes" debug="${compile.debug}"
1568
			deprecation="${compile.deprecation}"
1569
			optimize="${compile.optimize}">
1570
			<classpath refid="lsid.classpath" />
1571
		</javac>
1572
	</target>
1573

    
1574
	<target name="war-lsid" depends="compile-lsid"
1575
		description="Create a war file for the application">
1576
		<mkdir dir="${dist.dir}" />
1577
		<war destfile="${dist.dir}/${authority.context}.war"
1578
			webxml="${webinf.dir}/web.xml">
1579
			<fileset dir="${lsid.build.dir}" />
1580
			<lib dir="${lsid.lib.dir}">
1581
				<patternset refid="lsid.jars" />
1582
			</lib>
1583
			<lib dir="${lib.dir}">
1584
				<patternset refid="lib.jars" />
1585
			</lib>
1586
			<lib dir="${lib.dir}">
1587
				<include name="xalan.jar" />
1588
				<include name="xml-apis.jar" />
1589
			</lib>
1590
			<lib dir="${build.dir}">
1591
				<include name="metacat-client.jar" />
1592
			</lib>
1593
		</war>
1594
	</target>
1595

    
1596
	<target name="deploy-lsid" depends="war-lsid"
1597
		description="Deploy LSID war to servlet container">
1598
		<delete dir="${app.deploy.dir}/${authority.context}" />
1599
		<delete file="${app.deploy.dir}/${authority.context}.war" />
1600
		<mkdir dir="${app.deploy.dir}" />
1601
		<copy todir="${app.deploy.dir}">
1602
			<fileset dir="${dist.dir}" />
1603
		</copy>
1604
	</target>
1605

    
1606
    <!-- Build the dataone service, but only if it is checked out as a
1607
         sibling of the current build directory. Requires maven2 to
1608
         be installed and on the path. -->
1609
    <target name="dataone-service" if="d1.available">
1610
        <property name="d1.jar" value="dataone-service-api-0.3.0.jar"/>
1611

    
1612
        <artifact:mvn pom="${d1.dir}/pom.xml" fork="true"
1613
                      mavenHome="${maven.home}">
1614
            <arg value="install"/>
1615
        </artifact:mvn>
1616
		<copy file="${d1.dir}/target/${d1.jar}" todir="${lib.dir}" />
1617
    </target>
1618
</project>
(5-5/6)