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 931 jones
34 925 berkley
   <target name="oracle">
35 931 jones
     <!-- Customize these properties if you are using oracle -->
36
     <property name="jdbc-connect"
37
               value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
38 925 berkley
     <property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
39
     <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
40
     <property name="oracle_home" value="/oracle01/app/oracle/product/8.1.6" />
41
     <property name="jdbc" value="${oracle_home}/jdbc/lib/classes111.zip" />
42
   </target>
43 1311 berkley
44 925 berkley
   <target name="postgresql">
45 931 jones
     <!-- Customize these properties if you are using postgres -->
46 1311 berkley
     <property name="jdbc-connect"
47 1570 tao
               value="jdbc:postgresql://localhost/exp"/>
48 925 berkley
     <property name="dbDriver" value="org.postgresql.Driver"/>
49 1311 berkley
     <property name="dbAdapter"
50 931 jones
               value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
51 1716 berkley
     <property name="jdbc" value="lib/jdbc7.1-1.2.jar" />
52 925 berkley
   </target>
53 1311 berkley
54 1500 tao
   <target name="config" depends="postgresql">
55 1311 berkley
      <!-- Change the 'depends' attribute above to 'postgresql' to install
56 931 jones
           metacat with postgres instead of oracle -->
57
58
      <!-- Customize these properties for your system -->
59 1455 tao
      <property name="tomcat" value="/usr/local/devtools/jakarta-tomcat" />
60 1722 tao
      <property name="webapps" value="/usr/local/devtools/jakarta-tomcat/webapps" />
61
      <property name="context" value="tao" />
62
      <property name="user" value="tao"/>
63 1538 berkley
      <property name="password" value=""/>
64 1729 tao
      <!-- Tomcat version, if you use tomcat 3, please fill it "tomcat3". If you using tomcat4, please fill it "tomcat4"-->
65
      <property name="tomcatversion" value="tomcat3"/>
66 1716 berkley
67 1722 tao
      <property name="server" value="pine.nceas.ucsb.edu:8080"/>
68
      <property name="systemidserver" value="http://pine.nceas.ucsb.edu:8080" />
69
      <property name="datafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/data" />
70
      <property name="inlinedatafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/inlinedata" />
71
      <property name="debuglevel" value="40" />
72 1716 berkley
73 1292 tao
      <property name="forcereplicationwaitingtime" value="30000"/>
74 1523 tao
      <property name="cvsroot"
75 1722 tao
                value=":ext:tao@cvs.ecoinformatics.org:/cvs" />
76 1311 berkley
      <property name="web-base-url"
77 931 jones
                value="http://knb.ecoinformatics.org"/>
78
      <property name="default-style" value="knb" />
79 1522 berkley
      <property name="morphosourcedir" value="../morpho" />
80 1570 tao
      <property name="defaultcontenttype" value="application/octet-stream" />
81 931 jones
82
      <!-- Make sure these paths match the location of the jar files
83
           on your system, the defaults should usually work -->
84 1311 berkley
      <property name="jsdk"
85 1722 tao
                value="${tomcat}/lib/common/servlet.jar" />
86 1311 berkley
      <property name="xmlp"
87 1376 tao
                value="lib/xercesImpl.jar" />
88 1311 berkley
      <property name="srb"
89 931 jones
                value="lib/srbrmi" />
90 1311 berkley
      <property name="cos"
91 931 jones
                value="lib/cos.jar" />
92 939 tao
      <property name="morpho"
93
                value="lib/morpho.jar" />
94 931 jones
      <property name="xalan"
95
                value="lib/xalan/xalan.jar" />
96
      <property name="apis"
97
                value="lib/xalan/xml-apis.jar" />
98 1103 tao
      <property name="httpclient"
99
                value="${morphosourcedir}/lib/httpclient.jar" />
100
      <property name="itis"
101 1311 berkley
                value="${morphosourcedir}/lib/itislib.jar" />
102 1470 tao
      <property name="emlparser"
103
                value="lib/eml.jar" />
104
      <property name="configxml"
105
                value="lib/configxml.jar" />
106 1578 tao
      <property name="itislib"
107
                value="lib/itislib.jar" />
108 1487 tao
      <property name="emlparser"
109
                value="lib/eml.jar" />
110 1103 tao
  </target>
111
112 931 jones
   <target name="init" depends="config">
113
      <!-- It is less likely you'll need to make any changes from here down,
114
           but customization is possible -->
115
      <property name="installdir" value="${webapps}/${context}" />
