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 4813 daigle
  <!-- Determine if ecogrid should be installed-->
39 2957 tao
  <condition property="enable.ecogrid">
40
    <equals arg1="${install.ecogrid}" arg2="true" />
41
  </condition>
42 4813 daigle
43
  <!-- Determine if perl should be built-->
44
  <condition property="build.perl">
45
    <equals arg1="${make.perl.code}" arg2="true" />
46
  </condition>
47 3034 perry
48 4098 daigle
   <target name="config">
49
   	  <property name="jsdk" value="${build.tomcat.dir}/common/lib/servlet-api.jar"/>
50 1814 tao
      <!-- usr for client testing, generally you don't need change-->
51 4098 daigle
      <property name="mcuser"              value="uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org"/>
52
      <property name="mcpassword"          value="kepler"/>
53
      <property name="mcanotheruser"       value="uid=tao,o=NCEAS,dc=ecoinformatics,dc=org"/>
54
      <property name="mcanotherpassword"   value="yourpass"/>
55
   	  <property name="piscouser"           value="uid=tao,o=PISCO,dc=ecoinformatics,dc=org"/>
56
   	  <property name="piscopassword"       value="yourpass"/>
57
   	  <property name="lteruser"            value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org"/>
58
   	  <property name="lterpassword"        value="yourpass"/>
59 1801 tao
60 4098 daigle
      <property name="debug"               value="on" />
61
      <property name="morphosourcedir"     value="../morpho" />
62
      <property name="utilitiesdir"        value="../utilities" />
63 4720 daigle
      <property name="installdir"        value="${app.deploy.dir}/${metacat.context}" />
64 2175 tao
65 1941 brooke
      <echo>*********** set jsdk to ${jsdk}</echo>
66 1103 tao
  </target>
67
68 931 jones
   <target name="init" depends="config">
69 2631 tao
      <path id="compile.classpath">
70
        <pathelement location="${jsdk}"/>
71 4080 daigle
        <pathelement location="lib"/>
72 2631 tao
        <fileset dir="lib">
73
          <include name="*.jar"/>
74
        </fileset>
75 4121 daigle
	    <fileset dir="lib">
76 3059 berkley
           <include name="xalan.jar"/>
77 3030 sgarg
         </fileset>
78 2631 tao
       <fileset dir="lib/lsid_lib">
79
         <include name="*.jar"/>
80 4098 daigle
       </fileset>
81 3034 perry
82
        <!-- Include geoserver, geotools, et. al. -->
83
        <fileset dir="lib/spatial/geoserver/WEB-INF/lib">
84
          <include name="*.jar"/>
85 2631 tao
        </fileset>
86 3034 perry
        <pathelement location="lib/spatial/geoserver/WEB-INF/classes"/>
87
88 4121 daigle
      </path>
89 2631 tao
90 931 jones
      <!-- It is less likely you'll need to make any changes from here down,
91
           but customization is possible -->
92 1929 brooke
      <property name="name"                value="metacat"/>
93
      <property name="Name"                value="MetaCat"/>
94
      <property name="debugprefix"         value="${Name}:"/>
95 4080 daigle
      <property name="release"             value="${metacat.version}"/>
96 3095 cjones
      <property name="style-common-relpath" value="/style/common"/>
97
      <property name="style-shared-relpath" value="/style/shared"/>
98 4098 daigle
      <property name="schema-relpath"      value="/schema"/>
99 3095 cjones
      <property name="style-common-cvsrelpath" value="lib${style-common-relpath}"/>
100 4098 daigle
   	  <property name="schema-cvsrelpath"   value="lib${schema-relpath}"/>
101 1929 brooke
      <property name="style-skins-relpath" value="/style/skins"/>
102 2461 sgarg
      <property name="util-module"         value="utilities" />
103 4611 daigle
   	  <property name="utilities-tag"       value="UTILITIES_1_0_0" />
104 1929 brooke
      <property name="eml-module"          value="eml" />
105
      <property name="eml-version"         value="2.0.0beta6" />
106 4841 daigle
      <property name="eml-beta-tag"        value="BRANCH_EML_2_0_0_BETA_6_FOR_METACAT" />
107
      <property name="eml2_0_0-schema-tag" value="RELEASE_EML_2_0_0_UPDATE_1" />
108 3994 berkley
      <property name="eml2_0_1-schema-tag" value="RELEASE_EML_2_0_1" />
109 4821 daigle
   	  <property name="eml2_1_0-schema-tag" value="RELEASE_EML_2_1_0" />
110 4841 daigle
      <property name="eml2-style-tag"      value="RELEASE_EML_UTILS_0_9_0" />
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 4797 daigle
 	  <filter token="metacatRC"            value="${metacat.releaseCandidate}"/>
147
 	  <filter token="build.context"        value="${metacat.context}"/>
148 2343 sgarg
149 4098 daigle
      <filter token="docrooturl"           value="./" />
150
      <filter token="mcuser"               value="${mcuser}"/>
151
      <filter token="mcpassword"           value="${mcpassword}"/>
152
      <filter token="mcanotheruser"        value="${mcanotheruser}"/>
153
      <filter token="mcanotherpassword"    value="${mcanotherpassword}"/>
154
      <filter token="eml-css"              value="${eml-css}"/>
155
      <filter token="style-skins-relpath"  value="${style-skins-relpath}"/>
156 1929 brooke
      <filter token="style-common-relpath" value="${style-common-relpath}"/>
157 2343 sgarg
158 4098 daigle
      <filter token="eml-version"          value="${eml-version}"/>
159
      <filter token="eml2_0_0namespace"    value="${eml2_0_0namespace}"/>
160
      <filter token="eml2_0_1namespace"    value="${eml2_0_1namespace}"/>
161
      <filter token="eml2_1_0namespace"    value="${eml2_1_0namespace}"/>
162
      <filter token="stmmlnamespace"       value="${stmmlnamespace}"/>
163
      <filter token="debugprefix"          value="${debugprefix}"/>
164 1487 tao
165 4098 daigle
      <filter token="defaultStage"         value="${defaultStage}"/>
166
      <filter token="defaultHeader"        value="${defaultHeader}"/>
167
      <filter token="defaultFooter"        value="${defaultFooter}"/>
168
      <filter token="defaultChangePass"    value="${defaultChangePass}"/>
169
      <filter token="defaultResetPass"     value="${defaultResetPass}"/>
170
      <filter token="changePassSuccess"    value="${changePassSuccess}"/>
171
      <filter token="resetPassSuccess"     value="${resetPassSuccess}"/>
172
      <filter token="registerFailed"       value="${registerFailed}"/>
173
      <filter token="registerLter"         value="${registerLter}"/>
174
      <filter token="registerMatch"        value="${registerMatch}"/>
175
      <filter token="registerSuccess"      value="${registerSuccess}"/>
176
      <filter token="register"             value="${register}"/>
177
      <filter token="searchResults"        value="${searchResults}"/>
178 3174 tao
   	  <filter token="ldapMainServerFailure" value="${ldapMainServerFailure}"/>
179 4098 daigle
   	  <filter token="lter-user"            value="${lteruser}"/>
180
   	  <filter token="lter-pass"            value="${lterpassword}"/>
181
      <filter token="pisco-user"           value="${piscouser}"/>
182
      <filter token="pisco-pass"           value="${piscopassword}"/>
183 3575 tao
184 2549 tao
185 4179 daigle
   	  <!-- MCD BYE filter token="timedreplication"     value="${timedreplication}" / -->
186
   	  <!-- MCD BYE filter token="firsttimedreplication" value="${firsttimedreplication}" / -->
