Project

General

Profile

1 113 jones
<?xml version="1.0"?>
2 1311 berkley
<!--
3 670 jones
  *   '$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 113 jones
  *
9 670 jones
  *    '$Author$'
10 1292 tao
  *    '$Date$'
11
  *    '$Revision$'
12 666 jones
  *
13 670 jones
  * Build file for the Ant cross-platform build system for metacat
14
  * See http://jakarta.apache.org for details on Ant
15 113 jones
  *
16 303 jones
  * usage: ant [compile|jar|install|jdoc]
17 666 jones
  *
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 1311 berkley
-->
32 329 jones
<project name="metacat" default="jar" basedir=".">
33 2277 jones
  <property environment="env"/>
34 1929 brooke
  <property file="build.properties"/>  <!-- USER SPECIFIC PROPS -->
35 2957 tao
36 4098 daigle
37
38 2957 tao
  <!-- Determine if installed ecogrid -->
39
  <condition property="enable.ecogrid">
40
    <equals arg1="${install.ecogrid}" arg2="true" />
41
  </condition>
42 4435 daigle
43
   <condition property="enable.testBuild">
44
      <equals arg1="${test.build}" arg2="true" />
45
   </condition>
46 3034 perry
47 4098 daigle
   <target name="config">
48
   	  <property name="jsdk" value="${build.tomcat.dir}/common/lib/servlet-api.jar"/>
49 1814 tao
      <!-- usr for client testing, generally you don't need change-->
50 4098 daigle
      <property name="mcuser"              value="uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org"/>
51
      <property name="mcpassword"          value="kepler"/>
52
      <property name="mcanotheruser"       value="uid=tao,o=NCEAS,dc=ecoinformatics,dc=org"/>
53
      <property name="mcanotherpassword"   value="yourpass"/>
54
   	  <property name="piscouser"           value="uid=tao,o=PISCO,dc=ecoinformatics,dc=org"/>
55
   	  <property name="piscopassword"       value="yourpass"/>
56
   	  <property name="lteruser"            value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org"/>
57
   	  <property name="lterpassword"        value="yourpass"/>
58 1801 tao
59 4098 daigle
      <property name="debug"               value="on" />
60 4179 daigle
      <!-- MCD BYE in metacat.properties property name="debuglevel"          value="55" / -->
61 1716 berkley
62 4098 daigle
      <property name="morphosourcedir"     value="../morpho" />
63 4179 daigle
      <!-- MCD BYE in metacat.properties property name="defaultcontenttype"  value="application/octet-stream" / -->
64 4098 daigle
      <property name="utilitiesdir"        value="../utilities" />
65 4236 leinfelder
      <property name="installdir"        value="${dev.deploy.dir}/${metacat.context}" />
66 2175 tao
67 1941 brooke
      <echo>*********** set jsdk to ${jsdk}</echo>
68 1103 tao
  </target>
69
70 931 jones
   <target name="init" depends="config">
71 2631 tao
      <path id="compile.classpath">
72
        <pathelement location="${jsdk}"/>
73 4080 daigle
        <pathelement location="lib"/>
74 2631 tao
        <fileset dir="lib">
75
          <include name="*.jar"/>
76
        </fileset>
77 4121 daigle
	    <fileset dir="lib">
78 3059 berkley
           <include name="xalan.jar"/>
79 3030 sgarg
         </fileset>
80 2631 tao
       <fileset dir="lib/lsid_lib">
81
         <include name="*.jar"/>
82 4098 daigle
       </fileset>
83 3034 perry
84
        <!-- Include geoserver, geotools, et. al. -->
85
        <fileset dir="lib/spatial/geoserver/WEB-INF/lib">
86
          <include name="*.jar"/>
87 2631 tao
        </fileset>
88 3034 perry
        <pathelement location="lib/spatial/geoserver/WEB-INF/classes"/>
89
90 4121 daigle
      </path>
91 2631 tao
92 931 jones
      <!-- It is less likely you'll need to make any changes from here down,
93
           but customization is possible -->
94 1929 brooke
      <property name="name"                value="metacat"/>
95
      <property name="Name"                value="MetaCat"/>
96
      <property name="debugprefix"         value="${Name}:"/>
97 4080 daigle
      <property name="release"             value="${metacat.version}"/>
98 3095 cjones
      <property name="style-common-relpath" value="/style/common"/>
99
      <property name="style-shared-relpath" value="/style/shared"/>
100 4098 daigle
      <property name="schema-relpath"      value="/schema"/>
101 3095 cjones
      <property name="style-common-cvsrelpath" value="lib${style-common-relpath}"/>
102 4098 daigle
   	  <property name="schema-cvsrelpath"   value="lib${schema-relpath}"/>
103 1929 brooke
      <property name="style-skins-relpath" value="/style/skins"/>
104 2461 sgarg
      <property name="util-module"         value="utilities" />
105 1929 brooke
      <property name="eml-module"          value="eml" />
106
      <property name="eml-version"         value="2.0.0beta6" />
107
      <property name="eml-tag"             value="EML_2_0_0_BETA_6_FOR_METACAT" />
108 2232 sgarg
      <property name="eml2_0_0-tag"        value="RELEASE_EML_2_0_0_UPDATE_1" />
109 3994 berkley
      <property name="eml2_0_1-schema-tag" value="RELEASE_EML_2_0_1" />
110 4498 leinfelder
      <property name="eml2_0_1-style-tag"  value="RELEASE_EML_2_0_1_UPDATE_7" />
111 4328 daigle
   	  <!-- property name="eml2_1_0-schema-tag" value="RELEASE_EML_2_1_0_RC_3" / -->
112
      <!-- property name="eml2_1_0-style-tag"  value="RELEASE_EML_2_1_0_RC_3" / -->
113
 	  <property name="eml2_1_0-schema-tag" value="" />
114
      <property name="eml2_1_0-style-tag"  value="" />
115 2228 sgarg
      <property name="eml2_0_0namespace"   value="eml://ecoinformatics.org/eml-2.0.0" />
116
      <property name="eml2_0_1namespace"   value="eml://ecoinformatics.org/eml-2.0.1" />
117
      <property name="eml2_1_0namespace"   value="eml://ecoinformatics.org/eml-2.1.0" />
118 1929 brooke
      <property name="stmmlnamespace"      value="http://www.xml-cml.org/schema/stmml" />
119 1933 brooke
      <property name="eml-css"             value="eml_xsl.css"/>
120
      <property name="eml-module.default.css"
121
                                           value="default.css"/>
122 4435 daigle
   	<property name="systemidserver"             value=""/>
123
   	<property name="html-path"             value=""/>
124
125 2965 tao
126 1929 brooke
      <!-- Config for registry variables -->
127 4080 daigle
      <!-- TODO: SCW remove these, covered in metacat.properties or in skin.properties -->
128 1933 brooke
      <property name="scope"               value="obfs"/>
129
      <property name="responseForm"        value="genericResponse.tmpl"/>
130
      <property name="entryForm"           value="entryForm.tmpl"/>
131
      <property name="guide"               value="genericGuide.tmpl"/>
132 2781 sgarg
      <property name="loginForm"           value="loginForm.tmpl"/>
133 2343 sgarg
      <property name="confirmData"         value="confirmData.tmpl"/>
134
      <property name="deleteData"          value="deleteData.tmpl"/>
135
      <property name="genericHeader"       value="genericHeader.tmpl"/>
136
      <property name="genericFooter"       value="genericFooter.tmpl"/>
137 1929 brooke
138 2343 sgarg
      <filter token="scope"                value="${scope}"/>
139
      <filter token="responseForm"         value="${responseForm}"/>
140
      <filter token="entryForm"            value="${entryForm}"/>
141
      <filter token="guide"                value="${guide}"/>
142 2781 sgarg
      <filter token="loginForm"            value="${loginForm}"/>
143 2343 sgarg
      <filter token="confirmData"          value="${confirmData}"/>
144
      <filter token="deleteData"           value="${deleteData}"/>
145
      <filter token="genericHeader"        value="${genericHeader}"/>
146
      <filter token="genericFooter"        value="${genericFooter}"/>
147
      <filter token="adminname"            value="${adminname}"/>
148
      <filter token="recipient"            value="${recipient}"/>
149 4080 daigle
   	  <filter token="metacatVersion"       value="${metacat.version}"/>
150 2343 sgarg
151 4098 daigle
      <filter token="docrooturl"           value="./" />
152
      <filter token="mcuser"               value="${mcuser}"/>
153
      <filter token="mcpassword"           value="${mcpassword}"/>
154
      <filter token="mcanotheruser"        value="${mcanotheruser}"/>
155
      <filter token="mcanotherpassword"    value="${mcanotherpassword}"/>
156
      <filter token="eml-css"              value="${eml-css}"/>
157
      <filter token="style-skins-relpath"  value="${style-skins-relpath}"/>
158 1929 brooke
      <filter token="style-common-relpath" value="${style-common-relpath}"/>
159 2343 sgarg
160 4098 daigle
      <filter token="eml-version"          value="${eml-version}"/>
161
      <filter token="eml2_0_0namespace"    value="${eml2_0_0namespace}"/>