116 348 jones
      <property name="name" value="metacat"/>
117
      <property name="Name" value="MetaCat"/>
118 1538 berkley
      <property name="debugprefix" value="${Name}:"/>
119 1339 tao
      <property name="release" value="1.2.1"/>
120 1311 berkley
      <property name="replication-path"
121 931 jones
                value="/${context}/servlet/replication"/>
122
      <property name="servlet-path" value="/${context}/servlet/metacat"/>
123
      <property name="html-path" value="/${context}"/>
124 1437 berkley
      <property name="image-path" value="/${context}" />
125 931 jones
      <property name="style-path" value="/${context}/style"/>
126 923 jones
      <property name="replication-log" value="/tmp/metacatreplication.log"/>
127 1579 tao
      <property name="replicationerrorlog" value="/tmp/metacatreplication.err"/>
128 832 jones
      <property name="config-dir" value="${installdir}" />
129 924 jones
      <property name="eml-module" value="eml" />
130 877 jones
      <property name="eml-version" value="2.0.0beta6" />
131 1227 tao
      <property name="eml-tag" value="RELEASE_EML_2_0_0_BETA_6_REV1" />
132 1722 tao
      <property name="eml2-tag" value="STMML_SCHEMA_UPDATE" />
133 1570 tao
      <property name="eml2namespace" value="eml://ecoinformatics.org/eml-2.0.0" />
134 1718 tao
      <property name="stmmlnamespace" value="http://www.xml-cml.org/schema/stmml" />
135 348 jones
136 1311 berkley
      <property name="cpath"
137 1612 tao
                value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${srb}:${cos}:${morpho}:${emlparser}"/>
138 882 jones
139
      <filter token="docrooturl" value="./" />
140 588 berkley
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
141 882 jones
      <filter token="dbDriver" value="${dbDriver}"/>
142 915 berkley
      <filter token="dbAdapter" value="${dbAdapter}"/>
143 614 bojilova
      <filter token="install-dir" value="${installdir}"/>
144 586 berkley
      <filter token="server" value="${server}"/>
145 977 tao
      <filter token="systemidserver" value="${systemidserver}"/>
146 586 berkley
      <filter token="replication-log" value="${replication-log}"/>
147 1579 tao
      <filter token="replicationerrorlog" value="${replicationerrorlog}"/>
148 348 jones
      <filter token="release" value="${release}"/>
149
      <filter token="servlet-path" value="${servlet-path}"/>
150 359 bojilova
      <filter token="html-path" value="${html-path}"/>
151 362 jones
      <filter token="user" value="${user}"/>
152
      <filter token="password" value="${password}"/>
153 409 berkley
      <filter token="image-path" value="${image-path}"/>
154 828 jones
      <filter token="style-path" value="${style-path}"/>
155 506 jones
      <filter token="web-base-url" value="${web-base-url}"/>
156 525 berkley
      <filter token="replication-path" value="${replication-path}"/>
157 832 jones
      <filter token="config-dir" value="${config-dir}"/>
158
      <filter token="default-style" value="${default-style}"/>
159 877 jones
      <filter token="eml-version" value="${eml-version}"/>
160 1570 tao
      <filter token="eml2namespace" value="${eml2namespace}"/>
161 1718 tao
      <filter token="stmmlnamespace" value="${stmmlnamespace}"/>
162 1009 tao
      <filter token="context" value="${context}"/>
163 1292 tao
      <filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" />
164 1051 tao
      <filter token="debuglevel" value="${debuglevel}" />
165 1079 tao
      <filter token="datafilepath" value="${datafilepath}" />
166 1455 tao
      <filter token="inlinedatafilepath" value="${inlinedatafilepath}" />
167 1522 berkley
      <filter token="defaultcontenttype" value="${defaultcontenttype}" />
168 1538 berkley
      <filter token="debugprefix" value="${debugprefix}"/>
169 1487 tao
170 254 jones
      <property name="srcdir" value="./src" />
171 1116 tao
      <property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
172
      <property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
173 348 jones
      <property name="build.dir" value="./build"/>
174
      <property name="build.src" value="${build.dir}/src"/>
175
      <property name="build.dest" value="${build.dir}/classes"/>
176 516 jones
      <property name="build.docs" value="${build.dir}/docs"/>
177 348 jones
      <property name="build.samples" value="${build.dir}/samples"/>
178
      <property name="build.tests" value="${build.dir}/tests"/>
