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: daigle $'
10
  *    '$Date: 2008-07-07 09:32:17 -0700 (Mon, 07 Jul 2008) $'
11
  *    '$Revision: 4081 $'
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
  <property environment="env"/>
34
  <property file="build.properties"/>  <!-- USER SPECIFIC PROPS -->
35

    
36
  <!-- Determine which tomcat we are using and tomcat-specific settings -->
37
	 <!-- MCD HACK -->
38
	<property name="jsdk" value="/usr/local/tomcat/common/lib/servlet-api.jar"/>
39
  <!-- MCD BYE condition property="jsdk" value="${tomcat}/common/lib/servlet.jar">
40
    <equals arg1="${tomcatversion}" arg2="tomcat4" />
41
  </condition>
42

    
43
  <condition property="jsdk" value="${tomcat}/common/lib/servlet-api.jar">
44
    <equals arg1="${tomcatversion}" arg2="tomcat5" />
45
  </condition -->
46
	
47
  <!-- Determine if installed ecogrid -->
48
  <condition property="enable.ecogrid">
49
    <equals arg1="${install.ecogrid}" arg2="true" />
50
  </condition>
51

    
52
  <!-- note, if you change a db driver or add a new database, you will need -->
53
  <!-- to update upgrade_db_to_1_5.java -->
54
  <target name="check-db">
55
    <condition property="use-oracle">
56
      <equals arg1="${database}" arg2="oracle" />
57
    </condition>
58
    <condition property="use-postgresql">
59
      <equals arg1="${database}" arg2="postgresql" />
60
    </condition>
61
    <condition property="use-sqlserver">
62
      <equals arg1="${database}" arg2="sqlserver" />
63
    </condition>
64
  </target>
65

    
66
  <target name="oracle" if="use-oracle">
67
     <!-- Customize these properties if you are using oracle -->
68
     <echo message="Using oracle..."/>
69
     <property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
70
     <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
71
     <property name="jdbc-jar-name" value="classes111.zip" />
72
     <property name="jdbc" value="${jdbc_base}/${jdbc-jar-name}" />
73
     <!-- Property to indicate is not MSSQL installation-->
74
     <property name="other" value="yes"/>
75
     <property name="install-sql"
76
               value="xmltables.sql" />
77
     <property name="upgrade-1.2-sql"
78
               value="upgrade-db-to-1.2.sql" />
79
     <property name="upgrade-1.3-sql"
80
               value="upgrade-db-to-1.3.sql" />
81
     <property name="upgrade-1.4-sql"
82
               value="upgrade-db-to-1.4.sql" />
83
     <property name="upgrade-1.5-sql"
84
               value="upgrade-db-to-1.5.sql" />
85
     <property name="upgrade-1.6-sql"
86
               value="upgrade-db-to-1.6.sql" />
87
     <property name="upgrade-1.7-sql"
88
               value="upgrade-db-to-1.7.sql" />
89
  	<property name="upgrade-1.8-sql"
90
  	   	               value="upgrade-db-to-1.8.sql" />
91
   </target>
92

    
93
   <target name="postgresql" if="use-postgresql">
94
     <!-- Customize these properties if you are using postgres -->
95
     <echo message="Using PostgreSQL..."/>
96
     <property name="dbDriver" value="org.postgresql.Driver"/>
97
     <property name="dbAdapter"
98
               value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
99
     <property name="jdbc-jar-name" value="postgresql-8.0-312.jdbc3.jar" />
100
     <property name="jdbc" value="lib/${jdbc-jar-name}" />
101
     <!-- Property to indicate is not MSSQL installation-->
102
     <property name="other" value="yes"/>
103
     <property name="install-sql"
104
               value="xmltables-postgres.sql" />
105
     <property name="upgrade-1.2-sql"
106
               value="upgrade-db-to-1.2-postgres.sql" />
107
     <property name="upgrade-1.3-sql"
108
               value="upgrade-db-to-1.3-postgres.sql" />
109
     <property name="upgrade-1.4-sql"
110
               value="upgrade-db-to-1.4-postgres.sql" />
111
     <property name="upgrade-1.5-sql"
112
               value="upgrade-db-to-1.5-postgres.sql" />
113
     <property name="upgrade-1.6-sql"
114
               value="upgrade-db-to-1.6-postgres.sql" />
115
     <property name="upgrade-1.7-sql"
116
               value="upgrade-db-to-1.7-postgres.sql" />
117
   	<property name="upgrade-1.8-sql"
118
   	               value="upgrade-db-to-1.8-postgres.sql" />
119
    </target>
120

    
121
   <target name="sqlserver" if="use-sqlserver">
122
     <!-- Customize these properties if you are using SQL server -->
123
     <echo message="Using SQL Server..."/>
124
     <property name="dbDriver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
125
     <property name="dbAdapter"
126
               value="edu.ucsb.nceas.dbadapter.SqlserverAdapter"/>
127
     <property name="jdbc" value="${jdbc_base}/msbase.jar" />
128
     <property name="jdbc-add1" value="${jdbc_base}/msutil.jar" />
129
     <property name="jdbc-add2" value="${jdbc_base}/mssqlserver.jar" />
130
     <!-- Property to indicate is a MSSQL installation-->
131
     <property name="MSSQL" value="yes"/>
132
     <property name="install-sql"
133
               value="xmltables-sqlserver.sql" />
134
   </target>
135

    
136
   <target name="config" depends="check-db,oracle,postgresql,sqlserver">
137
      <!-- usr for client testing, generally you don't need change-->
138
      <property name="mcuser" value="uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org"/>
139
      <property name="mcpassword" value="kepler"/>
140
      <property name="mcanotheruser" value="uid=tao,o=NCEAS,dc=ecoinformatics,dc=org"/>
141
      <property name="mcanotherpassword" value="yourpass"/>
142
   	   <property name="piscouser" value="uid=tao,o=PISCO,dc=ecoinformatics,dc=org"/>
143
   	   <property name="piscopassword" value="yourpass"/>
144
   	   <property name="lteruser" value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org"/>
145
   	   <property name="lterpassword" value="yourpass"/>
146

    
147
      <property name="debug" value="on" />
148
      <property name="debuglevel" value="55" />
149

    
150
      <property name="morphosourcedir" value="../morpho" />
151
      <property name="defaultcontenttype" value="application/octet-stream" />
152
      <property name="utilitiesdir" value="../utilities" />
153

    
154
      <echo>*********** tomcatversion = ${tomcatversion}</echo>
155
      <echo>*********** set jsdk to ${jsdk}</echo>
156
  </target>
157

    
158
   <target name="init" depends="config">
159
      <path id="compile.classpath">
160
        <pathelement location="${jsdk}"/>
161
        <pathelement location="lib"/>
162
        <fileset dir="lib">
163
          <include name="*.jar"/>
164
        </fileset>
165
	<fileset dir="lib">
166
           <include name="xalan.jar"/>
167
         </fileset>
168
       <fileset dir="lib/lsid_lib">
169
         <include name="*.jar"/>
170
       </fileset>
171
       <fileset dir="${jdbc_base}">
172
         <include name="${jdbc-jar-name}"/>
173
          <include name="msbase.jar"/>
174
          <include name="msutil.jar"/>
175
          <include name="mssqlserver.jar"/>
176
       </fileset>
177

    
178
        <!-- Include geoserver, geotools, et. al. -->
179
        <fileset dir="lib/spatial/geoserver/WEB-INF/lib">
180
          <include name="*.jar"/>
181
        </fileset>
182
        <pathelement location="lib/spatial/geoserver/WEB-INF/classes"/>
183

    
184
       </path>
185
      
186
      <!-- It is less likely you'll need to make any changes from here down,
187
           but customization is possible -->
188
      <property name="name"                value="metacat"/>
189
      <property name="Name"                value="MetaCat"/>
190
      <property name="debugprefix"         value="${Name}:"/>
191
      <property name="release"             value="${metacat.version}"/>
192
      <property name="style-common-relpath" value="/style/common"/>
193
      <property name="style-shared-relpath" value="/style/shared"/>
194
      <property name="schema-relpath" value="/schema"/>
195
      <property name="style-common-cvsrelpath" value="lib${style-common-relpath}"/>
196
   	  <property name="schema-cvsrelpath" value="lib${schema-relpath}"/>
197
      <property name="style-skins-relpath" value="/style/skins"/>
198
      <property name="util-module"         value="utilities" />
199
      <property name="eml-module"          value="eml" />
200
      <property name="eml-version"         value="2.0.0beta6" />
201
      <property name="eml-tag"             value="EML_2_0_0_BETA_6_FOR_METACAT" />
202
      <property name="eml2_0_0-tag"        value="RELEASE_EML_2_0_0_UPDATE_1" />
203
      <property name="eml2_0_1-schema-tag" value="RELEASE_EML_2_0_1" />