162
      <filter token="eml2_0_1namespace"    value="${eml2_0_1namespace}"/>
163
      <filter token="eml2_1_0namespace"    value="${eml2_1_0namespace}"/>
164
      <filter token="stmmlnamespace"       value="${stmmlnamespace}"/>
165 4179 daigle
      <!-- MCD BYE filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" / -->
166
      <!-- MCD BYE filter filter token="debuglevel"           value="${debuglevel}" / -->
167
      <!-- MCD BYE filter token="defaultcontenttype"   value="${defaultcontenttype}" / -->
168 4098 daigle
      <filter token="debugprefix"          value="${debugprefix}"/>
169
      <filter token="indexPaths"           value="${indexPaths}"/>
170 1487 tao
171 4098 daigle
      <filter token="defaultStage"         value="${defaultStage}"/>
172
      <filter token="defaultHeader"        value="${defaultHeader}"/>
173
      <filter token="defaultFooter"        value="${defaultFooter}"/>
174
      <filter token="defaultChangePass"    value="${defaultChangePass}"/>
175
      <filter token="defaultResetPass"     value="${defaultResetPass}"/>
176
      <filter token="changePassSuccess"    value="${changePassSuccess}"/>
177
      <filter token="resetPassSuccess"     value="${resetPassSuccess}"/>
178
      <filter token="registerFailed"       value="${registerFailed}"/>
179
      <filter token="registerLter"         value="${registerLter}"/>
180
      <filter token="registerMatch"        value="${registerMatch}"/>
181
      <filter token="registerSuccess"      value="${registerSuccess}"/>
182
      <filter token="register"             value="${register}"/>
183
      <filter token="searchResults"        value="${searchResults}"/>
184 3174 tao
   	  <filter token="ldapMainServerFailure" value="${ldapMainServerFailure}"/>
185 4098 daigle
   	  <filter token="lter-user"            value="${lteruser}"/>
186
   	  <filter token="lter-pass"            value="${lterpassword}"/>
187
      <filter token="pisco-user"           value="${piscouser}"/>
188
      <filter token="pisco-pass"           value="${piscopassword}"/>
189 3575 tao
190 2549 tao
191 4179 daigle
   	  <!-- MCD BYE filter token="timedreplication"     value="${timedreplication}" / -->
192
   	  <!-- MCD BYE filter token="firsttimedreplication" value="${firsttimedreplication}" / -->
193
   	  <!-- MCD BYE filter token="timedreplicationinterval" value="${timedreplicationinterval}" / -->
194 2549 tao
195 4098 daigle
   	  <property name="srcdir"              value="./src" />
196
   	  <property name="lib.dir"             value="./lib" />
197
   	  <property name="docdir"              value="./docs" />
198 4240 daigle
 	  <property name="cgidir"              value="./cgi-bin" />
199 4098 daigle
      <property name="testdir"             value="./test" />
200
      <property name="testtorun"           value="BuildIndexTest" />
201
      <property name="junittestsdir"       value="./test/edu/ucsb/nceas/metacattest" />
202
      <property name="junitnettestsdir"    value="./test/edu/ucsb/nceas/metacatnettest" />
203
      <property name="build.dir"           value="./build"/>
204
      <property name="build.src"           value="${build.dir}/src"/>
205
      <property name="build.dest"          value="${build.dir}/classes"/>
206
      <property name="build.samples"       value="${build.dir}/samples"/>
207
      <property name="build.tests"         value="${build.dir}/tests"/>
208
      <property name="build.tmp"           value="${build.dir}/tmp"/>
209
      <property name="build.metacattest"   value="${build.tests}/metacattest"/>
210 1116 tao
      <property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
211 4098 daigle
      <property name="build.data"          value="${build.dir}/data"/>
212
      <property name="build.javadocs"      value="${build.dir}/docs/api"/>
213
      <property name="build.war"           value="${build.dir}/war"/>
214
      <property name="dist.dir"            value="dist"/>
215
      <property name="ver.dir"             value="${dist.dir}/${name}-${release}"/>
216
      <property name="ver.src"             value="${ver.dir}/src"/>
217
      <property name="util.dir"            value="${dist.dir}/${util-module}"/>
218 2401 costa
	  <!-- directories for creating a Harvest List Editor distribution -->
219 4098 daigle
      <property name="dist.dir.hle"        value="disthle"/>
220
      <property name="ver.dir.hle"         value="${dist.dir.hle}/harvest-list-editor-${release}"/>
221
222 2965 tao
   	  <property name="ecogrid-target-name" value="metacatImpl"/>
223
   	  <property name="ecogrid-module-dest-dir" value =".."/>
224 4098 daigle
   	  <property name="ecogrid-module"      value="seek/projects/ecogrid"/>
225
   	  <property name="ecogrid-dist-dir"    value="${dist.dir}/${ecogrid-module}"/>
226
   	  <property name="ecogrid-dir"         value="${ecogrid-module-dest-dir}/${ecogrid-module}"/>
227 806 jones
228 4098 daigle
      <property name="package.home"        value="edu/ucsb/nceas/metacat" />
229 2317 jones
      <condition property="utilities.required">
230
        <or>
231
          <not><available file="lib/httpclient.jar"/></not>
232
          <not><available file="lib/utilities.jar"/></not>
233
        </or>
234
      </condition>
235 2318 jones
      <condition property="eml.required">
236
        <or>
237
          <not><available file="lib/schema/eml-2.0.1/eml.xsd"/></not>
238
          <not><available file="lib/schema/eml-2.0.0/eml.xsd"/></not>
239 4328 daigle
          <not><available file="lib/schema/eml-2.1.0/eml.xsd"/></not>
240 2318 jones
          <not><available file="lib/dtd/eml-dataset-2.0.0beta6.dtd"/></not>
241
        </or>
242
      </condition>
243 2965 tao
244
      <condition property="ecogrid.required">
245
      	   <or>
246
             <not><available file="${ecogrid-dir}/build.properties"/></not>
247
             <not><available file="${ecogrid-dir}/buildfiles/metacatImpl.xml"/></not>
248
           </or>
249
      </condition>
250 2599 jones
251 113 jones
   </target>
252 1311 berkley
253 348 jones
   <target name="prepare" depends="init">
254
      <mkdir dir="${build.dir}"/>
255
      <mkdir dir="${build.src}"/>
256
      <mkdir dir="${build.dest}"/>
257 516 jones
      <mkdir dir="${build.javadocs}"/>
258 1778 tao
      <mkdir dir="${build.tmp}"/>
259 348 jones
260 822 jones
      <copy todir="${build.src}" filtering="yes">
261
        <fileset dir="${srcdir}">
262
          <include name="edu/**"/>
263
          <include name="com/**"/>
264 3194 berkley
          <include name="org/**"/>
265 877 jones
          <include name="**/*.sql"/>
266 822 jones
          <exclude name="**/CVS*"/>
267
          <exclude name="**/.#*"/>
268
        </fileset>
269
      </copy>
270 2344 sgarg
      <available file="lib/style/common/emlb6toeml2" type="dir"
271 1954 jones
                 property="styles.not.needed"/>
272 348 jones
   </target>
273
274 1939 brooke
   <target name="compile" depends="prepare,utilities"
275 1986 jones
    description="Compiles java code to build dir, and copies metacat props files there">
276 1939 brooke
277 1311 berkley
       <javac srcdir="${build.src}"
278
              destdir="${build.dest}"
279 1827 jones
              debug="${debug}"
280 3994 berkley
              excludes="**/*.sql **/stringclient/** **/client/*.java **/harvesterClient/*.java">
281 2599 jones
        <classpath>
282
          <path refid="compile.classpath"/>
283
        </classpath>
284
      </javac>
285 1311 berkley
   </target>
286 113 jones
287 2322 jones
   <target name="jar" depends="compile,geteml"
288 1939 brooke
    description="Compiles and jars metacat java code to metacat.jar in build dir">
289
290 353 jones
       <delete file="${build.dir}/${name}.jar" />
291 635 jones
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
292 2135 costa
            excludes="**/protocols/ **/harvesterClient/" />
293 1311 berkley
   </target>
294
295 1939 brooke
   <target name="protocol" depends="compile"
296
    description="Compiles and jars protocol java code to protocol.jar in build dir">
297 635 jones
       <delete file="${build.dir}/protocol.jar" />
298
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
299
            includes="**/protocols/" />
300 1311 berkley
   </target>
301 113 jones
302 2317 jones
   <target name="utilities" depends="config" if="utilities.required">
303 1796 jones
     <ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
304
     <ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
305 1780 jones
     <copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
306
     <copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
307
   </target>
308
309 2461 sgarg
   <target name="getutilities" depends="prepare"
310
   description="Checks utility out of cvs and copies it to your metacat cvs sandbox">
311
     <echo>Enter CVS password: </echo>
312
     <cvs cvsRoot="${cvsroot}"
313 2468 sgarg
          package="${util-module}"
314 2461 sgarg
          dest="${build.tmp}" />
315
   </target>
316
317 1939 brooke
   <target name="client" depends="utilities, prepare"
318
    description="Compiles metacat-client java code to build dir">
319 1780 jones
       <javac srcdir="${build.src}"