187
   	  <!-- MCD BYE filter token="timedreplicationinterval" value="${timedreplicationinterval}" / -->
188 2549 tao
189 4098 daigle
   	  <property name="srcdir"              value="./src" />
190
   	  <property name="lib.dir"             value="./lib" />
191
   	  <property name="docdir"              value="./docs" />
192 4240 daigle
 	  <property name="cgidir"              value="./cgi-bin" />
193 4098 daigle
      <property name="testdir"             value="./test" />
194
      <property name="testtorun"           value="BuildIndexTest" />
195
      <property name="junittestsdir"       value="./test/edu/ucsb/nceas/metacattest" />
196
      <property name="junitnettestsdir"    value="./test/edu/ucsb/nceas/metacatnettest" />
197
      <property name="build.dir"           value="./build"/>
198
      <property name="build.src"           value="${build.dir}/src"/>
199
      <property name="build.dest"          value="${build.dir}/classes"/>
200
      <property name="build.samples"       value="${build.dir}/samples"/>
201
      <property name="build.tests"         value="${build.dir}/tests"/>
202
      <property name="build.tmp"           value="${build.dir}/tmp"/>
203
      <property name="build.metacattest"   value="${build.tests}/metacattest"/>
204 1116 tao
      <property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
205 4098 daigle
      <property name="build.data"          value="${build.dir}/data"/>
206
      <property name="build.javadocs"      value="${build.dir}/docs/api"/>
207
      <property name="build.war"           value="${build.dir}/war"/>
208
      <property name="dist.dir"            value="dist"/>
209
      <property name="ver.dir"             value="${dist.dir}/${name}-${release}"/>
210
      <property name="ver.src"             value="${ver.dir}/src"/>
211
      <property name="util.dir"            value="${dist.dir}/${util-module}"/>
212 4648 daigle
      <property name="test.dir"            value="${dist.dir}/test"/>
213 2401 costa
	  <!-- directories for creating a Harvest List Editor distribution -->
214 4098 daigle
      <property name="dist.dir.hle"        value="disthle"/>
215
      <property name="ver.dir.hle"         value="${dist.dir.hle}/harvest-list-editor-${release}"/>
216 4658 daigle
   	  <property name="pkg.dir"             value="./package" />
217
   	  <property name="deb.pkg.dir"         value="${pkg.dir}/debian" />
218 4098 daigle
219 2965 tao
   	  <property name="ecogrid-target-name" value="metacatImpl"/>
220
   	  <property name="ecogrid-module-dest-dir" value =".."/>
221 4098 daigle
   	  <property name="ecogrid-module"      value="seek/projects/ecogrid"/>
222
   	  <property name="ecogrid-dist-dir"    value="${dist.dir}/${ecogrid-module}"/>
223
   	  <property name="ecogrid-dir"         value="${ecogrid-module-dest-dir}/${ecogrid-module}"/>
224 806 jones
225 4098 daigle
      <property name="package.home"        value="edu/ucsb/nceas/metacat" />
226 2317 jones
      <condition property="utilities.required">
227
        <or>
228
          <not><available file="lib/httpclient.jar"/></not>
229
          <not><available file="lib/utilities.jar"/></not>
230 4513 daigle
          <not><available file="${utilitiesdir}" type="dir"/></not>
231 2317 jones
        </or>
232
      </condition>
233 4513 daigle
   	  <!-- peer.utilities.required is used when there is no utilities
234
   	       directory at ${utilitiesdir} -->
235 4515 daigle
      <condition property="peer.utilities.required">
236 4513 daigle
        <or>
237
          <not><available file="${utilitiesdir}" type="dir"/></not>
238
        </or>
239
      </condition>
240 2318 jones
      <condition property="eml.required">
241
        <or>
242
          <not><available file="lib/schema/eml-2.0.1/eml.xsd"/></not>
243
          <not><available file="lib/schema/eml-2.0.0/eml.xsd"/></not>
244 4328 daigle
          <not><available file="lib/schema/eml-2.1.0/eml.xsd"/></not>
245 2318 jones
          <not><available file="lib/dtd/eml-dataset-2.0.0beta6.dtd"/></not>
246
        </or>
247
      </condition>
248 2965 tao
249
      <condition property="ecogrid.required">
250
      	   <or>
251
             <not><available file="${ecogrid-dir}/build.properties"/></not>
252
             <not><available file="${ecogrid-dir}/buildfiles/metacatImpl.xml"/></not>
253
           </or>
254
      </condition>
255 2599 jones
256 113 jones
   </target>
257 1311 berkley
258 348 jones
   <target name="prepare" depends="init">
259
      <mkdir dir="${build.dir}"/>
260
      <mkdir dir="${build.src}"/>
261
      <mkdir dir="${build.dest}"/>
262 516 jones
      <mkdir dir="${build.javadocs}"/>
263 1778 tao
      <mkdir dir="${build.tmp}"/>
264 348 jones
265 822 jones
      <copy todir="${build.src}" filtering="yes">
266
        <fileset dir="${srcdir}">
267
          <include name="edu/**"/>
268
          <include name="com/**"/>
269 3194 berkley
          <include name="org/**"/>
270 877 jones
          <include name="**/*.sql"/>
271 822 jones
          <exclude name="**/CVS*"/>
272
          <exclude name="**/.#*"/>
273
        </fileset>
274
      </copy>
275 2344 sgarg
      <available file="lib/style/common/emlb6toeml2" type="dir"
276 1954 jones
                 property="styles.not.needed"/>
277 348 jones
   </target>
278
279 1939 brooke
   <target name="compile" depends="prepare,utilities"
280 1986 jones
    description="Compiles java code to build dir, and copies metacat props files there">
281 1939 brooke
282 1311 berkley
       <javac srcdir="${build.src}"
283
              destdir="${build.dest}"
284 1827 jones
              debug="${debug}"
285 3994 berkley
              excludes="**/*.sql **/stringclient/** **/client/*.java **/harvesterClient/*.java">
286 2599 jones
        <classpath>
287
          <path refid="compile.classpath"/>
288
        </classpath>
289
      </javac>
290 1311 berkley
   </target>
291 113 jones
292 2322 jones
   <target name="jar" depends="compile,geteml"
293 4513 daigle
    description="Compiles and jars metacat java code to metacat.jar in build dir ">
294 1939 brooke
295 353 jones
       <delete file="${build.dir}/${name}.jar" />
296 635 jones
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
297 2135 costa
            excludes="**/protocols/ **/harvesterClient/" />
298 1311 berkley
   </target>
299
300 1939 brooke
   <target name="protocol" depends="compile"
301
    description="Compiles and jars protocol java code to protocol.jar in build dir">
302 635 jones
       <delete file="${build.dir}/protocol.jar" />
303
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
304
            includes="**/protocols/" />
305 1311 berkley
   </target>
306 113 jones
307 4514 daigle
   <target name="utilities" depends="config,getpeerutilities" if="utilities.required">
308 1796 jones
     <ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
309
     <ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
310 1780 jones
     <copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
311
     <copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
312
   </target>
313 4513 daigle
314
   <target name="getpeerutilities" depends="prepare" if="peer.utilities.required"
315
	description="Checks utilities out of cvs and copies it to your utilitiesdir if it does not already exist">
316
     <echo>Enter CVS password: </echo>
317 4819 daigle
     <cvs cvsRoot="${cvsroot}" package="${util-module}"
318
     	tag="${utilities-tag}" dest="${utilitiesdir}/.." />
319 4513 daigle
   </target>