204
      <property name="eml2_0_1-style-tag"  value="RELEASE_EML_2_0_1_UPDATE_6" />
205
      <property name="eml2_0_0namespace"   value="eml://ecoinformatics.org/eml-2.0.0" />
206
      <property name="eml2_0_1namespace"   value="eml://ecoinformatics.org/eml-2.0.1" />
207
      <property name="eml2_1_0namespace"   value="eml://ecoinformatics.org/eml-2.1.0" />
208
      <property name="stmmlnamespace"      value="http://www.xml-cml.org/schema/stmml" />
209
      <property name="eml-css"             value="eml_xsl.css"/>
210
      <property name="eml-module.default.css"
211
                                           value="default.css"/>
212
   	  
213
      <!-- Config for registry variables -->
214
      <!-- TODO: SCW remove these, covered in metacat.properties or in skin.properties --> 
215
      <property name="scope"               value="obfs"/>
216
      <property name="responseForm"        value="genericResponse.tmpl"/>
217
      <property name="entryForm"           value="entryForm.tmpl"/>
218
      <property name="guide"               value="genericGuide.tmpl"/>
219
      <property name="loginForm"           value="loginForm.tmpl"/>
220
      <property name="confirmData"         value="confirmData.tmpl"/>
221
      <property name="deleteData"          value="deleteData.tmpl"/>
222
      <property name="genericHeader"       value="genericHeader.tmpl"/>
223
      <property name="genericFooter"       value="genericFooter.tmpl"/>
224

    
225
      <filter token="scope"                value="${scope}"/>
226
      <filter token="responseForm"         value="${responseForm}"/>
227
      <filter token="entryForm"            value="${entryForm}"/>
228
      <filter token="guide"                value="${guide}"/>
229
      <filter token="loginForm"            value="${loginForm}"/>
230
      <filter token="confirmData"          value="${confirmData}"/>
231
      <filter token="deleteData"           value="${deleteData}"/>
232
      <filter token="genericHeader"        value="${genericHeader}"/>
233
      <filter token="genericFooter"        value="${genericFooter}"/>
234
      <filter token="adminname"            value="${adminname}"/>
235
      <filter token="recipient"            value="${recipient}"/>
236
   	  <filter token="metacatVersion"       value="${metacat.version}"/>
237

    
238
      <filter token="docrooturl" value="./" />
239
      <filter token="mcuser" value="${mcuser}"/>
240
      <filter token="mcpassword" value="${mcpassword}"/>
241
      <filter token="mcanotheruser" value="${mcanotheruser}"/>
242
      <filter token="mcanotherpassword" value="${mcanotherpassword}"/>
243
      <filter token="eml-css" value="${eml-css}"/>
244
      <filter token="style-skins-relpath" value="${style-skins-relpath}"/>
245
      <filter token="style-common-relpath" value="${style-common-relpath}"/>
246

    
247
      <filter token="eml-version" value="${eml-version}"/>
248
      <filter token="eml2_0_0namespace" value="${eml2_0_0namespace}"/>
249
      <filter token="eml2_0_1namespace" value="${eml2_0_1namespace}"/>
250
      <filter token="eml2_1_0namespace" value="${eml2_1_0namespace}"/>
251
      <filter token="stmmlnamespace" value="${stmmlnamespace}"/>
252
      <filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" />
253
      <filter token="debuglevel" value="${debuglevel}" />
254
      <filter token="defaultcontenttype" value="${defaultcontenttype}" />
255
      <filter token="debugprefix" value="${debugprefix}"/>
256
      <filter token="indexPaths" value="${indexPaths}"/>
257

    
258
      <filter token="defaultStage" value="${defaultStage}"/>
259
      <filter token="defaultHeader" value="${defaultHeader}"/>
260
      <filter token="defaultFooter" value="${defaultFooter}"/>
261
      <filter token="defaultChangePass" value="${defaultChangePass}"/>
262
      <filter token="defaultResetPass" value="${defaultResetPass}"/>
263
      <filter token="changePassSuccess" value="${changePassSuccess}"/>
264
      <filter token="resetPassSuccess" value="${resetPassSuccess}"/>
265
      <filter token="registerFailed" value="${registerFailed}"/>
266
      <filter token="registerLter" value="${registerLter}"/>
267
      <filter token="registerMatch" value="${registerMatch}"/>
268
      <filter token="registerSuccess" value="${registerSuccess}"/>
269
      <filter token="register" value="${register}"/>
270
      <filter token="searchResults" value="${searchResults}"/>
271
   	  <filter token="ldapMainServerFailure" value="${ldapMainServerFailure}"/>
272
   	  <filter token="lter-user" value="${lteruser}"/>
273
   	  <filter token="lter-pass" value="${lterpassword}"/>
274
      <filter token="pisco-user" value="${piscouser}"/>
275
      <filter token="pisco-pass" value="${piscopassword}"/>
276
   	   
277
       
278
   	  <filter token="timedreplication" value="${timedreplication}" />
279
   	  <filter token="firsttimedreplication" value="${firsttimedreplication}" />
280
   	  <filter token="timedreplicationinterval" value="${timedreplicationinterval}" />
281
      
282
   	  <property name="srcdir" value="./src" />
283
   	  <property name="lib.dir" value="./lib" />
284
   	  <property name="docdir" value="./docs" />
285
      <property name="testdir" value="./test" />
286
      <property name="testtorun" value="BuildIndexTest" />
287
      <property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
288
      <property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
289
   	  <property name="dev.deploy.dir" value="${dev.tomcat.dir}/webapps" />
290
      <property name="build.dir" value="./build"/>
291
      <property name="build.src" value="${build.dir}/src"/>
292
      <property name="build.dest" value="${build.dir}/classes"/>
293
      <property name="build.samples" value="${build.dir}/samples"/>
294
      <property name="build.tests" value="${build.dir}/tests"/>
295
      <property name="build.tmp" value="${build.dir}/tmp"/>
296
      <property name="build.metacattest" value="${build.tests}/metacattest"/>
297
      <property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
298
      <property name="build.data" value="${build.dir}/data"/>
299
      <property name="build.javadocs" value="${build.dir}/docs/api"/>
300
      <property name="build.war" value="${build.dir}/war"/>
301

    
302
      <property name="dist.dir" value="dist"/>
303
      <property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
304
      <property name="ver.src" value="${ver.dir}/src"/>
305
      <property name="util.dir" value="${dist.dir}/${util-module}"/>
306
	  <!-- directories for creating a Harvest List Editor distribution -->
307
      <property name="dist.dir.hle" value="disthle"/>
308
      <property name="ver.dir.hle" value="${dist.dir.hle}/harvest-list-editor-${release}"/>
309
   	  
310
   	  
311
   	  <property name="ecogrid-target-name" value="metacatImpl"/>
312
   	  <property name="ecogrid-module-dest-dir" value =".."/>
313
   	  <property name="ecogrid-module" value="seek/projects/ecogrid"/>
314
   	  <property name="ecogrid-dist-dir" value="${dist.dir}/${ecogrid-module}"/>
315
   	  <property name="ecogrid-dir" value="${ecogrid-module-dest-dir}/${ecogrid-module}"/>
316

    
317
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
318
      <condition property="utilities.required">
319
        <or>
320
          <not><available file="lib/httpclient.jar"/></not>
321
          <not><available file="lib/utilities.jar"/></not>
322
        </or>
323
      </condition>
324
      <condition property="eml.required">
325
        <or>
326
          <not><available file="lib/schema/eml-2.0.1/eml.xsd"/></not>
327
          <not><available file="lib/schema/eml-2.0.0/eml.xsd"/></not>
328
          <not><available file="lib/dtd/eml-dataset-2.0.0beta6.dtd"/></not>
329
        </or>
330
      </condition>
331
   	  
332
      <condition property="ecogrid.required">
333
      	   <or>
334
             <not><available file="${ecogrid-dir}/build.properties"/></not>
335
             <not><available file="${ecogrid-dir}/buildfiles/metacatImpl.xml"/></not>
336
           </or>
337
      </condition>
338

    
339
   </target>
340

    
341
   <target name="prepare" depends="init">
342
      <mkdir dir="${build.dir}"/>
343
      <mkdir dir="${build.src}"/>
344
      <mkdir dir="${build.dest}"/>
345
      <mkdir dir="${build.javadocs}"/>
346
      <mkdir dir="${build.tmp}"/>
347

    
348
      <copy todir="${build.src}" filtering="yes">
349
        <fileset dir="${srcdir}">
350
          <include name="edu/**"/>
351
          <include name="com/**"/>
352
          <include name="org/**"/>
353
          <include name="**/*.sql"/>
354
          <exclude name="**/CVS*"/>
355
          <exclude name="**/.#*"/>
356
        </fileset>
357
      </copy>
358
      <available file="lib/style/common/emlb6toeml2" type="dir"
359
                 property="styles.not.needed"/>
360
   </target>