320
              destdir="${build.dest}"
321 2599 jones
              includes="edu/ucsb/nceas/metacat/client/*">
322
          <classpath>
323
            <path refid="compile.classpath"/>
324
          </classpath>
325
        </javac>
326 1780 jones
   </target>
327
328 1939 brooke
   <target name="clientjar" depends="client"
329
    description="Compiles and jars metacat-client java code to metacat-client.jar in build dir">
330 1780 jones
       <delete file="${build.dir}/${name}-client.jar" />
331
       <jar jarfile="${build.dir}/${name}-client.jar" basedir="${build.dest}"
332
            includes="**/metacat/client/" />
333
   </target>
334
335 2748 costa
    <target name="advancedsearchjar" depends="compile"
336
            description="Compiles and jars advanced search Java code to advancedsearch.jar in build dir">
337
        <delete file="${build.dir}/advancedsearch.jar" />
338
        <jar jarfile="${build.dir}/advancedsearch.jar" basedir="${build.dest}"
339
             includes="**/metacat/advancedsearch/" />
340
    </target>
341
342 2059 costa
   <target name="harvester" depends="client"
343 1950 costa
           description="Compiles harvester java code to build dir">
344
       <javac srcdir="${build.src}"
345
              destdir="${build.dest}"
346 2599 jones
              includes="edu/ucsb/nceas/metacat/harvesterClient/*">
347
          <classpath>
348
            <path refid="compile.classpath"/>
349
          </classpath>
350
        </javac>
351 1950 costa
   </target>
352
353
   <target name="harvesterjar" depends="harvester"
354 2059 costa
           description="Compiles and jars harvester java code to harvester.jar in build dir">
355
       <delete file="${build.dir}/harvester.jar" />
356
       <jar jarfile="${build.dir}/harvester.jar" basedir="${build.dest}"
357 1950 costa
            includes="**/metacat/harvesterClient/" />
358
   </target>
359
360 2369 costa
   <target name="harvestListEditorDist" depends="harvesterjar"
361
           description="Prepares a distribution of the Harvest List Editor tool">
362 2401 costa
       <mkdir dir="${dist.dir.hle}"/>
363
       <delete dir="${ver.dir.hle}" />
364
       <mkdir dir="${ver.dir.hle}"/>
365
       <copy todir="${ver.dir.hle}" file="${build.dir}/harvester.jar"/>
366
       <copy todir="${ver.dir.hle}" file="lib/xercesImpl.jar"/>
367
       <copy todir="${ver.dir.hle}" file="lib/harvester/harvestList.xsd"/>
368
       <copy todir="${ver.dir.hle}" file="lib/harvester/harvestListEditor.bat"/>
369
       <copy todir="${ver.dir.hle}" file="lib/harvester/harvestListEditor.sh"/>
370
       <delete file="./harvest-list-editor-${release}.zip"/>
371
       <zip zipfile="./harvest-list-editor-${release}.zip" basedir="${ver.dir.hle}" />
372
       <delete file="./harvest-list-editor-${release}.tar.gz" />
373
       <tar tarfile="./harvest-list-editor-${release}.tar" basedir="${ver.dir.hle}" />
374
       <gzip zipfile="./harvest-list-editor-${release}.tar.gz"
375
             src="./harvest-list-editor-${release}.tar"/>
376
       <delete file="./harvest-list-editor-${release}.tar" />
377 2369 costa
   </target>
378
379 4240 daigle
   <target  name="geteml" depends="getemlpre2,geteml2+,getConversionXSL" if="eml.required"
380 1939 brooke
            description="Calls getemlpre2 and geteml2+ targets" />
381
382 2318 jones
   <target name="getemlpre2" depends="prepare" if="eml.required"
383 1939 brooke
   description="Checks EML-beta6 out of cvs and copies dtds and xsl to your metacat cvs sandbox">
384 1612 tao
     <echo>Enter CVS password: </echo>
385
     <cvs cvsRoot="${cvsroot}"
386
          package="${eml-module}"
387
          tag="${eml-tag}"
388 1939 brooke
          dest="${build.tmp}/eml_${eml-tag}" />
389 1612 tao
     <mkdir dir="lib/dtd" />
390
     <copy todir="lib/dtd" filtering="yes">
391 1939 brooke
       <fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}">
392 1612 tao
         <include name="*.dtd"/>
393
       </fileset>
394
       <mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
395
     </copy>
396 2228 sgarg
397
     <copy todir="${style-common-cvsrelpath}" filtering="yes">
398
       <fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}/style">
399
       <include name="**/*.xsl"/>
400
     </fileset>
401
     </copy>
402 1939 brooke
   </target>
403
404 2318 jones
   <target name="geteml2+" depends="prepare" if="eml.required"
405 1939 brooke
   description="Checks eml-2 out of cvs and copies schema and xsl to your metacat cvs sandbox">
406
     <echo>Enter CVS password: </echo>
407 1612 tao
     <cvs cvsRoot="${cvsroot}"
408
          package="${eml-module}"
409 2228 sgarg
          tag="${eml2_0_0-tag}"
410
          dest="${build.tmp}/eml_${eml2_0_0-tag}" />
411
     <mkdir dir="lib/schema/eml-2.0.0" />
412
     <copy todir="lib/schema/eml-2.0.0" filtering="yes">
413
       <fileset dir="${build.tmp}/eml_${eml2_0_0-tag}/${eml-module}">
414 1612 tao
         <include name="*.xsd"/>
415
       </fileset>
416 2175 tao
417 1939 brooke
       <!-- shouldn't we have a mapper here like this??
418
       <mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" />
419 2175 tao
420
       Jing's code didn't nave one - does it need to be added?
421 1939 brooke
       NOTE that eml-version is set to beta 6, so this would need changing -->
422 2175 tao
423 1612 tao
     </copy>
424 3018 sgarg
     <!-- <antcall target="copyxsl">
425 2228 sgarg
        <param name="cvs.tagname" value="${eml2_0_0-tag}" />
426
        <param name="dirname" value="eml-2.0.0" />
427 3018 sgarg
     </antcall> -->
428 3807 tao
429
   	<!-- Checkout eml201 for given schema tag-->
430 2228 sgarg
     <echo>Enter CVS password: </echo>
431
     <cvs cvsRoot="${cvsroot}"
432
          package="${eml-module}"
433 3807 tao
          tag="${eml2_0_1-schema-tag}"
434
          dest="${build.tmp}/eml_${eml2_0_1-schema-tag}" />
435 2228 sgarg
     <mkdir dir="lib/schema/eml-2.0.1" />
436
     <copy todir="lib/schema/eml-2.0.1" filtering="yes">
437 3807 tao
       <fileset dir="${build.tmp}/eml_${eml2_0_1-schema-tag}/${eml-module}">
438 2228 sgarg
         <include name="*.xsd"/>
439
       </fileset>
440
     </copy>
441 3807 tao
442
   	<!-- Checkout eml201 again for given style sheet tag-->
443
   	<echo>Enter CVS password: </echo>
444
   	     <cvs cvsRoot="${cvsroot}"
445
   	          package="${eml-module}"
446
   	          tag="${eml2_0_1-style-tag}"
447
   	          dest="${build.tmp}/eml_${eml2_0_1-style-tag}" />
448 2228 sgarg
     <antcall target="copyxsl">
449 3807 tao
        <param name="cvs.tagname" value="${eml2_0_1-style-tag}" />
450 2228 sgarg
        <param name="dirname" value="eml-2.0.1" />
451
     </antcall>
452 4328 daigle
453
   	<!-- Checkout eml210 for given schema tag-->
454
     <echo>Enter CVS password: </echo>
455
     <cvs cvsRoot="${cvsroot}"
456
          package="${eml-module}"
457
          tag="${eml2_1_0-schema-tag}"
458
          dest="${build.tmp}/eml_${eml2_1_0-schema-tag}" />
459
     <mkdir dir="lib/schema/eml-2.1.0" />
460
     <copy todir="lib/schema/eml-2.1.0" filtering="yes">
461
       <fileset dir="${build.tmp}/eml_${eml2_1_0-schema-tag}/${eml-module}">
462
         <include name="*.xsd"/>
463
       </fileset>
464
     </copy>
465
466
   	<!-- Checkout eml210 for given style sheet tag-->
467
   	<echo>Enter CVS password: </echo>
468
   	     <cvs cvsRoot="${cvsroot}"
469
   	          package="${eml-module}"
470
   	          tag="${eml2_1_0-style-tag}"
471
   	          dest="${build.tmp}/eml_${eml2_1_0-style-tag}" />
472
     <antcall target="copyxsl">
473
        <param name="cvs.tagname" value="${eml2_1_0-style-tag}" />
474
        <param name="dirname" value="eml-2.1.0" />
475
     </antcall>
476 1939 brooke
   </target>
477
478 2175 tao
   <target  name="copyxsl"
479 1939 brooke
   description="Copies xsl stylesheets from checkout in build/tmp to your metacat cvs sandbox">
480 4080 daigle
481 1939 brooke
     <delete file="${style-common-cvsrelpath}/${eml-css}"/>
482 2175 tao
483 2228 sgarg
     <copy todir="${style-common-cvsrelpath}/${dirname}" filtering="yes">