320 1780 jones
321 2461 sgarg
   <target name="getutilities" depends="prepare"
322
   description="Checks utility out of cvs and copies it to your metacat cvs sandbox">
323
     <echo>Enter CVS password: </echo>
324
     <cvs cvsRoot="${cvsroot}"
325 2468 sgarg
          package="${util-module}"
326 4611 daigle
     	  tag="${utilities-tag}"
327 2461 sgarg
          dest="${build.tmp}" />
328
   </target>
329
330 1939 brooke
   <target name="client" depends="utilities, prepare"
331
    description="Compiles metacat-client java code to build dir">
332 1780 jones
       <javac srcdir="${build.src}"
333
              destdir="${build.dest}"
334 2599 jones
              includes="edu/ucsb/nceas/metacat/client/*">
335
          <classpath>
336
            <path refid="compile.classpath"/>
337
          </classpath>
338
        </javac>
339 1780 jones
   </target>
340
341 1939 brooke
   <target name="clientjar" depends="client"
342
    description="Compiles and jars metacat-client java code to metacat-client.jar in build dir">
343 1780 jones
       <delete file="${build.dir}/${name}-client.jar" />
344
       <jar jarfile="${build.dir}/${name}-client.jar" basedir="${build.dest}"
345
            includes="**/metacat/client/" />
346
   </target>
347
348 2748 costa
    <target name="advancedsearchjar" depends="compile"
349
            description="Compiles and jars advanced search Java code to advancedsearch.jar in build dir">
350
        <delete file="${build.dir}/advancedsearch.jar" />
351
        <jar jarfile="${build.dir}/advancedsearch.jar" basedir="${build.dest}"
352
             includes="**/metacat/advancedsearch/" />
353
    </target>
354
355 2059 costa
   <target name="harvester" depends="client"
356 1950 costa
           description="Compiles harvester java code to build dir">
357
       <javac srcdir="${build.src}"
358
              destdir="${build.dest}"
359 2599 jones
              includes="edu/ucsb/nceas/metacat/harvesterClient/*">
360
          <classpath>
361
            <path refid="compile.classpath"/>
362
          </classpath>
363
        </javac>
364 1950 costa
   </target>
365
366
   <target name="harvesterjar" depends="harvester"
367 2059 costa
           description="Compiles and jars harvester java code to harvester.jar in build dir">
368
       <delete file="${build.dir}/harvester.jar" />
369
       <jar jarfile="${build.dir}/harvester.jar" basedir="${build.dest}"
370 1950 costa
            includes="**/metacat/harvesterClient/" />
371
   </target>
372
373 2369 costa
   <target name="harvestListEditorDist" depends="harvesterjar"
374
           description="Prepares a distribution of the Harvest List Editor tool">
375 2401 costa
       <mkdir dir="${dist.dir.hle}"/>
376
       <delete dir="${ver.dir.hle}" />
377
       <mkdir dir="${ver.dir.hle}"/>
378
       <copy todir="${ver.dir.hle}" file="${build.dir}/harvester.jar"/>
379
       <copy todir="${ver.dir.hle}" file="lib/xercesImpl.jar"/>
380
       <copy todir="${ver.dir.hle}" file="lib/harvester/harvestList.xsd"/>
381
       <copy todir="${ver.dir.hle}" file="lib/harvester/harvestListEditor.bat"/>
382
       <copy todir="${ver.dir.hle}" file="lib/harvester/harvestListEditor.sh"/>
383
       <delete file="./harvest-list-editor-${release}.zip"/>
384
       <zip zipfile="./harvest-list-editor-${release}.zip" basedir="${ver.dir.hle}" />
385
       <delete file="./harvest-list-editor-${release}.tar.gz" />
386
       <tar tarfile="./harvest-list-editor-${release}.tar" basedir="${ver.dir.hle}" />
387
       <gzip zipfile="./harvest-list-editor-${release}.tar.gz"
388
             src="./harvest-list-editor-${release}.tar"/>
389
       <delete file="./harvest-list-editor-${release}.tar" />
390 2369 costa
   </target>
391 4513 daigle
392 4240 daigle
   <target  name="geteml" depends="getemlpre2,geteml2+,getConversionXSL" if="eml.required"
393 1939 brooke
            description="Calls getemlpre2 and geteml2+ targets" />
394
395 2318 jones
   <target name="getemlpre2" depends="prepare" if="eml.required"
396 1939 brooke
   description="Checks EML-beta6 out of cvs and copies dtds and xsl to your metacat cvs sandbox">
397 1612 tao
     <echo>Enter CVS password: </echo>
398
     <cvs cvsRoot="${cvsroot}"
399
          package="${eml-module}"
400 4841 daigle
          tag="${eml-beta-tag}"
401
          dest="${build.tmp}/eml_${eml-beta-tag}" />
402 1612 tao
     <mkdir dir="lib/dtd" />
403
     <copy todir="lib/dtd" filtering="yes">
404 4841 daigle
       <fileset dir="${build.tmp}/eml_${eml-beta-tag}/${eml-module}">
405 1612 tao
         <include name="*.dtd"/>
406
       </fileset>
407
       <mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
408
     </copy>
409 2228 sgarg
410
     <copy todir="${style-common-cvsrelpath}" filtering="yes">
411 4841 daigle
       <fileset dir="${build.tmp}/eml_${eml-beta-tag}/${eml-module}/style">
412 2228 sgarg
       <include name="**/*.xsl"/>
413
     </fileset>
414
     </copy>
415 1939 brooke
   </target>
416
417 2318 jones
   <target name="geteml2+" depends="prepare" if="eml.required"
418 1939 brooke
   description="Checks eml-2 out of cvs and copies schema and xsl to your metacat cvs sandbox">
419
     <echo>Enter CVS password: </echo>
420 1612 tao
     <cvs cvsRoot="${cvsroot}"
421
          package="${eml-module}"
422 4841 daigle
          tag="${eml2_0_0-schema-tag}"
423
          dest="${build.tmp}/eml_${eml2_0_0-schema-tag}" />
424 2228 sgarg
     <mkdir dir="lib/schema/eml-2.0.0" />
425
     <copy todir="lib/schema/eml-2.0.0" filtering="yes">
426 4841 daigle
       <fileset dir="${build.tmp}/eml_${eml2_0_0-schema-tag}/${eml-module}">
427 1612 tao
         <include name="*.xsd"/>
428
       </fileset>
429 2175 tao
430 1939 brooke
       <!-- shouldn't we have a mapper here like this??
431
       <mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" />
432 2175 tao
433
       Jing's code didn't nave one - does it need to be added?
434 1939 brooke
       NOTE that eml-version is set to beta 6, so this would need changing -->
435 2175 tao
436 1612 tao
     </copy>
437 3018 sgarg
     <!-- <antcall target="copyxsl">
438 4841 daigle
        <param name="cvs.tagname" value="${eml2_0_0-schema-tag}" />
439 2228 sgarg
        <param name="dirname" value="eml-2.0.0" />
440 3018 sgarg
     </antcall> -->
441 3807 tao
442
   	<!-- Checkout eml201 for given schema tag-->
443 2228 sgarg
     <echo>Enter CVS password: </echo>
444
     <cvs cvsRoot="${cvsroot}"
445
          package="${eml-module}"
446 3807 tao
          tag="${eml2_0_1-schema-tag}"
447
          dest="${build.tmp}/eml_${eml2_0_1-schema-tag}" />
448 2228 sgarg
     <mkdir dir="lib/schema/eml-2.0.1" />
449
     <copy todir="lib/schema/eml-2.0.1" filtering="yes">