361

    
362
   <target name="compile" depends="prepare,utilities"
363
    description="Compiles java code to build dir, and copies metacat props files there">
364

    
365
       <javac srcdir="${build.src}"
366
              destdir="${build.dest}"
367
              debug="${debug}"
368
              excludes="**/*.sql **/stringclient/** **/client/*.java **/harvesterClient/*.java">
369
        <classpath>
370
          <path refid="compile.classpath"/>
371
        </classpath>
372
      </javac>
373
   </target>
374

    
375
   <target name="jar" depends="compile,geteml"
376
    description="Compiles and jars metacat java code to metacat.jar in build dir">
377

    
378
       <delete file="${build.dir}/${name}.jar" />
379
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
380
            excludes="**/protocols/ **/harvesterClient/" />
381
   </target>
382

    
383
   <target name="protocol" depends="compile"
384
    description="Compiles and jars protocol java code to protocol.jar in build dir">
385
       <delete file="${build.dir}/protocol.jar" />
386
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
387
            includes="**/protocols/" />
388
   </target>
389

    
390
   <target name="utilities" depends="config" if="utilities.required">
391
     <ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
392
     <ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
393
     <copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
394
     <copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
395
   </target>
396

    
397
   <target name="getutilities" depends="prepare"
398
   description="Checks utility out of cvs and copies it to your metacat cvs sandbox">
399
     <echo>Enter CVS password: </echo>
400
     <cvs cvsRoot="${cvsroot}"
401
          package="${util-module}"
402
          dest="${build.tmp}" />
403
   </target>
404

    
405
   <target name="client" depends="utilities, prepare"
406
    description="Compiles metacat-client java code to build dir">
407
       <javac srcdir="${build.src}"
408
              destdir="${build.dest}"
409
              includes="edu/ucsb/nceas/metacat/client/*">
410
          <classpath>
411
            <path refid="compile.classpath"/>
412
          </classpath>
413
        </javac>
414
   </target>
415

    
416
   <target name="clientjar" depends="client"
417
    description="Compiles and jars metacat-client java code to metacat-client.jar in build dir">
418
       <delete file="${build.dir}/${name}-client.jar" />
419
       <jar jarfile="${build.dir}/${name}-client.jar" basedir="${build.dest}"
420
            includes="**/metacat/client/" />
421
   </target>
422

    
423
    <target name="advancedsearchjar" depends="compile"
424
            description="Compiles and jars advanced search Java code to advancedsearch.jar in build dir">
425
        <delete file="${build.dir}/advancedsearch.jar" />
426
        <jar jarfile="${build.dir}/advancedsearch.jar" basedir="${build.dest}"
427
             includes="**/metacat/advancedsearch/" />
428
    </target>
429

    
430
   <target name="harvester" depends="client"
431
           description="Compiles harvester java code to build dir">
432
       <javac srcdir="${build.src}"
433
              destdir="${build.dest}"
434
              includes="edu/ucsb/nceas/metacat/harvesterClient/*">
435
          <classpath>
436
            <path refid="compile.classpath"/>
437
          </classpath>
438
        </javac>
439
   </target>
440

    
441
   <target name="harvesterjar" depends="harvester"
442
           description="Compiles and jars harvester java code to harvester.jar in build dir">
443
       <delete file="${build.dir}/harvester.jar" />
444
       <jar jarfile="${build.dir}/harvester.jar" basedir="${build.dest}"
445
            includes="**/metacat/harvesterClient/" />
446
   </target>
447

    
448
   <target name="harvestListEditorDist" depends="harvesterjar"
449
           description="Prepares a distribution of the Harvest List Editor tool">
450
       <mkdir dir="${dist.dir.hle}"/>
451
       <delete dir="${ver.dir.hle}" />
452
       <mkdir dir="${ver.dir.hle}"/>
453
       <copy todir="${ver.dir.hle}" file="${build.dir}/harvester.jar"/>
454
       <copy todir="${ver.dir.hle}" file="lib/xercesImpl.jar"/>
455
       <copy todir="${ver.dir.hle}" file="lib/harvester/harvestList.xsd"/>
456
       <copy todir="${ver.dir.hle}" file="lib/harvester/harvestListEditor.bat"/>
457
       <copy todir="${ver.dir.hle}" file="lib/harvester/harvestListEditor.sh"/>
458
       <delete file="./harvest-list-editor-${release}.zip"/>
459
       <zip zipfile="./harvest-list-editor-${release}.zip" basedir="${ver.dir.hle}" />
460
       <delete file="./harvest-list-editor-${release}.tar.gz" />
461
       <tar tarfile="./harvest-list-editor-${release}.tar" basedir="${ver.dir.hle}" />
462
       <gzip zipfile="./harvest-list-editor-${release}.tar.gz"
463
             src="./harvest-list-editor-${release}.tar"/>
464
       <delete file="./harvest-list-editor-${release}.tar" />
465
   </target>
466

    
467
   <target  name="geteml" depends="getemlpre2,geteml2+" if="eml.required"
468
            description="Calls getemlpre2 and geteml2+ targets" />
469

    
470
   <target name="getemlpre2" depends="prepare" if="eml.required"
471
   description="Checks EML-beta6 out of cvs and copies dtds and xsl to your metacat cvs sandbox">
472
     <echo>Enter CVS password: </echo>
473
     <cvs cvsRoot="${cvsroot}"
474
          package="${eml-module}"
475
          tag="${eml-tag}"
476
          dest="${build.tmp}/eml_${eml-tag}" />
477
     <mkdir dir="lib/dtd" />
478
     <copy todir="lib/dtd" filtering="yes">
479
       <fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}">
480
         <include name="*.dtd"/>
481
       </fileset>
482
       <mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
483
     </copy>
484

    
485
     <copy todir="${style-common-cvsrelpath}" filtering="yes">
486
       <fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}/style">
487
       <include name="**/*.xsl"/>
488
     </fileset>
489
     </copy>
490
   </target>
491

    
492
   <target name="geteml2+" depends="prepare" if="eml.required"
493
   description="Checks eml-2 out of cvs and copies schema and xsl to your metacat cvs sandbox">
494
     <echo>Enter CVS password: </echo>
495
     <cvs cvsRoot="${cvsroot}"
496
          package="${eml-module}"
497
          tag="${eml2_0_0-tag}"
498
          dest="${build.tmp}/eml_${eml2_0_0-tag}" />
499
     <mkdir dir="lib/schema/eml-2.0.0" />
500
     <copy todir="lib/schema/eml-2.0.0" filtering="yes">
501
       <fileset dir="${build.tmp}/eml_${eml2_0_0-tag}/${eml-module}">
502
         <include name="*.xsd"/>
503
       </fileset>
504

    
505
       <!-- shouldn't we have a mapper here like this??
506
       <mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" />
507

    
508
       Jing's code didn't nave one - does it need to be added?
509
       NOTE that eml-version is set to beta 6, so this would need changing -->
510

    
511
     </copy>
512
     <!-- <antcall target="copyxsl">
513
        <param name="cvs.tagname" value="${eml2_0_0-tag}" />
514
        <param name="dirname" value="eml-2.0.0" />
515
     </antcall> -->
516
   	
517
   	<!-- Checkout eml201 for given schema tag-->
518
     <echo>Enter CVS password: </echo>
519
     <cvs cvsRoot="${cvsroot}"
520
          package="${eml-module}"
521
          tag="${eml2_0_1-schema-tag}"
522
          dest="${build.tmp}/eml_${eml2_0_1-schema-tag}" />
523
     <mkdir dir="lib/schema/eml-2.0.1" />
524
     <copy todir="lib/schema/eml-2.0.1" filtering="yes">
525
       <fileset dir="${build.tmp}/eml_${eml2_0_1-schema-tag}/${eml-module}">
526
         <include name="*.xsd"/>
527
       </fileset>
528
     </copy>
529
   	
530
   	<!-- Checkout eml201 again for given style sheet tag-->
531
   	<echo>Enter CVS password: </echo>
532
   	     <cvs cvsRoot="${cvsroot}"
533
   	          package="${eml-module}"
534
   	          tag="${eml2_0_1-style-tag}"
535
   	          dest="${build.tmp}/eml_${eml2_0_1-style-tag}" />
536
     <antcall target="copyxsl">
537
        <param name="cvs.tagname" value="${eml2_0_1-style-tag}" />
538
        <param name="dirname" value="eml-2.0.1" />
539
     </antcall>
540
   </target>
541

    
542
   <target  name="copyxsl"
543
   description="Copies xsl stylesheets from checkout in build/tmp to your metacat cvs sandbox">
544

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

    
547
     <copy todir="${style-common-cvsrelpath}/${dirname}" filtering="yes">
548
       <fileset dir="${build.tmp}/eml_${cvs.tagname}/${eml-module}/style/eml">
549
       <include name="**/*.xsl"/>
550
     </fileset>
551
     </copy>
552

    
553

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

    
559
   </target>