484
       <fileset dir="${build.tmp}/eml_${cvs.tagname}/${eml-module}/style/eml">
485 1929 brooke
       <include name="**/*.xsl"/>
486 1612 tao
     </fileset>
487
     </copy>
488 1939 brooke
489 2175 tao
490
     <!-- now copy default css from eml module and put it in style-common-path
491 1933 brooke
          dir with a new name, so other skin-specific css can import it if reqd -->
492 1939 brooke
     <copy file="${build.tmp}/eml_${cvs.tagname}/${eml-module}/${eml-module.default.css}"
493 1938 brooke
           tofile="${style-common-cvsrelpath}/${eml-css}" />
494 1612 tao
495 1463 tao
   </target>
496 3335 tao
497 3817 tao
   <target name="correctEML201Docs" depends="jar"
498
		            description="Uses the ant  task to run a JAVA patch class to correct invalide eml201 documents which were generated by wrong schema">
499
	   	<copy todir="${build.dir}" file="lib/metacat.properties" filtering="yes"/>
500
	   	 <java classname="edu.ucsb.nceas.metacat.EML201DocumentCorrector" >
501
		         <classpath>
502
		          <path refid="compile.classpath"/>
503
		          <fileset dir="${build.dir}">
504
		            <include name="${name}.jar"/>
505
		          </fileset>
506
		        </classpath>
507
		      </java>
508
   </target>
509 2353 sgarg
510 3072 perry
   <target name="install-spatial" depends="jar,clientjar,harvesterjar"
511 3034 perry
           description="Installs spatial option for metacat">
512
513
      <property name="spatial.dir" value="./lib/spatial"/>
514
      <property name="spatial.geoserver.dir" value="${spatial.dir}/geoserver"/>
515
      <property name="spatial.webinf-mods" value="${spatial.dir}/WEB-INF"/>
516
517
      <!-- Copy geoserver libs into ${war.lib} -->
518
      <copy todir="${war.lib}" filtering="no">
519
        <fileset dir="${spatial.geoserver.dir}/WEB-INF/lib">
520
          <include name="**"/>
521
        </fileset>
522
      </copy>
523
524
      <!-- Copy everything in geoservers WEB-INF (except the libs) into ${war.webinf} -->
525
      <copy todir="${war.webinf}" filtering="no">
526
        <fileset dir="${spatial.geoserver.dir}/WEB-INF">
527
          <exclude name="lib/**"/>
528
          <exclude name="web.xml"/>
529
        </fileset>
530
      </copy>
531
532
      <!-- Copy the rest of the geoserver codebase into ${war.context} -->
533
      <copy todir="${war.context}" filtering="no">
534
        <fileset dir="${spatial.geoserver.dir}">
535
          <exclude name="WEB-INF/**"/>
536
          <exclude name="index.jsp"/>
537
        </fileset>
538
      </copy>
539
540
      <!-- Copy the geoserver index.jsp but rename it to avoid conflicting w/metcat   -->
541
     <copy file="${spatial.geoserver.dir}/WEB-INF/pages/index.jsp"
542
          tofile="${war.context}/geoserver.jsp"
543
          overwrite="true"
544
          filtering="no"/>
545
546
      <!-- Copy the rest of the modified geoserver web-inf files
547
      <copy todir="${war.webinf}" filtering="no">
548
        <fileset dir="${spatial.webinf-mods}">
549
          <exclude name="web.xml.combined"/>
550
        </fileset>
551
      </copy> -->
552
553
    </target>
554
555 4080 daigle
   <target name="dev-install" depends="clean, install-ecogrid" description="* Full Install For Development *">
556
     <copy file="${dist.dir}/${metacat.context}.war" todir="${dev.deploy.dir}"/>
557
   	 <delete dir="${dev.deploy.dir}/${metacat.context}" />
558
   	   <tstamp>
559
   	   	 <format property="NOW" pattern="MM/dd/yyyy hh:mm:ss aa"/>
560
   	   </tstamp>
561
   	 <echo>Dev install completed at ${NOW}</echo>
562
   </target>
563 3034 perry
564 4080 daigle
<!--
565 2957 tao
   <target name="install" depends="install-ecogrid" description="* Full Install *">
566 1079 tao
       <mkdir dir="${datafilepath}" />
567 1455 tao
       <mkdir dir="${inlinedatafilepath}" />
568 1079 tao
       <chmod dir="${datafilepath}" perm="ug+w" />
569 1929 brooke
       <mkdir dir="${temp-dir}"/>
570
       <chmod dir="${temp-dir}" perm="ug+w" />
571 2737 jones
       <copy file="${dist.dir}/${metacat.context}.war" todir="${deploy.dir}"/>
572 2993 tao
   	   <echo>If you enable ecogrid installation, please run "ant deploy-ecogrid" when installation or upgrade is done</echo>
573 1952 jones
   </target>
574 4080 daigle
-->
575 2957 tao
576 2965 tao
   <target name="install-ecogrid" depends="war, get-ecogrid" if="enable.ecogrid"
577 2957 tao
			    description="Install Ecogrid Compentent">
578 2991 berkley
   	  <ant antfile="build.xml" dir="${ecogrid-dir}" target ="clean" inheritall="false">
579 2977 tao
   	         <property name="context" value="${metacat.context}"/>
580
   	   	     <property name="target" value="${ecogrid-target-name}"/>
581 4405 daigle
   	   	     <!-- property name="metacat.dir" value="."/ -->
582 2977 tao
   	  </ant>
583 2991 berkley
   	  <ant antfile="build.xml" dir="${ecogrid-dir}" target ="war" inheritall="false">
584 2957 tao
   	     <property name="context" value="${metacat.context}"/>
585
   	     <property name="target" value="${ecogrid-target-name}"/>
586 4405 daigle
   	     <!-- property name="metacat.dir" value="."/ -->
587 2957 tao
   	  </ant>
588 2978 tao
   	  <war destfile="${ecogrid-dir}/build/${metacat.context}.war" update="true">
589
  	      <webinf dir="${ecogrid-dir}/lib">
590
   	        <include name="server-config.wsdd"/>
591
   	      </webinf>
592
   	  </war>
593 2965 tao
   	  <copy file="${ecogrid-dir}/build/${metacat.context}.war" todir="${dist.dir}" overwrite="true"/>
594 2978 tao
595
596 2957 tao
   </target>
597 2965 tao
598
   <target name="get-ecogrid" depends="init" if="ecogrid.required" description="Check out ecogrid module">
599
	<echo>Enter CVS password: </echo>
600
	     <cvs cvsRoot="${cvsroot}"
601
	          package="${ecogrid-module}" dest="${ecogrid-module-dest-dir}"/>
602 4098 daigle
   </target>
603 2965 tao
604 2978 tao
   <target name="deploy-ecogrid" depends="clean-ecogrid-server-config-wsdd" if="enable.ecogrid" description="Automately generate wsdd for ecogrid service">
605 2991 berkley
   	 <ant antfile="build.xml" dir="${ecogrid-dir}" target ="deploy" inheritall="false">
606 2957 tao
   	   	 <property name="context" value="${metacat.context}"/>
607
   	   	 <property name="target" value="${ecogrid-target-name}"/>
608 4405 daigle
   	     <property name="metacat.dir" value="."/>
609 3467 tao
   	     <property name="hostname" value="localhost"/>
610 2977 tao
   	     <property name="port" value="${config.port}"/>
611 2957 tao
   	 </ant>
612
   </target>
613 2978 tao
614
   <target name="clean-ecogrid-server-config-wsdd" depends="init" description="Automately generate wsdd for ecogrid service">
615 4080 daigle
      <delete file="${dev.deploy.dir}/${metacat.context}/WEB-INF/server-config.wsdd"/>
616 2978 tao
   </target>
617 1952 jones
618 4240 daigle
   <!-- target name="install-registry" depends="init,getConversionXSL"
619 1952 jones
            description="Install Registry">
620 2175 tao
621 4080 daigle
      <mkdir dir="${inst.cgi.dir}" />
622 1952 jones
      <copy file="${srcdir}/perl/register-dataset.cgi"
623 4080 daigle
            todir="${inst.cgi.dir}"/>
624 1952 jones
      <chmod file="${inst.cgi.dir}/register-dataset.cgi" perm="ugo+x" />
625 2175 tao
626 4240 daigle
      <! - - TODO SCW: set the permissions on this folder to be writable by the apache user - - >
627 1952 jones
      <mkdir dir="${temp-dir}" />
628 4240 daigle
      <! - - TODO SCW: use relative paths to grab these instead of copying to tmp,
629
                     used in readDocumentFromMetacat - - >
630 2343 sgarg
      <copy todir="${temp-dir}" filtering="yes">
631
       <fileset dir="lib/style/common/emlb6toeml2">
632 1952 jones
         <include name="*.xsl"/>
633
         <include name="*.xml"/>
634
       </fileset>
635 2343 sgarg
      </copy>
636 1952 jones
637
      <echo message="Install Registry completed." />
638 4240 daigle
   </target -->
639 1952 jones
640 4240 daigle
   <!-- target name="install-ldap" depends="init"