450 3807 tao
       <fileset dir="${build.tmp}/eml_${eml2_0_1-schema-tag}/${eml-module}">
451 2228 sgarg
         <include name="*.xsd"/>
452
       </fileset>
453
     </copy>
454 3807 tao
455
   	<!-- Checkout eml201 again for given style sheet tag-->
456 4841 daigle
   	<!-- echo>Enter CVS password: </echo>
457 3807 tao
   	     <cvs cvsRoot="${cvsroot}"
458
   	          package="${eml-module}"
459
   	          tag="${eml2_0_1-style-tag}"
460
   	          dest="${build.tmp}/eml_${eml2_0_1-style-tag}" />
461 2228 sgarg
     <antcall target="copyxsl">
462 3807 tao
        <param name="cvs.tagname" value="${eml2_0_1-style-tag}" />
463 2228 sgarg
        <param name="dirname" value="eml-2.0.1" />
464 4841 daigle
     </antcall -->
465 4328 daigle
466
   	<!-- Checkout eml210 for given schema tag-->
467
     <echo>Enter CVS password: </echo>
468
     <cvs cvsRoot="${cvsroot}"
469
          package="${eml-module}"
470
          tag="${eml2_1_0-schema-tag}"
471
          dest="${build.tmp}/eml_${eml2_1_0-schema-tag}" />
472
     <mkdir dir="lib/schema/eml-2.1.0" />
473
     <copy todir="lib/schema/eml-2.1.0" filtering="yes">
474
       <fileset dir="${build.tmp}/eml_${eml2_1_0-schema-tag}/${eml-module}">
475
         <include name="*.xsd"/>
476
       </fileset>
477
     </copy>
478
479
   	<!-- Checkout eml210 for given style sheet tag-->
480
   	<echo>Enter CVS password: </echo>
481
   	     <cvs cvsRoot="${cvsroot}"
482
   	          package="${eml-module}"
483 4841 daigle
   	          tag="${eml2-style-tag}"
484
   	          dest="${build.tmp}/eml_${eml2-style-tag}" />
485 4328 daigle
     <antcall target="copyxsl">
486 4841 daigle
        <param name="cvs.tagname" value="${eml2-style-tag}" />
487
        <!-- param name="dirname" value="eml-2.1.0" / -->
488
        <param name="dirname" value="eml-2" />
489 4328 daigle
     </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 4873 daigle
   <target name="install" depends="build-metacat" description="* Full Install For Development *">
570 4720 daigle
     <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 4797 daigle
   <target name="install-ecogrid" depends="warPrepare, 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 4797 daigle
   	  <!-- war destfile="${ecogrid-dir}/build/${metacat.context}.war" update="true">
595 2978 tao
  	      <webinf dir="${ecogrid-dir}/lib">
596
   	        <include name="server-config.wsdd"/>
597
   	      </webinf>
598 4797 daigle
   	  </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 4841 daigle
   <!-- 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 4794 daigle
   	     <property name="hostname" value="${ecogrid.hostname}"/>
616 2977 tao
   	     <property name="port" value="${config.port}"/>
617 2957 tao
   	 </ant>
618 4841 daigle
   </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 4819 daigle
   	   <property name="war.webinf.scripts" value="${war.webinf}/scripts" />
733 4369 daigle
	   <property name="war.context.cgi" value="${war.context}/cgi-bin" />
734 4080 daigle
   	   <property name="war.context.docs" value="${war.context}/docs" />
735 4240 daigle
   	   <property name="war.context.temp" value="${war.context}/temp" />
736
   	   <property name="war.context.templates" value="${war.context}${style-common-relpath}/templates" />
737 1952 jones
       <mkdir dir="${war.lib}" />
738
       <mkdir dir="${war.webinf}" />
739
       <mkdir dir="${war.context}" />
740 4098 daigle
   	   <mkdir dir="${war.webinf.sql}" />
741 4369 daigle
	   <mkdir dir="${war.context.cgi}" />
742 4080 daigle
   	   <mkdir dir="${war.context.docs}" />
743 4240 daigle
   	   <mkdir dir="${war.context.temp}" />
744
       <mkdir dir="${war.context.templates}" />
745 2610 tao
746 4098 daigle
	   <!--copy file="${lib.dir}/${jdbc.lib.postgres}" todir="${war.lib}" / -->
747
       <!--copy file="${lib.dir}/${jdbc.lib.sqlserver1}" todir="${war.lib}" / -->
748
       <!--copy file="${lib.dir}/${jdbc.lib.sqlserver2}" todir="${war.lib}" / -->
749
       <!--copy file="${lib.dir}/${jdbc.lib.sqlserver3}" todir="${war.lib}" / -->
750 1952 jones
       <copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
751
       <copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
752 2059 costa
       <copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
753 1952 jones
       <copy todir="${war.lib}" filtering="no">
754 1823 jones
         <fileset dir="lib">
755 4098 daigle
<!--
756
         	<not>
757 2610 tao
               <filename name="${jdbc-jar-name}"/>
758
            </not>
759 4098 daigle
-->
760 2610 tao
            <include name="*.jar"/>
761 1823 jones
         </fileset>
762 3059 berkley
         <fileset dir="lib">
763
           <include name="xalan.jar"/>
764 3194 berkley
           <include name="gwt*.jar"/>
765 1823 jones
         </fileset>
766
       </copy>
767 4080 daigle
       <!-- MCD copy file="lib/web.xml.${tomcatversion}"
768
             tofile="${build.war}/web.xml" / -->
769
       <!-- MCD added next - Remove the tomcat5 reference-->
770
   	   <copy file="lib/web.xml.tomcat5"
771
   	             tofile="${build.war}/web.xml"/>
772 1952 jones
       <copy file="lib/metacat.properties" todir="${war.webinf}"
773 1951 jones
             filtering="yes" />
774 4080 daigle
   	   <copy file="lib/metacat.properties.metadata.xml" todir="${war.webinf}"
775 3099 jones
   	             filtering="no" />
776 4080 daigle
	   <copy file="lib/org.properties.metadata.xml" todir="${war.webinf}"
777
	             filtering="no" />
778 4593 daigle
	   <copy file="lib/auth.properties.metadata.xml" todir="${war.webinf}"
779 4162 daigle
	             filtering="no" />
780 2900 sgarg
       <copy todir="${war.webinf}" filtering="yes">
781
	   	  <fileset dir="lib">
782
           <include name="skin.configs/**"/>
783
		  </fileset>
784
	   </copy>
785 2583 sgarg
       <copy file="lib/log4j.properties" todir="${war.webinf}"
786
             filtering="yes" />
787 1952 jones
       <copy todir="${war.context}" filtering="no">
788 822 jones
         <fileset dir="lib">
789
           <include name="**/*.jpg"/>
790
           <include name="**/*.png"/>
791
           <include name="**/*.gif"/>
792 2844 costa
           <include name="LiveMap_30/**"/>
793 822 jones
         </fileset>
794
       </copy>
795 1952 jones
       <copy todir="${war.context}" filtering="yes">
796 822 jones
         <fileset dir="lib">
797
           <exclude name="*.jar"/>
798
           <exclude name="*.properties"/>
799 4080 daigle
         	<exclude name="*.metadata.xml"/>
800 822 jones
           <exclude name="web.xml"/>
801 1437 berkley
           <exclude name="**/*.jpg"/>
802
           <exclude name="**/*.png"/>
803
           <exclude name="**/*.gif"/>
804 2778 jones
           <exclude name="lsid_lib/**"/>