560

    
561

    
562
<!--
563
   <target name="register-schemas" depends="prepare"
564
   description="Registers the Schemas with a new Metacat instance">
565
     <echo/>
566
     <echo>Registering the Schemas with the new Metacat instance...</echo>
567
     <sql driver="${dbDriver}"
568
          url="${jdbc-connect}"
569
          userid="${user}"
570
          password="${password}"
571
          src="${build.src}/loaddtdschema.sql">
572
       <classpath>
573
         <path refid="compile.classpath"/>
574
       </classpath>
575
     </sql>
576
   </target>
577

    
578
   <target name="installdb" depends="prepare"
579
            description="Installs the database tables">
580
     <echo/>
581
     <echo>Installing the database tables...</echo>
582
     <echo>In case of failure, run the sql script manually. Look at Metacat install instructions for more details</echo>
583
     <echo/>
584
     <sql driver="${dbDriver}"
585
          url="${jdbc-connect}"
586
          userid="${user}"
587
          password="${password}"
588
          src="${build.src}/${install-sql}">
589
       <classpath>
590
         <path refid="compile.classpath"/>
591
       </classpath>
592
     </sql>
593
   </target>
594

    
595
   <target name="dropdb" depends="prepare"
596
            description="WARNING: Drops the database tables">
597
     <echo/>
598
     <echo>Dropping the database tables...</echo>
599
     <echo>In case of failure, run the sql script manually. Look at Metacat install instructions for more details</echo>
600
     <echo/>
601
     <sql driver="${dbDriver}"
602
          url="${jdbc-connect}"
603
          userid="${user}"
604
          password="${password}"
605
          src="${build.src}/drop-postgres.sql">
606
       <classpath>
607
         <path refid="compile.classpath"/>
608
       </classpath>
609
     </sql>
610
   </target>
611

    
612
   <target name="upgrade12" depends="prepare"
613
            description="Updates the database tables to upgrade to version 1.2">
614
     <echo/>
615
     <echo>Updating the database tables to upgrade to version 1.2...</echo>
616
     <sql driver="${dbDriver}"
617
          url="${jdbc-connect}"
618
          userid="${user}"
619
          password="${password}"
620
          src="${build.src}/${upgrade-1.2-sql}">
621
       <classpath>
622
         <path refid="compile.classpath"/>
623
       </classpath>
624
     </sql>
625
   </target>
626

    
627
   <target name="upgrade13" depends="prepare"
628
            description="Updates the database tables to upgrade to version 1.3">
629
     <echo/>
630
     <echo>Updating the database tables to upgrade to version 1.3...</echo>
631
     <sql driver="${dbDriver}"
632
          url="${jdbc-connect}"
633
          userid="${user}"
634
          password="${password}"
635
          src="${build.src}/${upgrade-1.3-sql}">
636
       <classpath>
637
         <path refid="compile.classpath"/>
638
       </classpath>
639
     </sql>
640
   </target>
641

    
642
   <target name="upgrade14" depends="prepare"
643
            description="Updates the database tables to upgrade to version 1.4">
644
     <echo/>
645
     <echo>Updating the database tables to upgrade to version 1.4...</echo>
646
     <sql driver="${dbDriver}"
647
          url="${jdbc-connect}"
648
          userid="${user}"
649
          password="${password}"
650
          src="${build.src}/${upgrade-1.4-sql}">
651
       <classpath>
652
         <path refid="compile.classpath"/>
653
       </classpath>
654
     </sql>
655
   </target>
656

    
657
   <target name="upgrade15" depends="sqlupgrade15"
658
           description="Updates the database tables to upgrade to version 1.5">
659
     <echo/>
660
     <echo>Updating the database tables to upgrade to version 1.5...</echo>
661
     <copy file="${srcdir}/upgrade_db_to_1_5.java"
662
           todir="${build.tmp}" filtering="yes"/>
663

    
664
     <javac srcdir="${build.tmp}"
665
            destdir="${build.tmp}"
666
            debug="${debug}"
667
            includes="upgrade_db_to_1_5.java">
668
       <classpath>
669
         <path refid="compile.classpath"/>
670
       </classpath>
671
     </javac>
672

    
673
     <java classname="upgrade_db_to_1_5">
674
       <classpath>
675
         <path refid="compile.classpath"/>
676
         <fileset dir="${build.tmp}"/>
677
       </classpath>
678
     </java>
679

    
680
   </target>
681

    
682
   <target name="upgrade16" depends="prepare"
683
            description="Updates the database tables from version 1.5 to version 1.6">
684
     <echo/>
685
     <echo>Updating the database tables to upgrade to version 1.6...</echo>
686
     <sql driver="${dbDriver}"
687
          url="${jdbc-connect}"
688
          userid="${user}"
689
          password="${password}"
690
          src="${build.src}/${upgrade-1.6-sql}">
691
       <classpath>
692
         <path refid="compile.classpath"/>
693
       </classpath>
694
     </sql>
695
   </target>
696

    
697
   <target name="upgrade17" depends="prepare"
698
            description="Updates the database tables from version 1.6 to version 1.7">
699
     <echo/>
700
     <echo>Updating the database tables to upgrade to version 1.7...</echo>
701
     <sql driver="${dbDriver}"
702
          url="${jdbc-connect}"
703
          userid="${user}"
704
          password="${password}"
705
          src="${build.src}/${upgrade-1.7-sql}">
706
       <classpath>
707
         <path refid="compile.classpath"/>
708
       </classpath>
709
     </sql>
710
   </target>
711
	
712
   <target name="upgrade18" depends="prepare"
713
	            description="Updates the database tables from version 1.7 to version 1.8">
714
	     <echo/>
715
	     <echo>Updating the database tables to upgrade to version 1.8...</echo>
716
	     <sql driver="${dbDriver}"
717
	          url="${jdbc-connect}"
718
	          userid="${user}"
719
	          password="${password}"
720
	          src="${build.src}/${upgrade-1.8-sql}">
721
	       <classpath>
722
	         <path refid="compile.classpath"/>
723
	       </classpath>
724
	     </sql>
725
   </target>
726

    
727
   <target name="sqlupgrade15" depends="prepare">
728
      <echo>Updating the database tables to upgrade to version 1.5 by sql command</echo>
729
      <sql driver="${dbDriver}"
730
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
731
          url="${jdbc-connect}"
732
          userid="${user}"
733
          password="${password}"
734
          src="${build.src}/${upgrade-1.5-sql}" />
735
      <sql driver="${dbDriver}"
736
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
737
          url="${jdbc-connect}"
738
          userid="${user}"
739
          password="${password}"
740
          rdbms="oracle"
741
          delimiter="/">
742
        <transaction>
743
           CREATE TRIGGER xml_returnfield_before_insert
744
           BEFORE INSERT ON xml_returnfield FOR EACH ROW
745
           BEGIN
746
              SELECT xml_returnfield_id_seq.nextval
747
                 INTO :new.returnfield_id
748
                 FROM dual;
749
           END;
750
           /
751
        </transaction>
752
        <transaction>
753
           CREATE TRIGGER xml_queryresult_before_insert
754
           BEFORE INSERT ON xml_queryresult FOR EACH ROW
755
           BEGIN
756
              SELECT xml_queryresult_id_seq.nextval
757
              INTO :new.queryresult_id
758
              FROM dual;
759
           END;
760
           /
761
        </transaction>
762
      </sql>
763
   </target>
764
-->
765
	
766
   <target name="correctEML201Docs" depends="jar"
767
		            description="Uses the ant  task to run a JAVA patch class to correct invalide eml201 documents which were generated by wrong schema">
768
	   	<copy todir="${build.dir}" file="lib/metacat.properties" filtering="yes"/>    
769
	   	 <java classname="edu.ucsb.nceas.metacat.EML201DocumentCorrector" >
770
		         <classpath>
771
		          <path refid="compile.classpath"/>
772
		          <fileset dir="${build.dir}">
773
		            <include name="${name}.jar"/>
774
		          </fileset>
775
		        </classpath>
776
		      </java>
777
   </target>
778

    
779
   <target name="install-spatial" depends="jar,clientjar,harvesterjar"
780
           description="Installs spatial option for metacat">
781

    
782
      <property name="spatial.dir" value="./lib/spatial"/>
783
      <property name="spatial.geoserver.dir" value="${spatial.dir}/geoserver"/>
784
      <property name="spatial.webinf-mods" value="${spatial.dir}/WEB-INF"/>
785

    
786
      <!-- Copy geoserver libs into ${war.lib} -->
787
      <copy todir="${war.lib}" filtering="no">
788
        <fileset dir="${spatial.geoserver.dir}/WEB-INF/lib">
789
          <include name="**"/>
790
        </fileset>
791
      </copy>
792

    
793
      <!-- Copy everything in geoservers WEB-INF (except the libs) into ${war.webinf} -->
