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