805
           <exclude name="lsid_conf/**"/>
806 2844 costa
           <exclude name="LiveMap_30/**"/>
807 2900 sgarg
           <exclude name="skin.configs/**"/>
808 3034 perry
           <exclude name="spatial/geoserver/**"/>
809
           <exclude name="spatial/WEB-INF/**"/>
810 822 jones
         </fileset>
811
       </copy>
812 4193 daigle
       <copy todir="${war.context.docs}" filtering="yes">
813
          <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
814
       </copy>
815
       <copy todir="${war.context.docs}" filtering="no">
816
          <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
817
       </copy>
818 4098 daigle
	   <copy todir="${war.webinf.sql}" filtering="yes">
819 4080 daigle
	         <fileset dir="src">
820
	           <include name="**/*.sql"/>
821
	         </fileset>
822
	   </copy>
823 4819 daigle
	   <copy todir="${war.webinf.scripts}" filtering="yes">
824
	         <fileset dir="src/scripts"/>
825
	   </copy>
826
       <copy todir="${war.webinf.scripts}"
827
             file="src/perl/Metacat/blib/lib/auto/Metacat/autosplit.ix"
828
             failonerror="false"/>
829 4369 daigle
830
   	   <copy file="src/perl/register-dataset.cgi" todir="${war.context.cgi}"/>
831
	   <copy file="src/perl/ldapweb.cgi" todir="${war.context.cgi}" />
832 4515 daigle
	   <copy file="src/perl/Metacat/Metacat.pm" todir="${war.lib}" />
833 4369 daigle
834
	   <!-- registry cgi section -->
835
	   <!-- TODO SCW: use relative paths to grab these instead of copying to tmp,
836 4240 daigle
                   used in readDocumentFromMetacat -->
837 4369 daigle
	   <!-- TODO MCD copy temp files to actual location using config util?? -->
838
	   <copy todir="${war.context.temp}" filtering="yes">
839
		  <fileset dir="lib/style/common/emlb6toeml2">
840
 		    <include name="*.xsl"/>
841
			<include name="*.xml"/>
842
		  </fileset>
843
	    </copy>
844
	    <available file="lib/style/common/emlb6toeml2" type="dir"
845
                 property="styles.not.needed"/>
846
847
	    <!-- ldap cgi section -->
848
	    <copy todir="${war.context.templates}">
849
		    <fileset dir="lib/style/common/templates">
850
			    <!-- SCW: Copy all files -->
851
		    </fileset>
852
	    </copy>
853
    </target>
854
855 4820 daigle
	<target name="cgiPrepare" if="build.perl">
856
		<exec dir="src/perl/Metacat/" executable="make" >
857
			<arg value="clean" />
858
		</exec>
859
		<exec dir="src/perl/Metacat/" executable="perl" >
860 4369 daigle
			<arg value="Makefile.PL" />
861
		</exec>
862 4820 daigle
		<exec dir="src/perl/Metacat/" executable="make" />
863 4369 daigle
	</target>
864 4435 daigle
865 4550 daigle
	<target name="testPrepare"
866 4435 daigle
		description="Copies test files into the war directories">
867
		<echo>in testPrepare</echo>
868
		<property name="war.context.test" value="${build.war}/${metacat.context}/test" />
869
		<mkdir dir="${war.context.test}" />
870
	    <copy todir="${war.context.test}" filtering="yes">
871
		   <fileset dir="test/servertestfiles">
872
	          <include name="*/**"/>
873
		   </fileset>
874
		</copy>
875
	</target>
876 1929 brooke
877 2175 tao
   <target name="getConversionXSL" depends="prepare"
878 1954 jones
            unless="styles.not.needed"
879 1939 brooke
            description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
880 2497 sgarg
881 1929 brooke
     <echo>Enter CVS password: </echo>
882 2497 sgarg
     <cvs cvsRoot="${cvsroot}"
883
          package="${eml-module}"
884 4843 daigle
          tag="${eml2-style-tag}"
885
          dest="${build.tmp}/eml_${eml2-style-tag}" />
886 2343 sgarg
887
     <mkdir dir="lib/style/common/emlb6toeml2" />
888
      <copy todir="lib/style/common/emlb6toeml2" filtering="yes">
889 4843 daigle
       <fileset dir="${build.tmp}/eml_${eml2-style-tag}/${eml-module}/lib/beta6toeml2/xsl">
890 2343 sgarg
         <include name="*.xsl"/>
891
         <include name="*.xml"/>
892
       </fileset>
893
      </copy>
894 1929 brooke
   </target>
895
896 2135 costa
   <target name="testprep" depends="jar,clientjar,harvesterjar">
897 1783 jones
      <mkdir dir="${build.tests}"/>
898
      <copy todir="${build.tests}" filtering="yes">
899
        <fileset dir="${testdir}">
900
          <include name="edu/**"/>
901
        </fileset>
902
      </copy>
903 4382 daigle
   	  <copy todir="${build.tests}" file="${testdir}/test.properties" filtering="yes"/>
904 4121 daigle
905 971 tao
      <!-- copy and compile the tests into a jar file -->
906 1783 jones
      <javac srcdir="${build.tests}"
907
             destdir="${build.tests}"
908 1612 tao
             debug="on"
909 2982 jones
             includes="**/*.java">
910 2599 jones
        <classpath>
911
          <path refid="compile.classpath"/>
912
          <fileset dir="${build.dir}">
913 2982 jones
            <include name="${name}.jar"/>
914
            <include name="${name}-client.jar"/>
915
            <include name="harvester.jar"/>
916 2599 jones
          </fileset>
917
        </classpath>
918
      </javac>
919 204 jones
920 1311 berkley
      <jar jarfile="${build.dir}/${name}-junittests.jar"
921 1783 jones
        basedir="${build.tests}"
922 1311 berkley
                includes="**/*.class" />
923 1822 jones
   </target>
924 971 tao
925 1939 brooke
   <target name="test" depends="testprep"
926
            description="Uses the ant junit task to run all JUnit tests">
927 1822 jones
928 971 tao
      <!-- use the ant "junit" task to run JUnit tests. -->
929 1783 jones
      <junit printsummary="yes" haltonfailure="no" fork="yes"
930 971 tao
             haltonerror="no">
931 1783 jones
        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
932 971 tao
        <classpath>
933 2599 jones
          <path refid="compile.classpath"/>
934
          <fileset dir="${build.dir}">
935 2982 jones
            <include name="${name}.jar"/>
936
            <include name="${name}-client.jar"/>
937
            <include name="harvester.jar"/>
938
            <include name="${name}-junittests.jar"/>
939 2599 jones
          </fileset>
940 971 tao
        </classpath>
941
942
        <formatter type="plain" />
943
944
        <batchtest fork="yes" todir="${build.dir}">
945 1783 jones
          <fileset dir="${build.tests}">
946 4304 daigle
            <include name="**/*.class"/>
947 4147 daigle
          	<exclude name="**/MCTestCase.class" />
948 4304 daigle
          	<exclude name="**/ClientViewHelperTest.class" />
949 971 tao
          </fileset>
950
        </batchtest>
951
     </junit>
952
   </target>
953 1103 tao
954 1939 brooke
    <target name="runonetest" depends="testprep"
955
            description="Uses the ant junit task to run a single JUnit test, defined by the ${testtorun} property">
956 1500 tao
957 1939 brooke
              <echo>testtorun: ${testtorun}</echo>
958
959 1500 tao
      <!-- use the ant "junit" task to run JUnit tests. -->
960 1783 jones
      <junit printsummary="yes" haltonfailure="no" fork="yes"