179 1116 tao
      <property name="build.metacattest" value="${build.tests}/metacattest"/>
180
      <property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
181 348 jones
      <property name="build.data" value="${build.dir}/data"/>
182 806 jones
      <property name="build.javadocs" value="${build.dir}/docs/api"/>
183 1437 berkley
      <property name="build.img" value="${installdir}"/>
184 348 jones
185 882 jones
      <property name="dist.dir" value="dist"/>
186 806 jones
      <property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
187
      <property name="ver.src" value="${ver.dir}/src"/>
188
189 254 jones
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
190 113 jones
   </target>
191 1311 berkley
192 348 jones
   <target name="prepare" depends="init">
193
      <mkdir dir="${build.dir}"/>
194
      <mkdir dir="${build.src}"/>
195
      <mkdir dir="${build.dest}"/>
196 516 jones
      <mkdir dir="${build.javadocs}"/>
197 348 jones
198 822 jones
      <copy todir="${build.src}" filtering="yes">
199
        <fileset dir="${srcdir}">
200
          <include name="edu/**"/>
201
          <include name="com/**"/>
202 877 jones
          <include name="**/*.sql"/>
203 822 jones
          <exclude name="**/CVS*"/>
204
          <exclude name="**/.#*"/>
205 1702 tao
          <exclude name="edu/ucsb/nceas/metacat/harvesterClient/*.*"/>
206 822 jones
        </fileset>
207
      </copy>
208 348 jones
   </target>
209
210
   <target name="compile" depends="prepare">
211 1311 berkley
       <javac srcdir="${build.src}"
212
              destdir="${build.dest}"
213
              classpath="${cpath}"
214
              excludes="**/*.sql" />
215
       <copy file="lib/metacat.properties"
216
             tofile="${build.dest}/${package.home}/metacat.properties"
217 822 jones
             filtering="yes" />
218 1311 berkley
       <copy file="lib/srbProps.properties"
219 822 jones
             tofile="${build.dest}/${package.home}/srbProps.properties"/>
220 1311 berkley
   </target>
221 113 jones
222 204 jones
   <target name="jar" depends="compile">
223 353 jones
       <delete file="${build.dir}/${name}.jar" />
224 822 jones
       <copy todir="${build.dest}">
225
         <fileset dir="lib/srbrmi"/>
226
       </copy>
227 635 jones
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
228
            excludes="**/protocols/" />
229 1311 berkley
   </target>
230
231 635 jones
   <target name="protocol" depends="compile">
232
       <delete file="${build.dir}/protocol.jar" />
233
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
234
            includes="**/protocols/" />
235 1311 berkley
   </target>
236 113 jones
237 1612 tao
   <target name="getdtdschema" depends="prepare">
238
     <echo>Enter CVS password: </echo>
239
     <cvs cvsRoot="${cvsroot}"
240
          package="${eml-module}"
241
          tag="${eml-tag}"
242
          dest="${build.src}" />
243
     <mkdir dir="lib/dtd" />
244
     <copy todir="lib/dtd" filtering="yes">
245
       <fileset dir="${build.src}/${eml-module}">
246
         <include name="*.dtd"/>
247
       </fileset>
248
       <mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
249
     </copy>
250
     <echo>Enter CVS password: </echo>
251
     <cvs cvsRoot="${cvsroot}"
252
          package="${eml-module}"
253
          tag="${eml2-tag}"
254
          dest="${build.src}" />
255
     <mkdir dir="lib/schema" />
256
     <copy todir="lib/schema" filtering="yes">
257
       <fileset dir="${build.src}/${eml-module}">
258
         <include name="*.xsd"/>
259
       </fileset>
260
     </copy>
261
     <copy todir="lib/style">
262
       <fileset dir="${build.src}/${eml-module}/style">
263
       <include name="*.xsl"/>
264
     </fileset>
265
     </copy>
266
   </target>
267
268 877 jones
   <target name="getdtd" depends="prepare">
269 1307 jones
     <echo>Enter CVS password: </echo>
270
     <cvs cvsRoot="${cvsroot}"
271
          package="${eml-module}"
272
          tag="${eml-tag}"
273
          dest="${build.src}" />
274
     <mkdir dir="lib/dtd" />
275
     <copy todir="lib/dtd" filtering="yes">
276
       <fileset dir="${build.src}/${eml-module}">
277
         <include name="*.dtd"/>
278
       </fileset>
279
       <mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
280
     </copy>
281 1463 tao
   </target>
