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