961 3747 tao
             haltonerror="no" showoutput="yes">
962 2044 tao
        <!--<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>-->
963 1500 tao
        <classpath>
964 2599 jones
          <path refid="compile.classpath"/>
965
          <fileset dir="${build.dir}">
966 2982 jones
            <include name="${name}.jar"/>
967
            <include name="${name}-client.jar"/>
968
            <include name="harvester.jar"/>
969
            <include name="${name}-junittests.jar"/>
970 2599 jones
          </fileset>
971 1500 tao
        </classpath>
972
973
        <formatter type="plain" />
974
975
        <batchtest fork="yes" todir="${build.dir}">
976 1783 jones
          <fileset dir="${build.tests}">
977 1500 tao
            <include name="**/${testtorun}.class" />
978
          </fileset>
979
        </batchtest>
980
     </junit>
981
   </target>
982
983 2175 tao
   <target name="testharvester"
984 2135 costa
           depends="testprep"
985
           description="Uses the ant junit task to test only the Harvester code">
986 2175 tao
     <junit printsummary="yes"
987
            haltonfailure="off"
988 2135 costa
            fork="yes"
989
            haltonerror="off">
990 2599 jones
        <classpath>
991
          <path refid="compile.classpath"/>
992
          <fileset dir="${build.dir}">
993 2982 jones
            <include name="${name}.jar"/>
994
            <include name="${name}-client.jar"/>
995
            <include name="harvester.jar"/>
996
            <include name="${name}-junittests.jar"/>
997 2599 jones
          </fileset>
998
        </classpath>
999 2135 costa
       <formatter type="plain" />
1000
       <batchtest fork="yes" todir="${build.dir}">
1001
         <fileset dir="${build.tests}">
1002
           <include name="**/harvesterClient/*.class" />
1003
         </fileset>
1004
       </batchtest>
1005
     </junit>
1006
   </target>
1007
1008 1939 brooke
  <target name="gethttpclient" depends="prepare"
1009
            description="checks out and compiles morpho httpclient code">
1010 1311 berkley
  <!--mkdir dir="${morphosourcedir}" -->
1011 1487 tao
        <cvs cvsRoot="${cvsroot}"
1012 1103 tao
             package="morpho"
1013
             dest="." />
1014 1107 tao
        <ant dir="${morphosourcedir}" inheritAll="false"  target="jar" />
1015 1103 tao
   </target>
1016
1017
   <!-- run this target, we need to check out a another morpho souce dir was checked out. -->
1018 4720 daigle
   <target name="nettest" depends="install"
1019 1939 brooke
            description="compiles and runs the metacatnettest code">
1020 2175 tao
1021 1103 tao
      <echo>***********************************
1022 1311 berkley
      Please run ant gethttpclient first!
1023
      ***********************************
1024 1103 tao
      </echo>
1025
      <!-- copy and compile the tests into a jar file -->
1026 1116 tao
      <mkdir dir="${build.metacatnettest}"/>
1027 1103 tao
      <javac srcdir="${junitnettestsdir}"
1028 1116 tao
             destdir="${build.metacatnettest}"
1029 2599 jones
             includes="**/*.java">
1030
        <classpath>
1031
          <path refid="compile.classpath"/>
1032
          <fileset dir="${build.dir}">
1033 2982 jones
            <include name="${name}.jar"/>
1034 2599 jones
          </fileset>
1035
        </classpath>
1036
      </javac>
1037 1103 tao
1038
      <jar jarfile="${build.dir}/${name}-junitnettests.jar"
1039 1116 tao
                    basedir="${build.metacatnettest}"
1040 1103 tao
                    includes="**/*.class" />
1041
1042
      <!-- use the ant "junit" task to run JUnit tests. -->
1043 1107 tao
      <junit printsummary="yes" haltonfailure="no" fork="yes"
1044 1103 tao
             haltonerror="no">
1045 1107 tao
        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
1046 1103 tao
        <classpath>
1047 2599 jones
          <path refid="compile.classpath"/>
1048
          <fileset dir="${build.dir}">
1049 2982 jones
            <include name="${name}.jar"/>
1050
            <include name="${name}-junitnettests.jar"/>
1051 2599 jones
          </fileset>
1052 1103 tao
        </classpath>
1053
1054
        <formatter type="plain" />
1055
1056
        <batchtest fork="yes" todir="${build.dir}">
1057 1116 tao
          <fileset dir="${build.metacatnettest}">
1058
            <include name="**/*.class" />
1059 1103 tao
          </fileset>
1060
        </batchtest>
1061
     </junit>
1062 1311 berkley
   </target>
1063 1103 tao
1064 1939 brooke
   <target name="cleanweb" depends="clean"
1065
            description="deletes tomcat web context dir and all its contents">
1066 1522 berkley
     <delete dir="${installdir}" />
1067
   </target>
1068
1069
1070 1939 brooke
   <target name="clean" depends="init"
1071 2320 jones
            description="deletes build dir and files that can be regenerated form the release">
1072 822 jones
       <delete dir="${build.dir}" />
1073 2737 jones
       <delete dir="${dist.dir}" />
1074 2320 jones
   </target>
1075
1076 4098 daigle
	<target name="localclean" depends="clean"
1077
	            description="deletes even jars that depend on external sources such as stylesheets and jars">
1078
	       <delete file="lib/httpclient.jar" />
1079
	       <delete file="lib/utilities.jar" />
1080
	</target>
1081
1082
   <target name="fullclean" depends="localclean"
1083
            description="deletes code and eml">
1084 1939 brooke
       <delete includeEmptyDirs="true" failonerror="false">
1085
         <fileset dir="${style-common-cvsrelpath}">
1086
           <include name="${eml-css}" />
1087
           <include name="eml-*/*.xsl" />
1088
           <include name="eml-*" />
1089
         </fileset>
1090 4080 daigle
       	 <fileset dir="${schema-cvsrelpath}">
1091
       	   <include name="eml-*/*.xsd" />
1092
       	 </fileset>
1093 4369 daigle
       	 <fileset dir="${ecogrid-dir}">
1094
       		<include name="build.properties" />
1095
       		<include name="buildfiles/metacatImpl.xml" />
1096
         </fileset>
1097 2320 jones
       </delete>
1098 113 jones
   </target>
1099
1100 1939 brooke
   <target name="jdoc" depends="prepare"
1101
            description="generates javadoc documentation">
1102 822 jones
       <javadoc packagenames="edu.ucsb.nceas.*"
1103 516 jones
           sourcepath="${build.src}"
1104
           destdir="${build.javadocs}"
1105 113 jones
           author="true"
1106
           version="true"
1107
           use="true"
1108 348 jones
           windowtitle="${Name} API"
1109
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
1110 2599 jones
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;">
1111
         <classpath>
1112
           <path refid="compile.classpath"/>
1113
         </classpath>
1114
       </javadoc>
1115 113 jones
   </target>
1116
1117 2461 sgarg
   <target name="dist"
1118 2965 tao
       depends="geteml,get-ecogrid,jar,protocol,jdoc,getConversionXSL,getutilities"
1119 1939 brooke
            description="prepares a full release distribution">
1120 806 jones
      <mkdir dir="${dist.dir}"/>
1121
      <delete dir="${ver.dir}" />
1122
      <mkdir dir="${ver.dir}"/>
1123
      <copy todir="${ver.dir}">
1124 1311 berkley
        <fileset dir="."
1125 4648 daigle
            excludes="**/CVS* **/.#* src/** test/** build/** docs/** ${dist.dir}/** ${dist.dir.hle}/** metacat*.tar.gz metacat*.tar metacat*.zip"/>