282 1522 berkley
283 1463 tao
   <target name="getschema" depends="prepare">
284
     <echo>Enter CVS password: </echo>
285
     <cvs cvsRoot="${cvsroot}"
286
          package="${eml-module}"
287
          tag="${eml2-tag}"
288
          dest="${build.src}" />
289
     <mkdir dir="lib/schema" />
290
     <copy todir="lib/schema" filtering="yes">
291
       <fileset dir="${build.src}/${eml-module}">
292
         <include name="*.xsd"/>
293
       </fileset>
294
     </copy>
295 1314 tao
     <copy todir="lib/style">
296 1307 jones
       <fileset dir="${build.src}/${eml-module}/style">
297 1311 berkley
       <include name="*.xsl"/>
298
     </fileset>
299 1307 jones
     </copy>
300 1522 berkley
   </target>
301 877 jones
302 1593 tao
   <target name="dtdschemasql" depends="prepare">
303 877 jones
     <echo/>
304
     <echo>Registering the DTDs with the new Metacat instance...</echo>
305
     <sql driver="${dbDriver}"
306
          classpath="${jdbc}"
307
          url="${jdbc-connect}"
308
          userid="${user}"
309
          password="${password}"
310 1593 tao
          src="${build.src}/loaddtdschema.sql" />
311 877 jones
   </target>
312 1716 berkley
313 1570 tao
   <target name="schemasql" depends="prepare">
314
     <echo/>
315
     <echo>Registering the DTDs with the new Metacat instance...</echo>
316
     <sql driver="${dbDriver}"
317
          classpath="${jdbc}"
318
          url="${jdbc-connect}"
319
          userid="${user}"
320
          password="${password}"
321
          src="${build.src}/loadschema.sql" />
322
   </target>
323 877 jones
324 204 jones
   <target name="install" depends="jar">
325 1079 tao
       <mkdir dir="${datafilepath}" />
326 1455 tao
       <mkdir dir="${inlinedatafilepath}" />
327 1079 tao
       <chmod dir="${datafilepath}" perm="ug+w" />
328 329 jones
       <mkdir dir="${installdir}/WEB-INF/lib" />
329 1311 berkley
       <copy file="${build.dir}/${name}.jar"
330 822 jones
             tofile="${installdir}/WEB-INF/lib/${name}.jar" />
331 1311 berkley
       <copy file="${xmlp}"
332 1376 tao
             tofile="${installdir}/WEB-INF/lib/xercesImpl.jar" />
333 1311 berkley
       <copy file="${xalan}"
334 923 jones
             tofile="${installdir}/WEB-INF/lib/xalan.jar" />
335 1311 berkley
       <copy file="${apis}"
336 923 jones
             tofile="${installdir}/WEB-INF/lib/xml-apis.jar" />
337 1311 berkley
       <copy file="${jdbc}"
338 1522 berkley
             tofile="${installdir}/WEB-INF/lib/jdbc.jar" />
339 1311 berkley
       <copy file="${cos}"
340 822 jones
             tofile="${installdir}/WEB-INF/lib/cos.jar" />
341 939 tao
       <copy file="${morpho}"
342 1470 tao
             tofile="${installdir}/WEB-INF/lib/morpho.jar" />
343
       <copy file="${emlparser}"
344 1522 berkley
             tofile="${installdir}/WEB-INF/lib/eml.jar" />
345 1470 tao
       <copy file="${configxml}"
346
             tofile="${installdir}/WEB-INF/lib/configxml.jar" />
347 1578 tao
       <copy file="${itislib}"
348
             tofile="${installdir}/WEB-INF/lib/itislib.jar" />
349 1729 tao
       <copy file="lib/web.xml.${tomcatversion}"
350 822 jones
             tofile="${installdir}/WEB-INF/web.xml" />
351
       <copy todir="${build.img}" filtering="no">
352
         <fileset dir="lib">
353
           <include name="**/*.jpg"/>
354
           <include name="**/*.png"/>
355
           <include name="**/*.gif"/>
356
         </fileset>
357
       </copy>
358
       <copy todir="${installdir}" filtering="yes">
359
         <fileset dir="lib">
360
           <exclude name="*.jar"/>
361
           <exclude name="*.properties"/>
362
           <exclude name="web.xml"/>
363
           <exclude name="**/srbrmi*"/>
364 1437 berkley
           <exclude name="**/*.jpg"/>
365
           <exclude name="**/*.png"/>
366
           <exclude name="**/*.gif"/>
367 822 jones
         </fileset>
