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