1126 806 jones
      </copy>
1127
      <copy todir="${ver.dir}" file="build.xml"/>
1128 2317 jones
      <copy todir="${ver.dir}" file="build.properties"/>
1129 882 jones
1130
      <copy todir="${ver.dir}/docs" filtering="yes">
1131
        <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
1132
      </copy>
1133
      <copy todir="${ver.dir}/docs" filtering="no">
1134
        <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
1135
      </copy>
1136 806 jones
      <copy todir="${ver.dir}/docs/dev">
1137
        <fileset dir="${build.dir}/docs"/>
1138
      </copy>
1139 917 berkley
      <copy todir="${ver.dir}/src">
1140
        <fileset dir="${build.dir}/src"/>
1141
      </copy>
1142 4648 daigle
1143
   	  <mkdir dir="${ver.dir}/tests/servertestfiles"/>
1144
	  <copy todir="${ver.dir}/test/servertestfiles">
1145
	    <fileset dir="./test/servertestfiles"/>
1146
	  </copy>
1147 1311 berkley
  </target>
1148 806 jones
1149 4797 daigle
	<target name="distbin" depends="build-metacat,war-lsid" description="prepares a binary distribution">
1150 4372 daigle
		<copy todir="${dist.dir}">
1151 4641 daigle
			<fileset dir="./src/scripts"  />
1152 4372 daigle
		</copy>
1153
		<delete file="./${name}-bin-${release}.zip" />
1154
		<zip zipfile="./${name}-bin-${release}.zip"
1155
			basedir="${dist.dir}"
1156
			excludes="metacat-*/**"/>
1157
		<delete file="./${name}-bin-${release}.tar.gz" />
1158
		<tar tarfile="./${name}-bin-${release}.tar"
1159
			basedir="${dist.dir}"
1160
			excludes="metacat-*/**"/>
1161
		<gzip zipfile="./${name}-bin-${release}.tar.gz" src="./${name}-bin-${release}.tar" />
1162
		<delete file="./${name}-bin-${release}.tar" />
1163
	</target>
1164
1165 1939 brooke
  <target name="distsrc" depends="dist"
1166
            description="prepares a source distribution">
1167 806 jones
      <mkdir dir="${ver.src}"/>
1168
      <copy todir="${ver.src}">
1169
        <fileset dir="./src"/>
1170
      </copy>
1171 2461 sgarg
      <mkdir dir="${util.dir}"/>
1172
      <copy todir="${util.dir}">
1173
        <fileset dir="${build.tmp}/utilities" excludes="**/CVS*" />
1174
      </copy>
1175 2965 tao
1176
  	  <mkdir dir="${ecogrid-dist-dir}"/>
1177
  	  <copy todir="${ecogrid-dist-dir}">
1178
  	        <fileset dir="${ecogrid-dir}" excludes="**/CVS*" />
1179
  	  </copy>
1180 806 jones
1181 3131 perry
      <delete file="${ver.dir}/lib/utilities.jar"/>
1182
1183 882 jones
      <delete file="./${name}-src-${release}.zip"/>
1184 4648 daigle
      <zip zipfile="./${name}-src-${release}.zip"
1185
      	   basedir="${dist.dir}"
1186
      	   excludes="metacat*.tar.gz,metacat*.zip"/>
1187 882 jones
      <delete file="./${name}-src-${release}.tar.gz" />
1188 4648 daigle
      <tar tarfile="./${name}-src-${release}.tar"
1189
      	   basedir="${dist.dir}"
1190
      	   excludes="metacat*.tar.gz,metacat*.zip"/>
1191 1311 berkley
      <gzip zipfile="./${name}-src-${release}.tar.gz"
1192 882 jones
                src="./${name}-src-${release}.tar"/>
1193 4669 daigle
      <delete file="./${name}-src-${release}.tar" />
1194
      <!--delete dir="${dist.dir}"/ -->
1195 1311 berkley
  </target>
1196 4658 daigle
1197
  <target name="deb-package" depends="distbin"
1198
  	  description="create a debian installation package">
1199
  	<delete dir="${deb.pkg.dir}"/>
1200
    <mkdir dir="${deb.pkg.dir}/DEBIAN"/>
1201
  	<copy todir="${deb.pkg.dir}/DEBIAN" filtering="yes">
1202
      <fileset dir="./src/scripts/debian"
1203
               includes="control postinst"/>
1204
    </copy>
1205
1206
    <mkdir dir="${deb.pkg.dir}/usr/share/metacat-${metacat.version}"/>
1207
  	<copy todir="${deb.pkg.dir}/usr/share/metacat-${metacat.version}"
1208
  		  filtering="yes">
1209
      <fileset dir="./src/scripts/debian"
1210
               excludes="control postinst" />
1211
    </copy>
1212
  	<chmod file="${deb.pkg.dir}/DEBIAN/postinst"
1213
  	       perm="755"/>
1214
1215
  	<copy file="${dist.dir}/knb.war"
1216
  		  todir="${deb.pkg.dir}/usr/share/metacat-${metacat.version}"/>
1217
  	<copy file="./metacat-bin-${metacat.version}.tar.gz"
1218
  		  tofile="${deb.pkg.dir}/metacat_${metacat.version}.orig.tar.gz" />
1219
1220
    <exec dir="${pkg.dir}" executable="dpkg" os="Linux, Unix" failonerror="true">
1221
      <arg line="--build debian" />
1222
    </exec>
1223
1224
  	<move file="${pkg.dir}/debian.deb"
1225
  		  tofile="${pkg.dir}/metacat_${metacat.version}${metacat.releaseCandidate}_all.deb"/>
1226
  </target>
1227 806 jones
1228 1702 tao
   <target name="stylesheettest">
1229 1939 brooke
     <xslt in="${input}" out="eml.html" style="${style-common-cvsrelpath}/eml-2.0.0/eml-2.0.0.xsl">
1230 1702 tao
      <param name="displaymodule" expression="${displaymodule}"/>
1231
      <param name="docid" expression="${input}"/>
1232
      <param name="entitytype" expression="${entitytype}"/>
1233
      <param name="entityindex" expression="${entityindex}"/>
1234
      <outputproperty name="method" value="html"/>
1235
      <outputproperty name="standalone" value="yes"/>
1236
      <outputproperty name="encoding" value="iso8859_1"/>
1237
      <outputproperty name="indent" value="yes"/>
1238
    </xslt>
1239
  </target>
1240 2175 tao
1241 3210 tao
1242 1814 tao
  <target name="compilewebclient" depends="prepare">
1243
     <javac srcdir="${build.src}" destdir="${build.dest}" includes="**/application/*.java" classpathref="webservicepath" />
1244
  </target>
1245 2175 tao
1246 1814 tao
  <target name="runwebclient" depends="compilewebclient">
1247 2175 tao
     <java classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
1248 1814 tao
           dir="${build.dest}" fork="yes"
1249
           classpathref="webservicepath" classpath="./lib/utilities.jar" failonerror="true">
1250
         <arg value="${serviceUrl}"/>
1251
         <arg value="${docid}"/>
1252
     </java>
1253
  </target>
1254 2598 harris
1255 2639 harris
  <target name="spatial_option" depends="prepare" description=" -- compiles code for the spatial option">
1256 2598 harris
1257
    <echo message="Compiling the metatcat shapefile creator"/>
1258
    <echo message="using the shapelib at: ${shapelib.dir}"/>
1259
    <exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