641 4080 daigle
            description="Install Metacat LDAP Access">
642
643
      <mkdir dir="${inst.cgi.dir}" />
644 2343 sgarg
      <copy file="${srcdir}/perl/ldapweb.cgi"
645 4080 daigle
            todir="${inst.cgi.dir}" />
646 2343 sgarg
      <chmod file="${inst.cgi.dir}/ldapweb.cgi" perm="ugo+x" />
647
      <mkdir dir="${templates.dir}" />
648 4080 daigle
      <copy todir="${templates.dir}">
649 2343 sgarg
        <fileset dir="lib/style/common/templates">
650 4240 daigle
			< ! - - SCW: Copy all files - - >
651 2343 sgarg
        </fileset>
652
      </copy>
653
      <echo message="ldapweb install complete." />
654 4240 daigle
   </target -->
655 2343 sgarg
656
657 2175 tao
   <target name="install-skin" depends="init"
658 2052 sgarg
            description="Install a Skin">
659
660 3994 berkley
      <input message="Please enter name of the skin"
661
             addproperty="skin-name"/>
662 2052 sgarg
663
      <mkdir dir="${installdir}/style/skins/${skin-name}" />
664
      <copy todir="${installdir}/style/skins/${skin-name}" filtering="yes">
665
       <fileset dir="lib/style/skins/${skin-name}">
666 3014 costa
           <exclude name="**/*.png"/>
667
           <exclude name="**/*.gif"/>
668
           <exclude name="**/*.jpg"/>
669 2277 jones
           <exclude name="**/CVS*"/>
670
           <exclude name="**/.#*"/>
671 2052 sgarg
       </fileset>
672
      </copy>
673 2054 sgarg
     <copy todir="${installdir}/style/skins/${skin-name}" filtering="no">
674
       <fileset dir="lib/style/skins/${skin-name}">
675 3014 costa
           <include name="**/*.png"/>
676 3994 berkley
           <include name="**/*.gif"/>
677 3014 costa
           <include name="**/*.jpg"/>
678 2277 jones
           <exclude name="**/CVS*"/>
679
           <exclude name="**/.#*"/>
680 2054 sgarg
       </fileset>
681
      </copy>
682 2974 jones
      <copy todir="${installdir}/style/common" filtering="yes">
683
       <fileset dir="lib/style/common">
684
           <include name="*.js"/>
685
           <include name="*.jsp"/>
686
           <include name="*.css"/>
687
           <exclude name="*.png"/>
688
           <exclude name="*.gif"/>
689
           <exclude name="*.jpg"/>
690
           <exclude name="**/CVS*"/>
691
           <exclude name="**/.#*"/>
692
       </fileset>
693
      </copy>
694 2277 jones
      <!--
695 2210 jones
      <mkdir dir="${installdir}/style/skins/${skin-name}/images" />
696
     <copy todir="${installdir}/style/skins/${skin-name}/images" filtering="no">
697
       <fileset dir="lib/style/skins/${skin-name}/images">
698
           <include name="*.png"/>
699
           <include name="*.gif"/>
700
           <include name="*.jpg"/>
701
       </fileset>
702
      </copy>
703 2277 jones
      -->
704 2052 sgarg
705
      <echo message="Install Skin completed." />
706
   </target>
707
708 4098 daigle
   <target name="war" depends="warPrepare,install-spatial"
709 1952 jones
            description="Create a web archive (WAR) for servlet deployment">
710 2737 jones
       <mkdir dir="${dist.dir}" />
711
       <war destfile="${dist.dir}/${metacat.context}.war"
712 1952 jones
            webxml="${build.war}/web.xml">
713
         <fileset dir="${war.context}"/>
714
         <lib dir="${war.lib}"/>
715
         <webinf dir="${war.webinf}"/>
716
       </war>
717
   </target>
718 2957 tao
719 4435 daigle
   <target name="warPrepare" depends="cgiPrepare,jar,clientjar,harvesterjar,testPrepare"
720 1952 jones
            description="Prepare files for creating a web archive (WAR)">
721
722
       <property name="war.lib" value="${build.war}/lib" />
723
       <property name="war.webinf" value="${build.war}/WEB-INF" />
724 2737 jones
       <property name="war.context" value="${build.war}/${metacat.context}" />
725 4098 daigle
   	   <property name="war.webinf.sql" value="${war.webinf}/sql" />
726 4369 daigle
	   <property name="war.context.cgi" value="${war.context}/cgi-bin" />
727 4080 daigle
   	   <property name="war.context.docs" value="${war.context}/docs" />
728 4240 daigle
   	   <property name="war.context.temp" value="${war.context}/temp" />
729
   	   <property name="war.context.templates" value="${war.context}${style-common-relpath}/templates" />
730 1952 jones
       <mkdir dir="${war.lib}" />
731
       <mkdir dir="${war.webinf}" />
732
       <mkdir dir="${war.context}" />
733 4098 daigle
   	   <mkdir dir="${war.webinf.sql}" />
734 4369 daigle
	   <mkdir dir="${war.context.cgi}" />
735 4080 daigle
   	   <mkdir dir="${war.context.docs}" />
736 4240 daigle
   	   <mkdir dir="${war.context.temp}" />
737
       <mkdir dir="${war.context.templates}" />
738 2610 tao
739 4098 daigle
	   <!--copy file="${lib.dir}/${jdbc.lib.postgres}" todir="${war.lib}" / -->
740
       <!--copy file="${lib.dir}/${jdbc.lib.sqlserver1}" todir="${war.lib}" / -->
741
       <!--copy file="${lib.dir}/${jdbc.lib.sqlserver2}" todir="${war.lib}" / -->
742
       <!--copy file="${lib.dir}/${jdbc.lib.sqlserver3}" todir="${war.lib}" / -->
743 1952 jones
       <copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
744
       <copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
745 2059 costa
       <copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
746 1952 jones
       <copy todir="${war.lib}" filtering="no">
747 1823 jones
         <fileset dir="lib">
748 4098 daigle
<!--
749
         	<not>
750 2610 tao
               <filename name="${jdbc-jar-name}"/>
751
            </not>
752 4098 daigle
-->
753 2610 tao
            <include name="*.jar"/>
754 1823 jones
         </fileset>
755 3059 berkley
         <fileset dir="lib">
756
           <include name="xalan.jar"/>
757 3194 berkley
           <include name="gwt*.jar"/>
758 1823 jones
         </fileset>
759
       </copy>
760 4080 daigle
       <!-- MCD copy file="lib/web.xml.${tomcatversion}"
761
             tofile="${build.war}/web.xml" / -->
762
       <!-- MCD added next - Remove the tomcat5 reference-->
763
   	   <copy file="lib/web.xml.tomcat5"
764
   	             tofile="${build.war}/web.xml"/>
765 1952 jones
       <copy file="lib/metacat.properties" todir="${war.webinf}"
766 1951 jones
             filtering="yes" />
767 4080 daigle
   	   <copy file="lib/metacat.properties.metadata.xml" todir="${war.webinf}"
768 3099 jones
   	             filtering="no" />
769 4080 daigle
	   <copy file="lib/org.properties.metadata.xml" todir="${war.webinf}"
770
	             filtering="no" />
771 4162 daigle
	   <copy file="lib/ldap.properties.metadata.xml" todir="${war.webinf}"
772
	             filtering="no" />
773 2900 sgarg
       <copy todir="${war.webinf}" filtering="yes">
774
	   	  <fileset dir="lib">
775
           <include name="skin.configs/**"/>
776
		  </fileset>
777
	   </copy>
778 2583 sgarg
       <copy file="lib/log4j.properties" todir="${war.webinf}"
779
             filtering="yes" />
780 1952 jones
       <copy todir="${war.context}" filtering="no">
781 822 jones
         <fileset dir="lib">
782
           <include name="**/*.jpg"/>
783
           <include name="**/*.png"/>
784
           <include name="**/*.gif"/>
785 2844 costa
           <include name="LiveMap_30/**"/>
786 822 jones
         </fileset>
787
       </copy>
788 1952 jones
       <copy todir="${war.context}" filtering="yes">
789 822 jones
         <fileset dir="lib">
790
           <exclude name="*.jar"/>
791
           <exclude name="*.properties"/>
792 4080 daigle
         	<exclude name="*.metadata.xml"/>
793 822 jones
           <exclude name="web.xml"/>
794 1437 berkley
           <exclude name="**/*.jpg"/>
795
           <exclude name="**/*.png"/>
796
           <exclude name="**/*.gif"/>
797 2778 jones
           <exclude name="lsid_lib/**"/>
798
           <exclude name="lsid_conf/**"/>
799 2844 costa
           <exclude name="LiveMap_30/**"/>
800 2900 sgarg
           <exclude name="skin.configs/**"/>
801 3034 perry
           <exclude name="spatial/geoserver/**"/>
802
           <exclude name="spatial/WEB-INF/**"/>
803 822 jones
         </fileset>
804
       </copy>
805 4193 daigle
       <copy todir="${war.context.docs}" filtering="yes">
806
          <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
807
       </copy>
808
       <copy todir="${war.context.docs}" filtering="no">
809
          <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
810
       </copy>