794
      <copy todir="${war.webinf}" filtering="no">
795
        <fileset dir="${spatial.geoserver.dir}/WEB-INF">
796
          <exclude name="lib/**"/>
797
          <exclude name="web.xml"/>
798
        </fileset>
799
      </copy>
800

    
801
      <!-- Copy the rest of the geoserver codebase into ${war.context} -->
802
      <copy todir="${war.context}" filtering="no">
803
        <fileset dir="${spatial.geoserver.dir}">
804
          <exclude name="WEB-INF/**"/>
805
          <exclude name="index.jsp"/>
806
        </fileset>
807
      </copy>
808

    
809
      <!-- Copy the geoserver index.jsp but rename it to avoid conflicting w/metcat   -->
810
     <copy file="${spatial.geoserver.dir}/WEB-INF/pages/index.jsp"
811
          tofile="${war.context}/geoserver.jsp"
812
          overwrite="true"
813
          filtering="no"/>
814

    
815
      <!-- Copy the rest of the modified geoserver web-inf files
816
      <copy todir="${war.webinf}" filtering="no">
817
        <fileset dir="${spatial.webinf-mods}">
818
          <exclude name="web.xml.combined"/>
819
        </fileset>
820
      </copy> -->
821

    
822
    </target>
823

    
824
   <target name="dev-install" depends="clean, install-ecogrid" description="* Full Install For Development *">
825
     <copy file="${dist.dir}/${metacat.context}.war" todir="${dev.deploy.dir}"/>
826
   	 <delete dir="${dev.deploy.dir}/${metacat.context}" />
827
   	   <tstamp>
828
   	   	 <format property="NOW" pattern="MM/dd/yyyy hh:mm:ss aa"/>
829
   	   </tstamp>
830
   	 <echo>Dev install completed at ${NOW}</echo> 	   	
831
   </target>
832

    
833
<!--
834
   <target name="install" depends="install-ecogrid" description="* Full Install *">
835
       <mkdir dir="${datafilepath}" />
836
       <mkdir dir="${inlinedatafilepath}" />
837
       <chmod dir="${datafilepath}" perm="ug+w" />
838
       <mkdir dir="${temp-dir}"/>
839
       <chmod dir="${temp-dir}" perm="ug+w" />
840
       <copy file="${dist.dir}/${metacat.context}.war" todir="${deploy.dir}"/>
841
   	   <echo>If you enable ecogrid installation, please run "ant deploy-ecogrid" when installation or upgrade is done</echo> 
842
   </target>
843
-->
844
	
845
   <target name="install-ecogrid" depends="war, get-ecogrid" if="enable.ecogrid"
846
			    description="Install Ecogrid Compentent">
847
   	  <copyfile src="lib/metacat.url" dest="${ecogrid-dir}/conf/MetacatImpl/classes/metacat.properties" forceoverwrite="true" filtering="yes"/>
848
   	  <ant antfile="build.xml" dir="${ecogrid-dir}" target ="clean" inheritall="false">
849
   	         <property name="context" value="${metacat.context}"/>
850
   	   	     <property name="target" value="${ecogrid-target-name}"/>
851
   	   	     <property name="metacat.dir" value="${metacat.dir}"/>
852
   	  </ant>
853
   	  <ant antfile="build.xml" dir="${ecogrid-dir}" target ="war" inheritall="false">
854
   	     <property name="context" value="${metacat.context}"/>
855
   	     <property name="target" value="${ecogrid-target-name}"/>
856
   	     <property name="metacat.dir" value="${metacat.dir}"/>
857
   	  </ant>
858
   	  <war destfile="${ecogrid-dir}/build/${metacat.context}.war" update="true">
859
  	      <webinf dir="${ecogrid-dir}/lib">
860
   	        <include name="server-config.wsdd"/>
861
   	      </webinf>
862
   	  </war>
863
   	  <copy file="${ecogrid-dir}/build/${metacat.context}.war" todir="${dist.dir}" overwrite="true"/>
864
   	  
865
   
866
   </target>
867
   
868
   <target name="get-ecogrid" depends="init" if="ecogrid.required" description="Check out ecogrid module">
869
	<echo>Enter CVS password: </echo>
870
	     <cvs cvsRoot="${cvsroot}"
871
	          package="${ecogrid-module}" dest="${ecogrid-module-dest-dir}"/>
872
   </target>
873
	
874
<!--   	
875
   <target name="upgrade" depends="install"
876
          description="* Upgrade an existing metacat installation with a new version *">
877
       <unwar src="${deploy.dir}/${metacat.context}.war" dest="${deploy.dir}/${metacat.context}" />
878
   </target>
879
-->   
880
	
881
   <target name="deploy-ecogrid" depends="clean-ecogrid-server-config-wsdd" if="enable.ecogrid" description="Automately generate wsdd for ecogrid service">
882
   	 <ant antfile="build.xml" dir="${ecogrid-dir}" target ="deploy" inheritall="false">
883
   	   	 <property name="context" value="${metacat.context}"/>
884
   	   	 <property name="target" value="${ecogrid-target-name}"/>
885
   	     <property name="metacat.dir" value="${metacat.dir}"/>
886
   	     <property name="hostname" value="localhost"/>
887
   	     <property name="port" value="${config.port}"/>
888
   	 </ant>
889
   </target>
890
	
891
   <target name="clean-ecogrid-server-config-wsdd" depends="init" description="Automately generate wsdd for ecogrid service">
892
      <delete file="${dev.deploy.dir}/${metacat.context}/WEB-INF/server-config.wsdd"/>
893
   </target>
894

    
895
   <target name="install-registry" depends="init,getConversionXSL"
896
            description="Install Registry">
897

    
898
      <mkdir dir="${inst.cgi.dir}" />
899
      <copy file="${srcdir}/perl/register-dataset.cgi"
900
            todir="${inst.cgi.dir}"/>
901
      <chmod file="${inst.cgi.dir}/register-dataset.cgi" perm="ugo+x" />
902

    
903
      <!-- TODO SCW: set the permissions on this folder to be writable by the apache user -->
904
      <mkdir dir="${temp-dir}" />
905
      <!-- TODO SCW: use relative paths to grab these instead of copying to tmp,
906
                     used in readDocumentFromMetacat -->
907
      <copy todir="${temp-dir}" filtering="yes">
908
       <fileset dir="lib/style/common/emlb6toeml2">
909
         <include name="*.xsl"/>
910
         <include name="*.xml"/>
911
       </fileset>
912
      </copy>
913

    
914
      <echo message="Install Registry completed." />
915
   </target>
916

    
917
   <target name="install-ldap" depends="init"
918
            description="Install Metacat LDAP Access">
919

    
920
      <mkdir dir="${inst.cgi.dir}" />
921
      <copy file="${srcdir}/perl/ldapweb.cgi"
922
            todir="${inst.cgi.dir}" />
923
      <chmod file="${inst.cgi.dir}/ldapweb.cgi" perm="ugo+x" />
924
      <mkdir dir="${templates.dir}" />
925
      <copy todir="${templates.dir}">
926
        <fileset dir="lib/style/common/templates">
927
			<!-- SCW: Copy all files -->
928
        </fileset>
929
      </copy>
930
      <echo message="ldapweb install complete." />
931
   </target>
932

    
933

    
934
   <target name="install-skin" depends="init"
935
            description="Install a Skin">
936

    
937
      <input message="Please enter name of the skin"
938
             addproperty="skin-name"/>
939

    
940
      <mkdir dir="${installdir}/style/skins/${skin-name}" />
941
      <copy todir="${installdir}/style/skins/${skin-name}" filtering="yes">
942
       <fileset dir="lib/style/skins/${skin-name}">
943
           <exclude name="**/*.png"/>
944
           <exclude name="**/*.gif"/>
945
           <exclude name="**/*.jpg"/>
946
           <exclude name="**/CVS*"/>
947
           <exclude name="**/.#*"/>
948
       </fileset>
949
      </copy>
950
     <copy todir="${installdir}/style/skins/${skin-name}" filtering="no">
951
       <fileset dir="lib/style/skins/${skin-name}">
952
           <include name="**/*.png"/>
953
           <include name="**/*.gif"/>
954
           <include name="**/*.jpg"/>
955
           <exclude name="**/CVS*"/>
956
           <exclude name="**/.#*"/>
957
       </fileset>
958
      </copy>
959
      <copy todir="${installdir}/style/common" filtering="yes">
960
       <fileset dir="lib/style/common">
961
           <include name="*.js"/>
962
           <include name="*.jsp"/>
963
           <include name="*.css"/>
964
           <exclude name="*.png"/>
965
           <exclude name="*.gif"/>
966
           <exclude name="*.jpg"/>
967
           <exclude name="**/CVS*"/>
968
           <exclude name="**/.#*"/>
969
       </fileset>
970
      </copy>
971
      <!--
972
      <mkdir dir="${installdir}/style/skins/${skin-name}/images" />