1260
     <arg line="./src/spatial/cpp/metacat_shapefile.cpp -I ${shapelib.dir} -c -o build/metacat_shapefile.o" />
1261
    </exec>
1262
1263
    <exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
1264 2639 harris
     <arg line="build/metacat_shapefile.o ${shapelib.dir}/.libs/libshp.a -o bin/metacat_shapefile" />
1265 2598 harris
    </exec>
1266
  </target>
1267
1268 2737 jones
    <!-- LSID Authority support -->
1269
    <patternset id="lsid.jars">
1270
        <include name="axis.jar" />
1271 2772 jones
        <include name="commons-discovery-0.2.jar" />
1272 2737 jones
        <include name="jaxrpc.jar" />
1273
        <include name="lsid-client-1.1.1.jar" />
1274
        <include name="lsid-server-1.1.1.jar" />
1275
        <include name="saaj.jar" />
1276 2772 jones
        <include name="wsdl4j-1.5.1.jar" />
1277 2737 jones
        <include name="activation.jar" />
1278
        <include name="castor-0.9.5.jar" />
1279
        <include name="dnsjava-1.3.2.jar" />
1280
        <include name="mail.jar" />
1281 2778 jones
        <include name="commons-logging-1.0.4.jar" />
1282
        <!-- These jars may be needed but seem to not actually be,
1283
             so leaving them out for now
1284
        <include name="axis-ant.jar" />
1285 2737 jones
        -->
1286
        <!--<include name="GenCastor.class" />-->
1287
    </patternset>
1288
    <patternset id="lib.jars">
1289
        <include name="httpclient.jar" />
1290
        <include name="log4j-1.2.12.jar" />
1291
        <include name="utilities.jar" />
1292
        <include name="xercesImpl.jar" />
1293
        <include name="xalan.jar" />
1294
        <include name="xml-apis.jar" />
1295
    </patternset>
1296
1297
    <path id="lsid.classpath">
1298
        <fileset dir="${lsid.lib.dir}">
1299
            <patternset refid="lsid.jars"/>
1300
        </fileset>
1301
        <fileset dir="${lib.dir}">
1302
            <patternset refid="lsid.jars"/>
1303
        </fileset>
1304 3059 berkley
        <fileset dir="${lib.dir}">
1305 2737 jones
            <include name="xalan.jar" />
1306
            <include name="xml-apis.jar" />
1307
        </fileset>
1308
        <fileset dir="${build.dir}">
1309
            <include name="metacat-client.jar" />
1310
        </fileset>
1311
    </path>
1312
1313
    <filterset id="configFilters">
1314 4080 daigle
        <!-- MCD BYE filter token="LSID_AUTHORITY_HOSTNAME"
1315
                value="${config.hostname}" / -->
1316
        <!-- MCD BYE filter token="LSID_AUTHORITY_PORT"
1317
                value="${config.port}" / -->
1318
        <!-- MCD BYE filter token="METADATA_LABELS"
1319
                value="${config.metadataLabelLsid}" / -->
1320
        <!-- MCD BYE filter token="METACAT_SERVER"
1321
                value="${config.metacatserver}" / -->
1322
        <!-- MCD BYE filter token="LSID_AUTHORITY_STRING"
1323
                value="${config.lsidauthority}" / -->
1324 2737 jones
    </filterset>
1325
1326
    <target name="prepare-lsid"
1327
            depends="prepare,utilities,clientjar"
1328
            description="Configure files prior to compilation">
1329
        <mkdir dir="${lsid.build.dir}" />
1330
        <!-- Copy the properties file into the build -->
1331
        <copy file="${conf.dir}/metacat-lsid.properties"
1332
              tofile="${lsid.build.dir}/WEB-INF/classes/metacat-lsid.properties"
1333
              overwrite="true">
1334
            <filterset refid="configFilters" />
1335
        </copy>
1336 2817 jones
        <copy file="${conf.dir}/log4j.properties"
1337
              tofile="${lsid.build.dir}/WEB-INF/classes/log4j.properties"
1338
              overwrite="true">
1339
            <filterset refid="configFilters" />
1340
        </copy>
1341 2737 jones
        <!-- Copy config files into the build -->
1342
        <copy todir="${lsid.build.dir}/WEB-INF">
1343
            <fileset dir="${webinf.dir}"
1344
                     includes="**/*.wsdd" />
1345
        </copy>
1346
        <!-- Copy the metadata configuration files into the build -->
1347
        <mkdir dir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}" />
1348
        <copy todir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}">
1349
            <fileset dir="${conf.dir}"
1350
                     includes="**/*.xml" />
1351
            <fileset dir="${conf.dir}"
1352
                     includes="**/*.xslt" />
1353
            <filterset refid="configFilters" />
1354
        </copy>
1355
        <!-- Copy services files into the build -->
1356
        <mkdir dir="${lsid.build.dir}/services" />
1357
        <copy todir="${lsid.build.dir}/services">
1358
            <fileset dir="${services.dir}" />
1359
            <filterset refid="configFilters" />
1360
        </copy>
1361 2778 jones
        <!-- Copy axis files into the build -->
1362
        <mkdir dir="${lsid.build.dir}" />
1363
        <copy todir="${lsid.build.dir}">
1364
            <fileset dir="${conf.dir}/axis"
1365
                     excludes="*.properties"/>
1366
        </copy>
1367
        <mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
1368
        <copy todir="${lsid.build.dir}/WEB-INF/classes">
1369
            <fileset dir="${conf.dir}/axis"
1370
                     includes="*.properties"/>
1371
        </copy>
1372 2737 jones
    </target>
1373
1374
    <target name="compile-lsid"
1375
            depends="prepare-lsid"
1376
            description="Compile Java sources">
1377
        <mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
1378
        <javac srcdir="src/edu/ucsb/nceas/metacat/lsid"
1379
               destdir="${lsid.build.dir}/WEB-INF/classes"
1380
               debug="${compile.debug}"
1381
               deprecation="${compile.deprecation}"
1382
               optimize="${compile.optimize}">
1383
            <classpath refid="lsid.classpath" />
1384
        </javac>
1385
    </target>
1386
1387
    <target name="war-lsid"
1388
            depends="compile-lsid"
1389
            description="Create a war file for the application">
1390
        <mkdir dir="${dist.dir}" />
1391
        <war destfile="${dist.dir}/${authority.context}.war"
1392
             webxml="${webinf.dir}/web.xml">
1393
            <fileset dir="${lsid.build.dir}" />
1394
            <lib dir="${lsid.lib.dir}">
1395
                <patternset refid="lsid.jars"/>
1396
            </lib>
1397
            <lib dir="${lib.dir}">
1398
                <patternset refid="lib.jars"/>
1399
            </lib>
1400 3059 berkley
            <lib dir="${lib.dir}">
1401 2737 jones
                <include name="xalan.jar" />
1402
                <include name="xml-apis.jar" />
1403
            </lib>
1404
            <lib dir="${build.dir}">
1405
                <include name="metacat-client.jar" />
1406
            </lib>
1407
        </war>
1408
    </target>
1409
1410
    <target name="deploy-lsid"
1411
            depends="war-lsid"
1412
            description="Deploy LSID war to servlet container">
1413 4720 daigle
        <delete dir="${app.deploy.dir}/${authority.context}" />
1414
        <delete file="${app.deploy.dir}/${authority.context}.war" />
1415
        <mkdir dir="${app.deploy.dir}" />
1416
        <copy todir="${app.deploy.dir}">
1417 2737 jones
            <fileset dir="${dist.dir}" />
1418
        </copy>
1419
    </target>
1420 113 jones
</project>