811 4098 daigle
	   <copy todir="${war.webinf.sql}" filtering="yes">
812 4080 daigle
	         <fileset dir="src">
813
	           <include name="**/*.sql"/>
814
	         </fileset>
815
	   </copy>
816 4369 daigle
817
   	   <copy file="src/perl/register-dataset.cgi" todir="${war.context.cgi}"/>
818
	   <copy file="src/perl/ldapweb.cgi" todir="${war.context.cgi}" />
819
	   <copy file="src/perl/Metacat/blib/lib/Metacat.pm" todir="${war.lib}" />
820
821
	   <!-- registry cgi section -->
822
	   <!-- TODO SCW: use relative paths to grab these instead of copying to tmp,
823 4240 daigle
                   used in readDocumentFromMetacat -->
824 4369 daigle
	   <!-- TODO MCD copy temp files to actual location using config util?? -->
825
	   <copy todir="${war.context.temp}" filtering="yes">
826
		  <fileset dir="lib/style/common/emlb6toeml2">
827
 		    <include name="*.xsl"/>
828
			<include name="*.xml"/>
829
		  </fileset>
830
	    </copy>
831
	    <available file="lib/style/common/emlb6toeml2" type="dir"
832
                 property="styles.not.needed"/>
833
834
	    <!-- ldap cgi section -->
835
	    <copy todir="${war.context.templates}">
836
		    <fileset dir="lib/style/common/templates">
837
			    <!-- SCW: Copy all files -->
838
		    </fileset>
839
	    </copy>
840
    </target>
841
842
	<target name="cgiPrepare">
843
		<exec dir="src/perl/Metacat/" command="perl" >
844
			<arg value="Makefile.PL" />
845
		</exec>
846
		<exec dir="src/perl/Metacat/" command="make" />
847
	</target>
848 4435 daigle
849
	<target name="testPrepare" if="enable.testBuild"
850
		description="Copies test files into the war directories">
851
		<echo>in testPrepare</echo>
852
		<property name="war.context.test" value="${build.war}/${metacat.context}/test" />
853
		<mkdir dir="${war.context.test}" />
854
	    <copy todir="${war.context.test}" filtering="yes">
855
		   <fileset dir="test/servertestfiles">
856
	          <include name="*/**"/>
857
		   </fileset>
858
		</copy>
859
	</target>
860 1929 brooke
861 2175 tao
   <target name="getConversionXSL" depends="prepare"
862 1954 jones
            unless="styles.not.needed"
863 1939 brooke
            description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
864 2497 sgarg
865 1929 brooke
     <echo>Enter CVS password: </echo>
866 2497 sgarg
     <cvs cvsRoot="${cvsroot}"
867
          package="${eml-module}"
868 3909 tao
          tag="${eml2_0_1-style-tag}"
869
          dest="${build.tmp}/eml_${eml2_0_1-style-tag}" />
870 2343 sgarg
871
     <mkdir dir="lib/style/common/emlb6toeml2" />
872
      <copy todir="lib/style/common/emlb6toeml2" filtering="yes">
873 3909 tao
       <fileset dir="${build.tmp}/eml_${eml2_0_1-style-tag}/${eml-module}/lib/beta6toeml2/xsl">
874 2343 sgarg
         <include name="*.xsl"/>
875
         <include name="*.xml"/>
876
       </fileset>
877
      </copy>
878 1929 brooke
   </target>
879
880 2135 costa
   <target name="testprep" depends="jar,clientjar,harvesterjar">
881 1783 jones
      <mkdir dir="${build.tests}"/>
882
      <copy todir="${build.tests}" filtering="yes">
883
        <fileset dir="${testdir}">
884
          <include name="edu/**"/>
885
        </fileset>
886
      </copy>
887 4382 daigle
   	  <copy todir="${build.tests}" file="${testdir}/test.properties" filtering="yes"/>
888 4121 daigle
889 971 tao
      <!-- copy and compile the tests into a jar file -->
890 1783 jones
      <javac srcdir="${build.tests}"
891
             destdir="${build.tests}"
892 1612 tao
             debug="on"
893 2982 jones
             includes="**/*.java">
894 2599 jones
        <classpath>
895
          <path refid="compile.classpath"/>
896
          <fileset dir="${build.dir}">
897 2982 jones
            <include name="${name}.jar"/>
898
            <include name="${name}-client.jar"/>
899
            <include name="harvester.jar"/>
900 2599 jones
          </fileset>
901
        </classpath>
902
      </javac>
903 204 jones
904 1311 berkley
      <jar jarfile="${build.dir}/${name}-junittests.jar"
905 1783 jones
        basedir="${build.tests}"
906 1311 berkley
                includes="**/*.class" />
907 1822 jones
   </target>
908 971 tao
909 1939 brooke
   <target name="test" depends="testprep"
910
            description="Uses the ant junit task to run all JUnit tests">
911 1822 jones
912 971 tao
      <!-- use the ant "junit" task to run JUnit tests. -->
913 1783 jones
      <junit printsummary="yes" haltonfailure="no" fork="yes"
914 971 tao
             haltonerror="no">
915 1783 jones
        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
916 971 tao
        <classpath>
917 2599 jones
          <path refid="compile.classpath"/>
918
          <fileset dir="${build.dir}">
919 2982 jones
            <include name="${name}.jar"/>
920
            <include name="${name}-client.jar"/>
921
            <include name="harvester.jar"/>
922
            <include name="${name}-junittests.jar"/>
923 2599 jones
          </fileset>
924 971 tao
        </classpath>
925
926
        <formatter type="plain" />
927
928
        <batchtest fork="yes" todir="${build.dir}">
929 1783 jones
          <fileset dir="${build.tests}">
930 4304 daigle
            <include name="**/*.class"/>
931 4147 daigle
          	<exclude name="**/MCTestCase.class" />
932 4304 daigle
          	<exclude name="**/ClientViewHelperTest.class" />
933 971 tao
          </fileset>
934
        </batchtest>
935
     </junit>
936
   </target>
937 1103 tao
938 1939 brooke
    <target name="runonetest" depends="testprep"
939
            description="Uses the ant junit task to run a single JUnit test, defined by the ${testtorun} property">
940 1500 tao
941 1939 brooke
              <echo>testtorun: ${testtorun}</echo>
942
943 1500 tao
      <!-- use the ant "junit" task to run JUnit tests. -->
944 1783 jones
      <junit printsummary="yes" haltonfailure="no" fork="yes"
945 3747 tao
             haltonerror="no" showoutput="yes">
946 2044 tao
        <!--<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>-->
947 1500 tao
        <classpath>
948 2599 jones
          <path refid="compile.classpath"/>
949
          <fileset dir="${build.dir}">
950 2982 jones
            <include name="${name}.jar"/>
951
            <include name="${name}-client.jar"/>
952
            <include name="harvester.jar"/>
953
            <include name="${name}-junittests.jar"/>
954 2599 jones
          </fileset>
955 1500 tao
        </classpath>
956
957
        <formatter type="plain" />
958
959
        <batchtest fork="yes" todir="${build.dir}">
960 1783 jones
          <fileset dir="${build.tests}">
961 1500 tao
            <include name="**/${testtorun}.class" />
962
          </fileset>
963
        </batchtest>
964
     </junit>
965
   </target>
966
967 2175 tao
   <target name="testharvester"
968 2135 costa
           depends="testprep"
969
           description="Uses the ant junit task to test only the Harvester code">
970 2175 tao
     <junit printsummary="yes"
971
            haltonfailure="off"
972 2135 costa
            fork="yes"
973
            haltonerror="off">
974 2599 jones
        <classpath>
975
          <path refid="compile.classpath"/>
976
          <fileset dir="${build.dir}">
977 2982 jones
            <include name="${name}.jar"/>
978
            <include name="${name}-client.jar"/>
979
            <include name="harvester.jar"/>
980
            <include name="${name}-junittests.jar"/>
981 2599 jones
          </fileset>
982
        </classpath>
983 2135 costa
       <formatter type="plain" />
984
       <batchtest fork="yes" todir="${build.dir}">
985
         <fileset dir="${build.tests}">
986
           <include name="**/harvesterClient/*.class" />
987
         </fileset>
988
       </batchtest>
989
     </junit>
990
   </target>
991
992 1939 brooke
  <target name="gethttpclient" depends="prepare"
993
            description="checks out and compiles morpho httpclient code">
994 1311 berkley
  <!--mkdir dir="${morphosourcedir}" -->
995 1487 tao
        <cvs cvsRoot="${cvsroot}"
996 1103 tao
             package="morpho"
997
             dest="." />
998 1107 tao
        <ant dir="${morphosourcedir}" inheritAll="false"  target="jar" />
999 1103 tao
   </target>
1000
1001
   <!-- run this target, we need to check out a another morpho souce dir was checked out. -->
1002 4080 daigle
   <target name="nettest" depends="dev-install"
1003 1939 brooke
            description="compiles and runs the metacatnettest code">
1004 2175 tao
1005 1103 tao
      <echo>***********************************
1006 1311 berkley
      Please run ant gethttpclient first!
1007
      ***********************************
1008 1103 tao
      </echo>
1009
      <!-- copy and compile the tests into a jar file -->
