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