973
     <copy todir="${installdir}/style/skins/${skin-name}/images" filtering="no">
974
       <fileset dir="lib/style/skins/${skin-name}/images">
975
           <include name="*.png"/>
976
           <include name="*.gif"/>
977
           <include name="*.jpg"/>
978
       </fileset>
979
      </copy>
980
      -->
981

    
982
      <echo message="Install Skin completed." />
983
   </target>
984

    
985
   <target name="war" depends="warPrepare,warMSSQL,install-spatial"
986
            description="Create a web archive (WAR) for servlet deployment">
987
       <mkdir dir="${dist.dir}" />
988
       <war destfile="${dist.dir}/${metacat.context}.war"
989
            webxml="${build.war}/web.xml">
990
         <fileset dir="${war.context}"/>
991
         <lib dir="${war.lib}"/>
992
         <webinf dir="${war.webinf}"/>
993
       </war>
994
   </target>
995
	
996
	
997

    
998
   <target name="warPrepare" depends="jar,clientjar,harvesterjar"
999
            description="Prepare files for creating a web archive (WAR)">
1000

    
1001
       <property name="war.lib" value="${build.war}/lib" />
1002
       <property name="war.webinf" value="${build.war}/WEB-INF" />
1003
       <property name="war.context" value="${build.war}/${metacat.context}" />
1004
   	   <property name="war.context.sql" value="${war.context}/sql" />
1005
   	   <property name="war.context.docs" value="${war.context}/docs" />
1006
       <mkdir dir="${war.lib}" />
1007
       <mkdir dir="${war.webinf}" />
1008
       <mkdir dir="${war.context}" />
1009
   	   <mkdir dir="${war.context.sql}" />
1010
   	   <mkdir dir="${war.context.docs}" />
1011
       
1012
       <copy file="${jdbc}" tofile="${war.lib}/jdbc.jar" />
1013
       <copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
1014
       <copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
1015
       <copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
1016
       <copy todir="${war.lib}" filtering="no">
1017
         <fileset dir="lib">
1018
            <not>
1019
               <filename name="${jdbc-jar-name}"/>
1020
            </not>
1021
            <include name="*.jar"/>
1022
         </fileset>
1023
         <fileset dir="lib">
1024
           <include name="xalan.jar"/>
1025
           <include name="gwt*.jar"/>
1026
         </fileset>
1027
       </copy>
1028
       <!-- MCD copy file="lib/web.xml.${tomcatversion}"
1029
             tofile="${build.war}/web.xml" / -->
1030
       <!-- MCD added next - Remove the tomcat5 reference-->
1031
   	   <copy file="lib/web.xml.tomcat5"
1032
   	             tofile="${build.war}/web.xml"/>
1033
       <copy file="lib/metacat.properties" todir="${war.webinf}"
1034
             filtering="yes" />
1035
   	   <copy file="lib/metacat.properties.metadata.xml" todir="${war.webinf}"
1036
   	             filtering="no" />
1037
	   <copy file="lib/org.properties.metadata.xml" todir="${war.webinf}"
1038
	             filtering="no" />
1039
       <copy todir="${war.webinf}" filtering="yes">
1040
	   	  <fileset dir="lib">
1041
           <include name="skin.configs/**"/>
1042
		  </fileset>
1043
	   </copy>
1044
       <copy file="lib/log4j.properties" todir="${war.webinf}"
1045
             filtering="yes" />
1046
       <copy todir="${war.context}" filtering="no">
1047
         <fileset dir="lib">
1048
           <include name="**/*.jpg"/>
1049
           <include name="**/*.png"/>
1050
           <include name="**/*.gif"/>
1051
           <include name="LiveMap_30/**"/>
1052
         </fileset>
1053
       </copy>
1054
       <copy todir="${war.context}" filtering="yes">
1055
         <fileset dir="lib">
1056
           <exclude name="*.jar"/>
1057
           <exclude name="*.properties"/>
1058
         	<exclude name="*.metadata.xml"/>
1059
           <exclude name="web.xml"/>
1060
           <exclude name="**/*.jpg"/>
1061
           <exclude name="**/*.png"/>
1062
           <exclude name="**/*.gif"/>
1063
           <exclude name="lsid_lib/**"/>
1064
           <exclude name="lsid_conf/**"/>
1065
           <exclude name="LiveMap_30/**"/>
1066
           <exclude name="skin.configs/**"/>
1067
           <exclude name="spatial/geoserver/**"/>
1068
           <exclude name="spatial/WEB-INF/**"/>
1069
         </fileset>
1070
       </copy>
1071
   	   <copy todir="${war.context.docs}" filtering="yes">
1072
   	         <fileset dir="docs">
1073
   	           <include name="user/**"/>
1074
   	         </fileset>
1075
   	   </copy>
1076
	   <copy todir="${war.context.sql}" filtering="yes">
1077
	         <fileset dir="src">
1078
	           <include name="**/*.sql"/>
1079
	         </fileset>
1080
	   </copy>
1081
   </target>
1082

    
1083
   <target name="warMSSQL" if="MSSQL" depends="warPrepare">
1084
      <copy file="${jdbc-add1}" tofile="${war.lib}/msutil.jar" />
1085
       <copy file="${jdbc-add2}" tofile="${war.lib}/mssqlserver.jar" />
1086
   </target>
1087

    
1088
   <target name="getConversionXSL" depends="prepare"
1089
            unless="styles.not.needed"
1090
            description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
1091

    
1092
     <echo>Enter CVS password: </echo>
1093
     <cvs cvsRoot="${cvsroot}"
1094
          package="${eml-module}"
1095
          tag="${eml2_0_1-style-tag}"
1096
          dest="${build.tmp}/eml_${eml2_0_1-style-tag}" />
1097

    
1098
     <mkdir dir="lib/style/common/emlb6toeml2" />
1099
      <copy todir="lib/style/common/emlb6toeml2" filtering="yes">
1100
       <fileset dir="${build.tmp}/eml_${eml2_0_1-style-tag}/${eml-module}/lib/beta6toeml2/xsl">
1101
         <include name="*.xsl"/>
1102
         <include name="*.xml"/>
1103
       </fileset>
1104
      </copy>
1105
   </target>
1106

    
1107
   <target name="testprep" depends="jar,clientjar,harvesterjar">
1108
      <mkdir dir="${build.tests}"/>
1109
      <copy todir="${build.tests}" filtering="yes">
1110
        <fileset dir="${testdir}">
1111
          <include name="edu/**"/>
1112
        </fileset>
1113
      </copy>
1114
   	<copy todir="${build.tests}" file="lib/metacat.properties" filtering="yes">
1115
   	        
1116
   	 </copy>
1117
      <!-- copy and compile the tests into a jar file -->
1118
      <javac srcdir="${build.tests}"
1119
             destdir="${build.tests}"
1120
             debug="on"
1121
             includes="**/*.java">
1122
        <classpath>
1123
          <path refid="compile.classpath"/>
1124
          <fileset dir="${build.dir}">
1125
            <include name="${name}.jar"/>
1126
            <include name="${name}-client.jar"/>
1127
            <include name="harvester.jar"/>
1128
          </fileset>
1129
        </classpath>
1130
      </javac>
1131

    
1132
      <jar jarfile="${build.dir}/${name}-junittests.jar"
1133
        basedir="${build.tests}"
1134
                includes="**/*.class" />
1135
   </target>
1136

    
1137
   <target name="test" depends="testprep"
1138
            description="Uses the ant junit task to run all JUnit tests">
1139

    
1140
      <!-- use the ant "junit" task to run JUnit tests. -->
1141
      <junit printsummary="yes" haltonfailure="no" fork="yes"
1142
             haltonerror="no">
1143
        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
1144
        <classpath>
1145
          <path refid="compile.classpath"/>
1146
          <fileset dir="${build.dir}">
1147
            <include name="${name}.jar"/>
1148
            <include name="${name}-client.jar"/>
1149
            <include name="harvester.jar"/>
1150
            <include name="${name}-junittests.jar"/>
1151
          </fileset>
1152
        </classpath>
1153

    
1154
        <formatter type="plain" />
1155

    
1156
        <batchtest fork="yes" todir="${build.dir}">
1157
          <fileset dir="${build.tests}">
1158
            <include name="**/*.class" />
1159
          </fileset>
1160
        </batchtest>
1161
     </junit>
1162
   </target>
1163

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

    
1167
              <echo>testtorun: ${testtorun}</echo>
1168

    
1169
      <!-- use the ant "junit" task to run JUnit tests. -->
1170
      <junit printsummary="yes" haltonfailure="no" fork="yes"
1171
             haltonerror="no" showoutput="yes">
1172
        <!--<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>-->
1173
        <classpath>
1174
          <path refid="compile.classpath"/>
1175
          <fileset dir="${build.dir}">
1176
            <include name="${name}.jar"/>