368
       </copy>
369 877 jones
       <echo>
370
             ***********************************************************
371
              Remember to register the default DTDs by running the
372
              "${build.src}/loaddtd.sql script". This is most easily
373
              done by using the "ant dtdsql" which will run it for you.
374
             ***********************************************************
375
       </echo>
376 1311 berkley
   </target>
377
378 971 tao
   <target name="test" depends="install">
379
      <!-- copy and compile the tests into a jar file -->
380 1116 tao
      <mkdir dir="${build.metacattest}"/>
381 1049 tao
      <javac srcdir="${junittestsdir}"
382 1116 tao
             destdir="${build.metacattest}"
383 1049 tao
             classpath="${cpath}:${build.dir}/${name}.jar"
384 1612 tao
             debug="on"
385 1311 berkley
       includes="**/*.java" />
386 204 jones
387 1311 berkley
      <jar jarfile="${build.dir}/${name}-junittests.jar"
388
        basedir="${build.metacattest}"
389
                includes="**/*.class" />
390 971 tao
391
      <!-- use the ant "junit" task to run JUnit tests. -->
392
      <junit printsummary="yes" haltonfailure="no" fork="no"
393
             haltonerror="no">
394
        <classpath>
395 1049 tao
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-junittests.jar" />
396 971 tao
        </classpath>
397
398
        <formatter type="plain" />
399
400
        <batchtest fork="yes" todir="${build.dir}">
401 1116 tao
          <fileset dir="${build.metacattest}">
402
            <include name="**/*.class" />
403 971 tao
          </fileset>
404
        </batchtest>
405
     </junit>
406
   </target>
407 1103 tao
408 1500 tao
    <target name="runonetest" depends="install">
409
      <!-- copy and compile the tests into a jar file -->
410
      <!--<property name="testtorun" value="SubTreeTest"/> -->
411
      <echo>testtorun: ${testtorun}</echo>
412
      <mkdir dir="${build.metacattest}"/>
413
      <javac srcdir="${junittestsdir}"
414
             destdir="${build.metacattest}"
415
             classpath="${cpath}:${build.dir}/${name}.jar"
416
       includes="**/*.java" />
417
418
      <jar jarfile="${build.dir}/${name}-junittests.jar"
419
        basedir="${build.metacattest}"
420
                includes="**/*.class" />
421
422
      <!-- use the ant "junit" task to run JUnit tests. -->
423
      <junit printsummary="yes" haltonfailure="no" fork="no"
424
             haltonerror="no">
425
        <classpath>
426
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-junittests.jar" />
427
        </classpath>
428
429
        <formatter type="plain" />
430
431
        <batchtest fork="yes" todir="${build.dir}">
432
          <fileset dir="${build.metacattest}">
433 1522 berkley
434 1500 tao
            <include name="**/${testtorun}.class" />
435
          </fileset>
436
        </batchtest>
437
     </junit>
438
   </target>
439
440 1103 tao
  <target name="gethttpclient" depends="prepare">
441 1311 berkley
  <!--mkdir dir="${morphosourcedir}" -->
442 1487 tao
        <cvs cvsRoot="${cvsroot}"
443 1103 tao
             package="morpho"
444
             dest="." />
445 1107 tao
        <ant dir="${morphosourcedir}" inheritAll="false"  target="jar" />
446 1103 tao
   </target>
447
448
   <!-- run this target, we need to check out a another morpho souce dir was checked out. -->
449
   <target name="nettest" depends="install">
450
      <echo>***********************************
451 1311 berkley
      Please run ant gethttpclient first!
452
      ***********************************
453 1103 tao
      </echo>
454
      <!-- copy and compile the tests into a jar file -->
455 1116 tao
      <mkdir dir="${build.metacatnettest}"/>
456 1103 tao
      <javac srcdir="${junitnettestsdir}"
457 1116 tao
             destdir="${build.metacatnettest}"
458 1103 tao
             classpath="${cpath}:${build.dir}/${name}.jar:${httpclient}"
459
             includes="**/*.java" />
460
461
      <jar jarfile="${build.dir}/${name}-junitnettests.jar"
462 1116 tao
                    basedir="${build.metacatnettest}"
463 1103 tao
                    includes="**/*.class" />
464
465
      <!-- use the ant "junit" task to run JUnit tests. -->
466 1107 tao
      <junit printsummary="yes" haltonfailure="no" fork="yes"
467 1103 tao
             haltonerror="no">
468 1107 tao
        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
