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