1177
            <include name="${name}-client.jar"/>
1178
            <include name="harvester.jar"/>
1179
            <include name="${name}-junittests.jar"/>
1180
          </fileset>
1181
        </classpath>
1182

    
1183
        <formatter type="plain" />
1184

    
1185
        <batchtest fork="yes" todir="${build.dir}">
1186
          <fileset dir="${build.tests}">
1187
            <include name="**/${testtorun}.class" />
1188
          </fileset>
1189
        </batchtest>
1190
     </junit>
1191
   </target>
1192

    
1193
   <target name="testharvester"
1194
           depends="testprep"
1195
           description="Uses the ant junit task to test only the Harvester code">
1196
     <junit printsummary="yes"
1197
            haltonfailure="off"
1198
            fork="yes"
1199
            haltonerror="off">
1200
        <classpath>
1201
          <path refid="compile.classpath"/>
1202
          <fileset dir="${build.dir}">
1203
            <include name="${name}.jar"/>
1204
            <include name="${name}-client.jar"/>
1205
            <include name="harvester.jar"/>
1206
            <include name="${name}-junittests.jar"/>
1207
          </fileset>
1208
        </classpath>
1209
       <formatter type="plain" />
1210
       <batchtest fork="yes" todir="${build.dir}">
1211
         <fileset dir="${build.tests}">
1212
           <include name="**/harvesterClient/*.class" />
1213
         </fileset>
1214
       </batchtest>
1215
     </junit>
1216
   </target>
1217

    
1218
  <target name="gethttpclient" depends="prepare"
1219
            description="checks out and compiles morpho httpclient code">
1220
  <!--mkdir dir="${morphosourcedir}" -->
1221
        <cvs cvsRoot="${cvsroot}"
1222
             package="morpho"
1223
             dest="." />
1224
        <ant dir="${morphosourcedir}" inheritAll="false"  target="jar" />
1225
   </target>
1226

    
1227
   <!-- run this target, we need to check out a another morpho souce dir was checked out. -->
1228
   <target name="nettest" depends="dev-install"
1229
            description="compiles and runs the metacatnettest code">
1230

    
1231
      <echo>***********************************
1232
      Please run ant gethttpclient first!
1233
      ***********************************
1234
      </echo>
1235
      <!-- copy and compile the tests into a jar file -->
1236
      <mkdir dir="${build.metacatnettest}"/>
1237
      <javac srcdir="${junitnettestsdir}"
1238
             destdir="${build.metacatnettest}"
1239
             includes="**/*.java">
1240
        <classpath>
1241
          <path refid="compile.classpath"/>
1242
          <fileset dir="${build.dir}">
1243
            <include name="${name}.jar"/>
1244
          </fileset>
1245
        </classpath>
1246
      </javac>
1247

    
1248
      <jar jarfile="${build.dir}/${name}-junitnettests.jar"
1249
                    basedir="${build.metacatnettest}"
1250
                    includes="**/*.class" />
1251

    
1252
      <!-- use the ant "junit" task to run JUnit tests. -->
1253
      <junit printsummary="yes" haltonfailure="no" fork="yes"
1254
             haltonerror="no">
1255
        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
1256
        <classpath>
1257
          <path refid="compile.classpath"/>
1258
          <fileset dir="${build.dir}">
1259
            <include name="${name}.jar"/>
1260
            <include name="${name}-junitnettests.jar"/>
1261
          </fileset>
1262
        </classpath>
1263

    
1264
        <formatter type="plain" />
1265

    
1266
        <batchtest fork="yes" todir="${build.dir}">
1267
          <fileset dir="${build.metacatnettest}">
1268
            <include name="**/*.class" />
1269
          </fileset>
1270
        </batchtest>
1271
     </junit>
1272
   </target>
1273

    
1274
   <target name="cleanweb" depends="clean"
1275
            description="deletes tomcat web context dir and all its contents">
1276
     <delete dir="${installdir}" />
1277
   </target>
1278

    
1279

    
1280
   <target name="clean" depends="init"
1281
            description="deletes build dir and files that can be regenerated form the release">
1282
       <delete dir="${build.dir}" />
1283
       <delete dir="${dist.dir}" />
1284
   </target>
1285

    
1286
   <target name="fullclean" depends="clean"
1287
            description="deletes even jars that depend on external sources such as stylesheets and jars">
1288
       <delete file="lib/httpclient.jar" />
1289
       <delete file="lib/utilities.jar" />
1290
       <delete includeEmptyDirs="true" failonerror="false">
1291
         <fileset dir="${style-common-cvsrelpath}">
1292
           <include name="${eml-css}" />
1293
           <include name="eml-*/*.xsl" />
1294
           <include name="eml-*" />
1295
         </fileset>
1296
       	 <fileset dir="${schema-cvsrelpath}">
1297
       	   <include name="eml-*/*.xsd" />
1298
       	 </fileset>
1299
       </delete>
1300
   </target>
1301

    
1302
   <target name="jdoc" depends="prepare"
1303
            description="generates javadoc documentation">
1304
       <javadoc packagenames="edu.ucsb.nceas.*"
1305
           sourcepath="${build.src}"
1306
           destdir="${build.javadocs}"
1307
           author="true"
1308
           version="true"
1309
           use="true"
1310
           windowtitle="${Name} API"
1311
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
1312
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;">
1313
         <classpath>
1314
           <path refid="compile.classpath"/>
1315
         </classpath>
1316
       </javadoc>
1317
   </target>
1318

    
1319
   <target name="dist"
1320
       depends="geteml,get-ecogrid,jar,protocol,jdoc,getConversionXSL,getutilities"
1321
            description="prepares a full release distribution">
1322
      <mkdir dir="${dist.dir}"/>
1323
      <delete dir="${ver.dir}" />
1324
      <mkdir dir="${ver.dir}"/>
1325
      <copy todir="${ver.dir}">
1326
        <fileset dir="."
1327
            excludes="**/CVS* **/.#* src/** test/** build/** docs/** ${dist.dir}/** ${dist.dir.hle}/**"/>
1328
      </copy>
1329
      <copy todir="${ver.dir}" file="build.xml"/>
1330
      <copy todir="${ver.dir}" file="build.properties"/>
1331

    
1332
      <copy todir="${ver.dir}/docs" filtering="yes">
1333
        <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
1334
      </copy>
1335
      <copy todir="${ver.dir}/docs" filtering="no">
1336
        <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
1337
      </copy>
1338
      <copy todir="${ver.dir}/docs/dev">
1339
        <fileset dir="${build.dir}/docs"/>
1340
      </copy>
1341
      <copy todir="${ver.dir}/src">
1342
        <fileset dir="${build.dir}/src"/>
1343
      </copy>