469 1103 tao
        <classpath>
470
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${httpclient}:${build.dir}/${name}-junitnettests.jar:${itis}" />
471
        </classpath>
472
473
        <formatter type="plain" />
474
475
        <batchtest fork="yes" todir="${build.dir}">
476 1116 tao
          <fileset dir="${build.metacatnettest}">
477
            <include name="**/*.class" />
478 1103 tao
          </fileset>
479
        </batchtest>
480
     </junit>
481 1311 berkley
   </target>
482 1103 tao
483 1522 berkley
   <target name="servletclean" depends="clean">
484
     <delete dir="${installdir}" />
485
   </target>
486
487
488 113 jones
   <target name="clean" depends="init">
489 822 jones
       <delete dir="${build.dir}" />
490 113 jones
   </target>
491
492 516 jones
   <target name="jdoc" depends="prepare">
493 822 jones
       <javadoc packagenames="edu.ucsb.nceas.*"
494 516 jones
           sourcepath="${build.src}"
495
           destdir="${build.javadocs}"
496 113 jones
           author="true"
497
           version="true"
498
           use="true"
499 348 jones
           windowtitle="${Name} API"
500
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
501 113 jones
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
502
       />
503
   </target>
504
505 1724 tao
   <target name="dist" depends="jar,protocol,jdoc,getdtd,getschema">
506 806 jones
      <mkdir dir="${dist.dir}"/>
507
      <delete dir="${ver.dir}" />
508
      <mkdir dir="${ver.dir}"/>
509
      <copy todir="${ver.dir}">
510 1311 berkley
        <fileset dir="."
511 882 jones
            excludes="**/CVS* **/.#* **/src* **/test* **/build* **/docs* ${dist.dir}"/>
512 806 jones
      </copy>
513
      <copy todir="${ver.dir}" file="build.xml"/>
514
      <copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
515
      <copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
516 882 jones
517
      <copy todir="${ver.dir}/docs" filtering="yes">
518
        <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
519
      </copy>
520
      <copy todir="${ver.dir}/docs" filtering="no">
521
        <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
522
      </copy>
523 806 jones
      <copy todir="${ver.dir}/docs/dev">
524
        <fileset dir="${build.dir}/docs"/>
525
      </copy>
526 917 berkley
      <copy todir="${ver.dir}/src">
527
        <fileset dir="${build.dir}/src"/>
528
      </copy>
529
530 992 berkley
      <delete dir="./${ver.dir}/${build.dir}"/>
531
      <delete dir="./${ver.dir}/dist"/>
532 882 jones
      <delete file="./${name}-${release}.zip"/>
533 1312 tao
      <zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
534 882 jones
      <delete file="./${name}-${release}.tar.gz" />
535 1312 tao
      <tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
536 1311 berkley
      <gzip zipfile="./${name}-${release}.tar.gz"
537 882 jones
                src="./${name}-${release}.tar"/>
538
      <delete file="./${name}-${release}.tar" />
539 1311 berkley
  </target>
540 806 jones
541
  <target name="distsrc" depends="dist">
542
      <mkdir dir="${ver.src}"/>
543
      <copy todir="${ver.src}">
544
        <fileset dir="./src"/>
545
      </copy>
546
547 882 jones
      <delete file="./${name}-src-${release}.zip"/>
548
      <zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
549
      <delete file="./${name}-src-${release}.tar.gz" />
550
      <tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
551 1311 berkley
      <gzip zipfile="./${name}-src-${release}.tar.gz"
552 882 jones
                src="./${name}-src-${release}.tar"/>
553
      <delete file="./${name}-src-${release}.tar" />
554 807 jones
      <delete dir="${dist.dir}"/>
555 1311 berkley
  </target>
556 806 jones
557 1702 tao
   <target name="stylesheettest">
558
     <xslt in="${input}" out="eml.html" style="lib/style/eml2/eml-2.0.0.xsl">
559
      <param name="displaymodule" expression="${displaymodule}"/>
560
      <param name="docid" expression="${input}"/>
561
      <param name="entitytype" expression="${entitytype}"/>
562
      <param name="entityindex" expression="${entityindex}"/>
563
      <outputproperty name="method" value="html"/>
564
      <outputproperty name="standalone" value="yes"/>
565
      <outputproperty name="encoding" value="iso8859_1"/>
566
      <outputproperty name="indent" value="yes"/>
567
    </xslt>
568
  </target>
569 1716 berkley
570 113 jones
</project>