1010 1116 tao
      <mkdir dir="${build.metacatnettest}"/>
1011 1103 tao
      <javac srcdir="${junitnettestsdir}"
1012 1116 tao
             destdir="${build.metacatnettest}"
1013 2599 jones
             includes="**/*.java">
1014
        <classpath>
1015
          <path refid="compile.classpath"/>
1016
          <fileset dir="${build.dir}">
1017 2982 jones
            <include name="${name}.jar"/>
1018 2599 jones
          </fileset>
1019
        </classpath>
1020
      </javac>
1021 1103 tao
1022
      <jar jarfile="${build.dir}/${name}-junitnettests.jar"
1023 1116 tao
                    basedir="${build.metacatnettest}"
1024 1103 tao
                    includes="**/*.class" />
1025
1026
      <!-- use the ant "junit" task to run JUnit tests. -->
1027 1107 tao
      <junit printsummary="yes" haltonfailure="no" fork="yes"
1028 1103 tao
             haltonerror="no">
1029 1107 tao
        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
1030 1103 tao
        <classpath>
1031 2599 jones
          <path refid="compile.classpath"/>
1032
          <fileset dir="${build.dir}">
1033 2982 jones
            <include name="${name}.jar"/>
1034
            <include name="${name}-junitnettests.jar"/>
1035 2599 jones
          </fileset>
1036 1103 tao
        </classpath>
1037
1038
        <formatter type="plain" />
1039
1040
        <batchtest fork="yes" todir="${build.dir}">
1041 1116 tao
          <fileset dir="${build.metacatnettest}">
1042
            <include name="**/*.class" />
1043 1103 tao
          </fileset>
1044
        </batchtest>
1045
     </junit>
1046 1311 berkley
   </target>
1047 1103 tao
1048 1939 brooke
   <target name="cleanweb" depends="clean"
1049
            description="deletes tomcat web context dir and all its contents">
1050 1522 berkley
     <delete dir="${installdir}" />
1051
   </target>
1052
1053
1054 1939 brooke
   <target name="clean" depends="init"
1055 2320 jones
            description="deletes build dir and files that can be regenerated form the release">
1056 822 jones
       <delete dir="${build.dir}" />
1057 2737 jones
       <delete dir="${dist.dir}" />
1058 2320 jones
   </target>
1059
1060 4098 daigle
	<target name="localclean" depends="clean"
1061
	            description="deletes even jars that depend on external sources such as stylesheets and jars">
1062
	       <delete file="lib/httpclient.jar" />
1063
	       <delete file="lib/utilities.jar" />
1064
	</target>
1065
1066
   <target name="fullclean" depends="localclean"
1067
            description="deletes code and eml">
1068 1939 brooke
       <delete includeEmptyDirs="true" failonerror="false">
1069
         <fileset dir="${style-common-cvsrelpath}">
1070
           <include name="${eml-css}" />
1071
           <include name="eml-*/*.xsl" />
1072
           <include name="eml-*" />
1073
         </fileset>
1074 4080 daigle
       	 <fileset dir="${schema-cvsrelpath}">
1075
       	   <include name="eml-*/*.xsd" />
1076
       	 </fileset>
1077 4369 daigle
       	 <fileset dir="${ecogrid-dir}">
1078
       		<include name="build.properties" />
1079
       		<include name="buildfiles/metacatImpl.xml" />
1080
         </fileset>
1081 2320 jones
       </delete>
1082 113 jones
   </target>
1083
1084 1939 brooke
   <target name="jdoc" depends="prepare"
1085
            description="generates javadoc documentation">
1086 822 jones
       <javadoc packagenames="edu.ucsb.nceas.*"
1087 516 jones
           sourcepath="${build.src}"
1088
           destdir="${build.javadocs}"
1089 113 jones
           author="true"
1090
           version="true"
1091
           use="true"
1092 348 jones
           windowtitle="${Name} API"
1093
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
1094 2599 jones
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;">
1095
         <classpath>
1096
           <path refid="compile.classpath"/>
1097
         </classpath>
1098
       </javadoc>
1099 113 jones
   </target>
1100
1101 2461 sgarg
   <target name="dist"
1102 2965 tao
       depends="geteml,get-ecogrid,jar,protocol,jdoc,getConversionXSL,getutilities"
1103 1939 brooke
            description="prepares a full release distribution">
1104 806 jones
      <mkdir dir="${dist.dir}"/>
1105
      <delete dir="${ver.dir}" />
1106
      <mkdir dir="${ver.dir}"/>
1107
      <copy todir="${ver.dir}">
1108 1311 berkley
        <fileset dir="."
1109 2401 costa
            excludes="**/CVS* **/.#* src/** test/** build/** docs/** ${dist.dir}/** ${dist.dir.hle}/**"/>
1110 806 jones
      </copy>
1111
      <copy todir="${ver.dir}" file="build.xml"/>
1112 2317 jones
      <copy todir="${ver.dir}" file="build.properties"/>
1113 882 jones
1114
      <copy todir="${ver.dir}/docs" filtering="yes">
1115
        <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
1116
      </copy>
1117
      <copy todir="${ver.dir}/docs" filtering="no">
1118
        <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
1119
      </copy>
1120 806 jones
      <copy todir="${ver.dir}/docs/dev">
1121
        <fileset dir="${build.dir}/docs"/>
1122
      </copy>
1123 917 berkley
      <copy todir="${ver.dir}/src">
1124
        <fileset dir="${build.dir}/src"/>
1125
      </copy>