1344
      <!-- copy loaddtdschemal.sql form src dir(which has the server token to ver.dir/src-->
1345
      <copy todir="${ver.dir}/src" file="${srcdir}/loaddtdschema.sql" overwrite="yes" filtering="no"/>
1346
      <copy todir="${ver.dir}/src" file="${srcdir}/upgrade-db-to-1.5.sql" overwrite="yes" filtering="no"/>
1347
      <!--
1348
      <delete dir="./${ver.dir}/${build.dir}"/>
1349
      <delete dir="./${ver.dir}/dist"/>
1350
      -->
1351
      <delete file="./${name}-${release}.zip"/>
1352
      <zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
1353
      <delete file="./${name}-${release}.tar.gz" />
1354
      <tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
1355
      <gzip zipfile="./${name}-${release}.tar.gz"
1356
                src="./${name}-${release}.tar"/>
1357
      <delete file="./${name}-${release}.tar" />
1358
  </target>
1359

    
1360
  <target name="distsrc" depends="dist"
1361
            description="prepares a source distribution">
1362
      <mkdir dir="${ver.src}"/>
1363
      <copy todir="${ver.src}">
1364
        <fileset dir="./src"/>
1365
      </copy>
1366
      <mkdir dir="${util.dir}"/>
1367
      <copy todir="${util.dir}">
1368
        <fileset dir="${build.tmp}/utilities" excludes="**/CVS*" />
1369
      </copy>
1370
  	  
1371
  	  <mkdir dir="${ecogrid-dist-dir}"/>
1372
  	  <copy todir="${ecogrid-dist-dir}">
1373
  	        <fileset dir="${ecogrid-dir}" excludes="**/CVS*" />
1374
  	  </copy>
1375

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

    
1378
      <delete file="./${name}-src-${release}.zip"/>
1379
      <zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
1380
      <delete file="./${name}-src-${release}.tar.gz" />
1381
      <tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
1382
      <gzip zipfile="./${name}-src-${release}.tar.gz"
1383
                src="./${name}-src-${release}.tar"/>
1384
      <delete file="./${name}-src-${release}.tar" />
1385
      <delete dir="${dist.dir}"/> 
1386
  </target>
1387

    
1388
   <target name="stylesheettest">
1389
     <xslt in="${input}" out="eml.html" style="${style-common-cvsrelpath}/eml-2.0.0/eml-2.0.0.xsl">
1390
      <param name="displaymodule" expression="${displaymodule}"/>
1391
      <param name="docid" expression="${input}"/>
1392
      <param name="entitytype" expression="${entitytype}"/>
1393
      <param name="entityindex" expression="${entityindex}"/>
1394
      <outputproperty name="method" value="html"/>
1395
      <outputproperty name="standalone" value="yes"/>
1396
      <outputproperty name="encoding" value="iso8859_1"/>
1397
      <outputproperty name="indent" value="yes"/>
1398
    </xslt>
1399
  </target>
1400

    
1401
 
1402
  <target name="compilewebclient" depends="prepare">
1403
     <javac srcdir="${build.src}" destdir="${build.dest}" includes="**/application/*.java" classpathref="webservicepath" />
1404
  </target>
1405

    
1406
  <target name="runwebclient" depends="compilewebclient">
1407
     <java classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
1408
           dir="${build.dest}" fork="yes"
1409
           classpathref="webservicepath" classpath="./lib/utilities.jar" failonerror="true">
1410
         <arg value="${serviceUrl}"/>
1411
         <arg value="${docid}"/>
1412
     </java>
1413
  </target>
1414
  
1415
  <target name="spatial_option" depends="prepare" description=" -- compiles code for the spatial option">
1416

    
1417
    <echo message="Compiling the metatcat shapefile creator"/>
1418
    <echo message="using the shapelib at: ${shapelib.dir}"/>
1419
    <exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
1420
     <arg line="./src/spatial/cpp/metacat_shapefile.cpp -I ${shapelib.dir} -c -o build/metacat_shapefile.o" />
1421
    </exec>
1422
  
1423
    <exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
1424
     <arg line="build/metacat_shapefile.o ${shapelib.dir}/.libs/libshp.a -o bin/metacat_shapefile" />
1425
    </exec>
1426
  </target>
1427

    
1428
    <!-- LSID Authority support -->
1429
    <patternset id="lsid.jars">
1430
        <include name="axis.jar" />
1431
        <include name="commons-discovery-0.2.jar" />
1432
        <include name="jaxrpc.jar" />
1433
        <include name="lsid-client-1.1.1.jar" />
1434
        <include name="lsid-server-1.1.1.jar" />
1435
        <include name="saaj.jar" />
1436
        <include name="wsdl4j-1.5.1.jar" />
1437
        <include name="activation.jar" />
1438
        <include name="castor-0.9.5.jar" />
1439
        <include name="dnsjava-1.3.2.jar" />
1440
        <include name="mail.jar" />
1441
        <include name="commons-logging-1.0.4.jar" />
1442
        <!-- These jars may be needed but seem to not actually be,
1443
             so leaving them out for now
1444
        <include name="axis-ant.jar" />
1445
        -->
1446
        <!--<include name="GenCastor.class" />-->
1447
    </patternset>
1448
    <patternset id="lib.jars">
1449
        <include name="httpclient.jar" />
1450
        <include name="log4j-1.2.12.jar" />
1451
        <include name="utilities.jar" />
1452
        <include name="xercesImpl.jar" />
1453
        <include name="xalan.jar" />
1454
        <include name="xml-apis.jar" />
1455
    </patternset>
1456

    
1457
    <path id="lsid.classpath">
1458
        <fileset dir="${lsid.lib.dir}">
1459
            <patternset refid="lsid.jars"/>
1460
        </fileset>
1461
        <fileset dir="${lib.dir}">
1462
            <patternset refid="lsid.jars"/>
1463
        </fileset>
1464
        <fileset dir="${lib.dir}">
1465
            <include name="xalan.jar" />
1466
            <include name="xml-apis.jar" />
1467
        </fileset>
1468
        <fileset dir="${build.dir}">
1469
            <include name="metacat-client.jar" />
1470
        </fileset>
1471
    </path>
1472

    
1473
    <filterset id="configFilters">
1474
        <!-- MCD BYE filter token="LSID_AUTHORITY_HOSTNAME"
1475
                value="${config.hostname}" / -->
1476
        <!-- MCD BYE filter token="LSID_AUTHORITY_PORT"
1477
                value="${config.port}" / -->
1478
        <!-- MCD BYE filter token="METADATA_LABELS"
1479
                value="${config.metadataLabelLsid}" / -->
1480
        <!-- MCD BYE filter token="METACAT_SERVER"
1481
                value="${config.metacatserver}" / -->
1482
        <!-- MCD BYE filter token="LSID_AUTHORITY_STRING"
1483
                value="${config.lsidauthority}" / -->
1484
    </filterset>
1485
    
1486
    <target name="prepare-lsid"
1487
            depends="prepare,utilities,clientjar"
1488
            description="Configure files prior to compilation">
1489
        <mkdir dir="${lsid.build.dir}" />
1490
        <!-- Copy the properties file into the build -->
1491
        <copy file="${conf.dir}/metacat-lsid.properties"
1492
              tofile="${lsid.build.dir}/WEB-INF/classes/metacat-lsid.properties"
1493
              overwrite="true">
1494
            <filterset refid="configFilters" />
1495
        </copy>
1496
        <copy file="${conf.dir}/log4j.properties"
1497
              tofile="${lsid.build.dir}/WEB-INF/classes/log4j.properties"
1498
              overwrite="true">
1499
            <filterset refid="configFilters" />
1500
        </copy>
1501
        <!-- Copy config files into the build -->
1502
        <copy todir="${lsid.build.dir}/WEB-INF">
1503
            <fileset dir="${webinf.dir}"
1504
                     includes="**/*.wsdd" />
1505
        </copy>
1506
        <!-- Copy the metadata configuration files into the build -->
1507
        <mkdir dir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}" />
1508
        <copy todir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}">
1509
            <fileset dir="${conf.dir}"
1510
                     includes="**/*.xml" />
1511
            <fileset dir="${conf.dir}"
1512
                     includes="**/*.xslt" />
1513
            <filterset refid="configFilters" />
1514
        </copy>
1515
        <!-- Copy services files into the build -->
1516
        <mkdir dir="${lsid.build.dir}/services" />
1517
        <copy todir="${lsid.build.dir}/services">
1518
            <fileset dir="${services.dir}" />
1519
            <filterset refid="configFilters" />
1520
        </copy>
1521
        <!-- Copy axis files into the build -->
1522
        <mkdir dir="${lsid.build.dir}" />
1523
        <copy todir="${lsid.build.dir}">
1524
            <fileset dir="${conf.dir}/axis"
1525
                     excludes="*.properties"/>
1526
        </copy>
1527
        <mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
1528
        <copy todir="${lsid.build.dir}/WEB-INF/classes">
1529
            <fileset dir="${conf.dir}/axis"
1530
                     includes="*.properties"/>
1531
        </copy>
1532
    </target>
1533
    
1534
    <target name="compile-lsid"
1535
            depends="prepare-lsid"
1536
            description="Compile Java sources">
1537
        <mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
1538
        <javac srcdir="src/edu/ucsb/nceas/metacat/lsid"
1539
               destdir="${lsid.build.dir}/WEB-INF/classes"
1540
               debug="${compile.debug}"
1541
               deprecation="${compile.deprecation}"
1542
               optimize="${compile.optimize}">
1543
            <classpath refid="lsid.classpath" />
1544
        </javac>
1545
    </target>
1546
    
1547
    <target name="war-lsid"
1548
            depends="compile-lsid"
1549
            description="Create a war file for the application">
1550
        <mkdir dir="${dist.dir}" />
1551
        <war destfile="${dist.dir}/${authority.context}.war"
1552
             webxml="${webinf.dir}/web.xml">
1553
            <fileset dir="${lsid.build.dir}" />
1554
            <lib dir="${lsid.lib.dir}">
1555
                <patternset refid="lsid.jars"/>
1556
            </lib>
1557
            <lib dir="${lib.dir}">
1558
                <patternset refid="lib.jars"/>
1559
            </lib>
1560
            <lib dir="${lib.dir}">
1561
                <include name="xalan.jar" />
1562
                <include name="xml-apis.jar" />
1563
            </lib>
1564
            <lib dir="${build.dir}">
1565
                <include name="metacat-client.jar" />
1566
            </lib>
1567
        </war>
1568
    </target>
1569
    
1570
    <target name="deploy-lsid"
1571
            depends="war-lsid"
1572
            description="Deploy LSID war to servlet container">
1573
        <delete dir="${dev.deploy.dir}/${authority.context}" />
1574
        <delete file="${dev.deploy.dir}/${authority.context}.war" />
1575
        <mkdir dir="${dev.deploy.dir}" />
1576
        <copy todir="${dev.deploy.dir}">
1577
            <fileset dir="${dist.dir}" />
1578
        </copy>
1579
    </target>
1580
</project>
(5-5/5)