1126 2391 tao
      <!-- copy loaddtdschemal.sql form src dir(which has the server token to ver.dir/src-->
1127 4118 daigle
      <!-- copy todir="${ver.dir}/src" file="${srcdir}/loaddtdschema.sql" overwrite="yes" filtering="no"/ -->
1128
      <!-- copy todir="${ver.dir}/src" file="${srcdir}/upgrade-db-to-1.5.sql" overwrite="yes" filtering="no"/ -->
1129 2323 jones
      <!--
1130 992 berkley
      <delete dir="./${ver.dir}/${build.dir}"/>
1131
      <delete dir="./${ver.dir}/dist"/>
1132 2323 jones
      -->
1133 882 jones
      <delete file="./${name}-${release}.zip"/>
1134 1312 tao
      <zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
1135 882 jones
      <delete file="./${name}-${release}.tar.gz" />
1136 1312 tao
      <tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
1137 1311 berkley
      <gzip zipfile="./${name}-${release}.tar.gz"
1138 882 jones
                src="./${name}-${release}.tar"/>
1139
      <delete file="./${name}-${release}.tar" />
1140 1311 berkley
  </target>
1141 806 jones
1142 4372 daigle
	<target name="distbin" depends="war" description="prepares a binary distribution">
1143
		<copy todir="${dist.dir}">
1144
			<fileset dir="./bin/install"  />
1145
		</copy>
1146
		<delete file="./${name}-bin-${release}.zip" />
1147
		<zip zipfile="./${name}-bin-${release}.zip"
1148
			basedir="${dist.dir}"
1149
			excludes="metacat-*/**"/>
1150
		<delete file="./${name}-bin-${release}.tar.gz" />
1151
		<tar tarfile="./${name}-bin-${release}.tar"
1152
			basedir="${dist.dir}"
1153
			excludes="metacat-*/**"/>
1154
		<gzip zipfile="./${name}-bin-${release}.tar.gz" src="./${name}-bin-${release}.tar" />
1155
		<delete file="./${name}-bin-${release}.tar" />
1156
		<delete dir="${dist.dir}" />
1157
	</target>
1158
1159 1939 brooke
  <target name="distsrc" depends="dist"
1160
            description="prepares a source distribution">
1161 806 jones
      <mkdir dir="${ver.src}"/>
1162
      <copy todir="${ver.src}">
1163
        <fileset dir="./src"/>
1164
      </copy>
1165 2461 sgarg
      <mkdir dir="${util.dir}"/>
1166
      <copy todir="${util.dir}">
1167
        <fileset dir="${build.tmp}/utilities" excludes="**/CVS*" />
1168
      </copy>
1169 2965 tao
1170
  	  <mkdir dir="${ecogrid-dist-dir}"/>
1171
  	  <copy todir="${ecogrid-dist-dir}">
1172
  	        <fileset dir="${ecogrid-dir}" excludes="**/CVS*" />
1173
  	  </copy>
1174 806 jones
1175 3131 perry
      <delete file="${ver.dir}/lib/utilities.jar"/>
1176
1177 882 jones
      <delete file="./${name}-src-${release}.zip"/>
1178
      <zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
1179
      <delete file="./${name}-src-${release}.tar.gz" />
1180
      <tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
1181 1311 berkley
      <gzip zipfile="./${name}-src-${release}.tar.gz"
1182 882 jones
                src="./${name}-src-${release}.tar"/>
1183
      <delete file="./${name}-src-${release}.tar" />
1184 3131 perry
      <delete dir="${dist.dir}"/>
1185 1311 berkley
  </target>
1186 806 jones
1187 1702 tao
   <target name="stylesheettest">
1188 1939 brooke
     <xslt in="${input}" out="eml.html" style="${style-common-cvsrelpath}/eml-2.0.0/eml-2.0.0.xsl">
1189 1702 tao
      <param name="displaymodule" expression="${displaymodule}"/>
1190
      <param name="docid" expression="${input}"/>
1191
      <param name="entitytype" expression="${entitytype}"/>
1192
      <param name="entityindex" expression="${entityindex}"/>
1193
      <outputproperty name="method" value="html"/>
1194
      <outputproperty name="standalone" value="yes"/>
1195
      <outputproperty name="encoding" value="iso8859_1"/>
1196
      <outputproperty name="indent" value="yes"/>
1197
    </xslt>
1198
  </target>
1199 2175 tao
1200 3210 tao
1201 1814 tao
  <target name="compilewebclient" depends="prepare">
1202
     <javac srcdir="${build.src}" destdir="${build.dest}" includes="**/application/*.java" classpathref="webservicepath" />
1203
  </target>
1204 2175 tao
1205 1814 tao
  <target name="runwebclient" depends="compilewebclient">
1206 2175 tao
     <java classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
1207 1814 tao
           dir="${build.dest}" fork="yes"
1208
           classpathref="webservicepath" classpath="./lib/utilities.jar" failonerror="true">
1209
         <arg value="${serviceUrl}"/>
1210
         <arg value="${docid}"/>
1211
     </java>
1212
  </target>
1213 2598 harris
1214 2639 harris
  <target name="spatial_option" depends="prepare" description=" -- compiles code for the spatial option">
1215 2598 harris
1216
    <echo message="Compiling the metatcat shapefile creator"/>
1217
    <echo message="using the shapelib at: ${shapelib.dir}"/>
1218
    <exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
1219
     <arg line="./src/spatial/cpp/metacat_shapefile.cpp -I ${shapelib.dir} -c -o build/metacat_shapefile.o" />
1220
    </exec>
1221
1222
    <exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
1223 2639 harris
     <arg line="build/metacat_shapefile.o ${shapelib.dir}/.libs/libshp.a -o bin/metacat_shapefile" />
1224 2598 harris
    </exec>
1225
  </target>
1226
1227 2737 jones
    <!-- LSID Authority support -->
1228
    <patternset id="lsid.jars">
1229
        <include name="axis.jar" />
1230 2772 jones
        <include name="commons-discovery-0.2.jar" />
1231 2737 jones
        <include name="jaxrpc.jar" />
1232
        <include name="lsid-client-1.1.1.jar" />
1233
        <include name="lsid-server-1.1.1.jar" />
1234
        <include name="saaj.jar" />
1235 2772 jones
        <include name="wsdl4j-1.5.1.jar" />
1236 2737 jones
        <include name="activation.jar" />
1237
        <include name="castor-0.9.5.jar" />
1238
        <include name="dnsjava-1.3.2.jar" />
1239
        <include name="mail.jar" />
1240 2778 jones
        <include name="commons-logging-1.0.4.jar" />
1241
        <!-- These jars may be needed but seem to not actually be,
1242
             so leaving them out for now
1243
        <include name="axis-ant.jar" />
1244 2737 jones
        -->
1245
        <!--<include name="GenCastor.class" />-->
1246
    </patternset>
1247
    <patternset id="lib.jars">
1248
        <include name="httpclient.jar" />
1249
        <include name="log4j-1.2.12.jar" />
1250
        <include name="utilities.jar" />
1251
        <include name="xercesImpl.jar" />
1252
        <include name="xalan.jar" />
1253
        <include name="xml-apis.jar" />
1254
    </patternset>
1255
1256
    <path id="lsid.classpath">
1257
        <fileset dir="${lsid.lib.dir}">
1258
            <patternset refid="lsid.jars"/>
1259
        </fileset>
1260
        <fileset dir="${lib.dir}">
1261
            <patternset refid="lsid.jars"/>
1262
        </fileset>
1263 3059 berkley
        <fileset dir="${lib.dir}">
1264 2737 jones
            <include name="xalan.jar" />
1265
            <include name="xml-apis.jar" />
1266
        </fileset>
1267
        <fileset dir="${build.dir}">
1268
            <include name="metacat-client.jar" />
1269
        </fileset>
1270
    </path>
1271
1272
    <filterset id="configFilters">
1273 4080 daigle
        <!-- MCD BYE filter token="LSID_AUTHORITY_HOSTNAME"
1274
                value="${config.hostname}" / -->
1275
        <!-- MCD BYE filter token="LSID_AUTHORITY_PORT"
1276
                value="${config.port}" / -->
1277
        <!-- MCD BYE filter token="METADATA_LABELS"
1278
                value="${config.metadataLabelLsid}" / -->
1279
        <!-- MCD BYE filter token="METACAT_SERVER"
1280
                value="${config.metacatserver}" / -->
1281
        <!-- MCD BYE filter token="LSID_AUTHORITY_STRING"
1282
                value="${config.lsidauthority}" / -->
1283 2737 jones
    </filterset>
1284
1285
    <target name="prepare-lsid"
1286
            depends="prepare,utilities,clientjar"
1287
            description="Configure files prior to compilation">
1288
        <mkdir dir="${lsid.build.dir}" />
1289
        <!-- Copy the properties file into the build -->
1290
        <copy file="${conf.dir}/metacat-lsid.properties"
1291
              tofile="${lsid.build.dir}/WEB-INF/classes/metacat-lsid.properties"
1292
              overwrite="true">
1293
            <filterset refid="configFilters" />
1294
        </copy>
1295 2817 jones
        <copy file="${conf.dir}/log4j.properties"
1296
              tofile="${lsid.build.dir}/WEB-INF/classes/log4j.properties"
1297
              overwrite="true">
1298
            <filterset refid="configFilters" />
1299
        </copy>
1300 2737 jones
        <!-- Copy config files into the build -->
1301
        <copy todir="${lsid.build.dir}/WEB-INF">
1302
            <fileset dir="${webinf.dir}"
1303
                     includes="**/*.wsdd" />
1304
        </copy>
1305
        <!-- Copy the metadata configuration files into the build -->
1306
        <mkdir dir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}" />
1307
        <copy todir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}">
1308
            <fileset dir="${conf.dir}"
1309
                     includes="**/*.xml" />
1310
            <fileset dir="${conf.dir}"
1311
                     includes="**/*.xslt" />
1312
            <filterset refid="configFilters" />
1313
        </copy>
1314
        <!-- Copy services files into the build -->
1315
        <mkdir dir="${lsid.build.dir}/services" />
1316
        <copy todir="${lsid.build.dir}/services">
1317
            <fileset dir="${services.dir}" />
1318
            <filterset refid="configFilters" />
1319
        </copy>
1320 2778 jones
        <!-- Copy axis files into the build -->
1321
        <mkdir dir="${lsid.build.dir}" />
1322
        <copy todir="${lsid.build.dir}">
1323
            <fileset dir="${conf.dir}/axis"
1324
                     excludes="*.properties"/>
1325
        </copy>
1326
        <mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
1327
        <copy todir="${lsid.build.dir}/WEB-INF/classes">
1328
            <fileset dir="${conf.dir}/axis"
1329
                     includes="*.properties"/>
1330
        </copy>
1331 2737 jones
    </target>
1332
1333
    <target name="compile-lsid"
1334
            depends="prepare-lsid"
1335
            description="Compile Java sources">
1336
        <mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
1337
        <javac srcdir="src/edu/ucsb/nceas/metacat/lsid"
1338
               destdir="${lsid.build.dir}/WEB-INF/classes"
1339
               debug="${compile.debug}"
1340
               deprecation="${compile.deprecation}"
1341
               optimize="${compile.optimize}">
1342
            <classpath refid="lsid.classpath" />
1343
        </javac>
1344
    </target>
1345
1346
    <target name="war-lsid"
1347
            depends="compile-lsid"
1348
            description="Create a war file for the application">
1349
        <mkdir dir="${dist.dir}" />
1350
        <war destfile="${dist.dir}/${authority.context}.war"
1351
             webxml="${webinf.dir}/web.xml">
1352
            <fileset dir="${lsid.build.dir}" />
1353
            <lib dir="${lsid.lib.dir}">
1354
                <patternset refid="lsid.jars"/>
1355
            </lib>
1356
            <lib dir="${lib.dir}">
1357
                <patternset refid="lib.jars"/>
1358
            </lib>
1359 3059 berkley
            <lib dir="${lib.dir}">
1360 2737 jones
                <include name="xalan.jar" />
1361
                <include name="xml-apis.jar" />
1362
            </lib>
1363
            <lib dir="${build.dir}">
1364
                <include name="metacat-client.jar" />
1365
            </lib>
1366
        </war>
1367
    </target>
1368
1369
    <target name="deploy-lsid"
1370
            depends="war-lsid"
1371
            description="Deploy LSID war to servlet container">
1372 4080 daigle
        <delete dir="${dev.deploy.dir}/${authority.context}" />
1373
        <delete file="${dev.deploy.dir}/${authority.context}.war" />
1374
        <mkdir dir="${dev.deploy.dir}" />
1375
        <copy todir="${dev.deploy.dir}">
1376 2737 jones
            <fileset dir="${dist.dir}" />
1377
        </copy>
1378
    </target>
1379 113 jones
</project>