Project

General

Profile

1
<?xml version="1.0"?>
2
<!--
3
  *   '$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
  *
9
  *    '$Author: tao $'
10
  *    '$Date: 2003-07-21 17:26:18 -0700 (Mon, 21 Jul 2003) $'
11
  *    '$Revision: 1744 $'
12
  *
13
  * Build file for the Ant cross-platform build system for metacat
14
  * See http://jakarta.apache.org for details on Ant
15
  *
16
  * usage: ant [compile|jar|install|jdoc]
17
  *
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
-->
32
<project name="metacat" default="jar" basedir=".">
33
  <target name="oracle">
34
     <!-- Customize these properties if you are using oracle -->
35
     <property name="jdbc-connect"
36
               value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
37
     <property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
38
     <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
39
     <property name="oracle_home" value="/oracle01/app/oracle/product/8.1.6" />
40
     <property name="jdbc" value="${oracle_home}/jdbc/lib/classes111.zip" />
41
     <!-- Property to indicate is not MSSQL installation-->
42
     <property name="other" value="yes"/>
43
   </target>
44

    
45
   <target name="postgresql">
46
     <!-- Customize these properties if you are using postgres -->
47
     <property name="jdbc-connect"
48
               value="jdbc:postgresql://localhost/exp"/>
49
     <property name="dbDriver" value="org.postgresql.Driver"/>
50
     <property name="dbAdapter"
51
               value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
52
     <property name="jdbc" value="lib/jdbc7.1-1.2.jar" />
53
     <!-- Property to indicate is not MSSQL installation-->
54
     <property name="other" value="yes"/>
55
    </target>
56
   
57
   <target name="sqlserver">
58
     <!-- Customize these properties if you are using SQL server -->
59
     <property name="jdbc-connect"
60
               value="jdbc:microsoft:sqlserver://fatali.nceas.ucsb.edu:1433"/>
61
     <property name="dbDriver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
62
     <property name="dbAdapter"
63
               value="edu.ucsb.nceas.dbadapter.SqlserverAdapter"/>
64
     <property name="jdbc-base" value="F:\\Program Files\\Microsoft SQL Server 2000 Driver for JDBC\\lib" />
65
     <property name="jdbc" value="${jdbc-base}/msbase.jar" />
66
     <property name="jdbc-add1" value="${jdbc-base}/msutil.jar" />
67
     <property name="jdbc-add2" value="${jdbc-base}/mssqlserver.jar" />
68
     <!-- Property to indicate is a MSSQL installation-->
69
     <property name="MSSQL" value="yes"/>
70
   </target>
71

    
72
   <target name="config" depends="postgresql">
73
      <!-- Change the 'depends' attribute above to 'postgresql' to install
74
           metacat with postgres instead of oracle -->
75

    
76
      <!-- Customize these properties for your system -->
77
      <property name="tomcat" value="/usr/local/devtools/jakarta-tomcat" />
78
      <property name="webapps" value="/usr/local/devtools/jakarta-tomcat/webapps" />
79
      <property name="context" value="tao" />
80
      <property name="user" value="tao"/>
81
      <property name="password" value="tdataint"/>
82
      <!-- Tomcat version, if you use tomcat 3, please fill it "tomcat3". If you using tomcat4, please fill it "tomcat4"-->
83
      <property name="tomcatversion" value="tomcat3"/>
84

    
85
      <property name="server" value="pine.nceas.ucsb.edu:8443"/>
86
      <property name="systemidserver" value="http://pine.nceas.ucsb.edu:8080" />
87
      <property name="datafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/data" />
88
      <property name="inlinedatafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/inlinedata" />
89
      <property name="debuglevel" value="40" />
90

    
91
      <property name="forcereplicationwaitingtime" value="30000"/>
92
      <property name="cvsroot"
93
                value=":ext:tao@cvs.ecoinformatics.org:/cvs" />
94
      <property name="web-base-url"
95
                value="http://knb.ecoinformatics.org"/>
96
      <property name="default-style" value="knb" />
97
      <property name="morphosourcedir" value="../morpho" />
98
      <property name="defaultcontenttype" value="application/octet-stream" />
99

    
100
      <!-- Make sure these paths match the location of the jar files
101
           on your system, the defaults should usually work -->
102
      <property name="jsdk"
103
                value="${tomcat}/common/lib/servlet.jar" />
104
      <property name="xmlp"
105
                value="lib/xercesImpl.jar" />
106
      <property name="srb"
107
                value="lib/srbrmi" />
108
      <property name="cos"
109
                value="lib/cos.jar" />
110
      <property name="morpho"
111
                value="lib/morpho.jar" />
112
      <property name="xalan"
113
                value="lib/xalan/xalan.jar" />
114
      <property name="apis"
115
                value="lib/xalan/xml-apis.jar" />
116
      <property name="httpclient"
117
                value="${morphosourcedir}/lib/httpclient.jar" />
118
      <property name="itis"
119
                value="${morphosourcedir}/lib/itislib.jar" />
120
      <property name="emlparser"
121
                value="lib/eml.jar" />
122
      <property name="configxml"
123
                value="lib/configxml.jar" />
124
      <property name="itislib"
125
                value="lib/itislib.jar" />
126
      <property name="emlparser"
127
                value="lib/eml.jar" />
128
  </target>
129

    
130
   <target name="init" depends="config">
131
      <!-- It is less likely you'll need to make any changes from here down,
132
           but customization is possible -->
133
      <property name="installdir" value="${webapps}/${context}" />
134
      <property name="name" value="metacat"/>
135
      <property name="Name" value="MetaCat"/>
136
      <property name="debugprefix" value="${Name}:"/>
137
      <property name="release" value="1.2.1"/>
138
      <property name="replication-path"
139
                value="/${context}/servlet/replication"/>
140
      <property name="servlet-path" value="/${context}/servlet/metacat"/>
141
      <property name="html-path" value="/${context}"/>
142
      <property name="image-path" value="/${context}" />
143
      <property name="style-path" value="/${context}/style"/>
144
      <property name="replication-log" value="/tmp/metacatreplication.log"/>
145
      <property name="replicationerrorlog" value="/tmp/metacatreplication.err"/>
146
      <property name="config-dir" value="${installdir}" />
147
      <property name="eml-module" value="eml" />
148
      <property name="eml-version" value="2.0.0beta6" />
149
      <property name="eml-tag" value="RELEASE_EML_2_0_0_BETA_6_REV1" />
150
      <property name="eml2-tag" value="STMML_SCHEMA_UPDATE" />
151
      <property name="eml2namespace" value="eml://ecoinformatics.org/eml-2.0.0" />
152
      <property name="stmmlnamespace" value="http://www.xml-cml.org/schema/stmml" />
153

    
154
      <property name="cpath"
155
                value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${srb}:${cos}:${morpho}:${emlparser}:${jdbc-add1}:${jdbc-add2}"/>
156

    
157
      <filter token="docrooturl" value="./" />
158
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
159
      <filter token="dbDriver" value="${dbDriver}"/>
160
      <filter token="dbAdapter" value="${dbAdapter}"/>
161
      <filter token="install-dir" value="${installdir}"/>
162
      <filter token="server" value="${server}"/>
163
      <filter token="systemidserver" value="${systemidserver}"/>
164
      <filter token="replication-log" value="${replication-log}"/>
165
      <filter token="replicationerrorlog" value="${replicationerrorlog}"/>
166
      <filter token="release" value="${release}"/>
167
      <filter token="servlet-path" value="${servlet-path}"/>
168
      <filter token="html-path" value="${html-path}"/>
169
      <filter token="user" value="${user}"/>
170
      <filter token="password" value="${password}"/>
171
      <filter token="image-path" value="${image-path}"/>
172
      <filter token="style-path" value="${style-path}"/>
173
      <filter token="web-base-url" value="${web-base-url}"/>
174
      <filter token="replication-path" value="${replication-path}"/>
175
      <filter token="config-dir" value="${config-dir}"/>
176
      <filter token="default-style" value="${default-style}"/>
177
      <filter token="eml-version" value="${eml-version}"/>
178
      <filter token="eml2namespace" value="${eml2namespace}"/>
179
      <filter token="stmmlnamespace" value="${stmmlnamespace}"/>
180
      <filter token="context" value="${context}"/>
181
      <filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" />
182
      <filter token="debuglevel" value="${debuglevel}" />
183
      <filter token="datafilepath" value="${datafilepath}" />
184
      <filter token="inlinedatafilepath" value="${inlinedatafilepath}" />
185
      <filter token="defaultcontenttype" value="${defaultcontenttype}" />
186
      <filter token="debugprefix" value="${debugprefix}"/>
187

    
188
      <property name="srcdir" value="./src" />
189
      <property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
190
      <property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
191
      <property name="build.dir" value="./build"/>
192
      <property name="build.src" value="${build.dir}/src"/>
193
      <property name="build.dest" value="${build.dir}/classes"/>
194
      <property name="build.docs" value="${build.dir}/docs"/>
195
      <property name="build.samples" value="${build.dir}/samples"/>
196
      <property name="build.tests" value="${build.dir}/tests"/>
197
      <property name="build.metacattest" value="${build.tests}/metacattest"/>
198
      <property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
199
      <property name="build.data" value="${build.dir}/data"/>
200
      <property name="build.javadocs" value="${build.dir}/docs/api"/>
201
      <property name="build.img" value="${installdir}"/>
202

    
203
      <property name="dist.dir" value="dist"/>
204
      <property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
205
      <property name="ver.src" value="${ver.dir}/src"/>
206

    
207
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
208
   </target>
209

    
210
   <target name="prepare" depends="init">
211
      <mkdir dir="${build.dir}"/>
212
      <mkdir dir="${build.src}"/>
213
      <mkdir dir="${build.dest}"/>
214
      <mkdir dir="${build.javadocs}"/>
215

    
216
      <copy todir="${build.src}" filtering="yes">
217
        <fileset dir="${srcdir}">
218
          <include name="edu/**"/>
219
          <include name="com/**"/>
220
          <include name="**/*.sql"/>
221
          <exclude name="**/CVS*"/>
222
          <exclude name="**/.#*"/>
223
          <exclude name="edu/ucsb/nceas/metacat/harvesterClient/*.*"/>
224
        </fileset>
225
      </copy>
226
   </target>
227

    
228
   <target name="compile" depends="prepare">
229
       <javac srcdir="${build.src}"
230
              destdir="${build.dest}"
231
              classpath="${cpath}"
232
              excludes="**/*.sql" />
233
       <copy file="lib/metacat.properties"
234
             tofile="${build.dest}/${package.home}/metacat.properties"
235
             filtering="yes" />
236
       <copy file="lib/srbProps.properties"
237
             tofile="${build.dest}/${package.home}/srbProps.properties"/>
238
   </target>
239

    
240
   <target name="jar" depends="compile">
241
       <delete file="${build.dir}/${name}.jar" />
242
       <copy todir="${build.dest}">
243
         <fileset dir="lib/srbrmi"/>
244
       </copy>
245
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
246
            excludes="**/protocols/" />
247
   </target>
248

    
249
   <target name="protocol" depends="compile">
250
       <delete file="${build.dir}/protocol.jar" />
251
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
252
            includes="**/protocols/" />
253
   </target>
254

    
255
   <target name="getdtdschema" depends="prepare">
256
     <echo>Enter CVS password: </echo>
257
     <cvs cvsRoot="${cvsroot}"
258
          package="${eml-module}"
259
          tag="${eml-tag}"
260
          dest="${build.src}" />
261
     <mkdir dir="lib/dtd" />
262
     <copy todir="lib/dtd" filtering="yes">
263
       <fileset dir="${build.src}/${eml-module}">
264
         <include name="*.dtd"/>
265
       </fileset>
266
       <mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
267
     </copy>
268
     <echo>Enter CVS password: </echo>
269
     <cvs cvsRoot="${cvsroot}"
270
          package="${eml-module}"
271
          tag="${eml2-tag}"
272
          dest="${build.src}" />
273
     <mkdir dir="lib/schema" />
274
     <copy todir="lib/schema" filtering="yes">
275
       <fileset dir="${build.src}/${eml-module}">
276
         <include name="*.xsd"/>
277
       </fileset>
278
     </copy>
279
     <copy todir="lib/style">
280
       <fileset dir="${build.src}/${eml-module}/style">
281
       <include name="*.xsl"/>
282
     </fileset>
283
     </copy>
284
   </target>
285

    
286
   <target name="getdtd" depends="prepare">
287
     <echo>Enter CVS password: </echo>
288
     <cvs cvsRoot="${cvsroot}"
289
          package="${eml-module}"
290
          tag="${eml-tag}"
291
          dest="${build.src}" />
292
     <mkdir dir="lib/dtd" />
293
     <copy todir="lib/dtd" filtering="yes">
294
       <fileset dir="${build.src}/${eml-module}">
295
         <include name="*.dtd"/>
296
       </fileset>
297
       <mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
298
     </copy>
299
   </target>
300

    
301
   <target name="getschema" depends="prepare">
302
     <echo>Enter CVS password: </echo>
303
     <cvs cvsRoot="${cvsroot}"
304
          package="${eml-module}"
305
          tag="${eml2-tag}"
306
          dest="${build.src}" />
307
     <mkdir dir="lib/schema" />
308
     <copy todir="lib/schema" filtering="yes">
309
       <fileset dir="${build.src}/${eml-module}">
310
         <include name="*.xsd"/>
311
       </fileset>
312
     </copy>
313
     <copy todir="lib/style">
314
       <fileset dir="${build.src}/${eml-module}/style">
315
       <include name="*.xsl"/>
316
     </fileset>
317
     </copy>
318
   </target>
319

    
320
   <target name="dtdschemasql" depends="prepare">
321
     <echo/>
322
     <echo>Registering the DTDs with the new Metacat instance...</echo>
323
     <sql driver="${dbDriver}"
324
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
325
          url="${jdbc-connect}"
326
          userid="${user}"
327
          password="${password}"
328
          src="${build.src}/loaddtdschema.sql" />
329
   </target>
330

    
331
   <target name="schemasql" depends="prepare">
332
     <echo/>
333
     <echo>Registering the DTDs with the new Metacat instance...</echo>
334
     <sql driver="${dbDriver}"
335
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
336
          url="${jdbc-connect}"
337
          userid="${user}"
338
          password="${password}"
339
          src="${build.src}/loadschema.sql" />
340
   </target>
341
  
342
   <target name="installCommon" depends="jar">
343
       <mkdir dir="${datafilepath}" />
344
       <mkdir dir="${inlinedatafilepath}" />
345
       <chmod dir="${datafilepath}" perm="ug+w" />
346
       <mkdir dir="${installdir}/WEB-INF/lib" />
347
       <copy file="${build.dir}/${name}.jar"
348
             tofile="${installdir}/WEB-INF/lib/${name}.jar" />
349
       <copy file="${xmlp}"
350
             tofile="${installdir}/WEB-INF/lib/xercesImpl.jar" />
351
       <copy file="${xalan}"
352
             tofile="${installdir}/WEB-INF/lib/xalan.jar" />
353
       <copy file="${apis}"
354
             tofile="${installdir}/WEB-INF/lib/xml-apis.jar" />
355
       <copy file="${jdbc}"
356
             tofile="${installdir}/WEB-INF/lib/jdbc.jar" />
357
       <copy file="${cos}"
358
             tofile="${installdir}/WEB-INF/lib/cos.jar" />
359
       <copy file="${morpho}"
360
             tofile="${installdir}/WEB-INF/lib/morpho.jar" />
361
       <copy file="${emlparser}"
362
             tofile="${installdir}/WEB-INF/lib/eml.jar" />
363
       <copy file="${configxml}"
364
             tofile="${installdir}/WEB-INF/lib/configxml.jar" />
365
       <copy file="${itislib}"
366
             tofile="${installdir}/WEB-INF/lib/itislib.jar" />
367
       <copy file="lib/web.xml.${tomcatversion}"
368
             tofile="${installdir}/WEB-INF/web.xml" />
369
       <copy todir="${build.img}" filtering="no">
370
         <fileset dir="lib">
371
           <include name="**/*.jpg"/>
372
           <include name="**/*.png"/>
373
           <include name="**/*.gif"/>
374
         </fileset>
375
       </copy>
376
       <copy todir="${installdir}" filtering="yes">
377
         <fileset dir="lib">
378
           <exclude name="*.jar"/>
379
           <exclude name="*.properties"/>
380
           <exclude name="web.xml"/>
381
           <exclude name="**/srbrmi*"/>
382
           <exclude name="**/*.jpg"/>
383
           <exclude name="**/*.png"/>
384
           <exclude name="**/*.gif"/>
385
         </fileset>
386
       </copy>
387
       <echo>
388
             ***********************************************************
389
              Remember to register the default DTDs by running the
390
              "${build.src}/loaddtd.sql script". This is most easily
391
              done by using the "ant dtdsql" which will run it for you.
392
             ***********************************************************
393
       </echo>
394
   </target>
395
   
396
   <target name="installMSSQL" if="MSSQL" depends="installCommon">
397
      <echo> Install MSSQL</echo>
398
      <copy file="${jdbc-add1}"
399
             tofile="${installdir}/WEB-INF/lib/msutil.jar" />
400
       <copy file="${jdbc-add2}"
401
             tofile="${installdir}/WEB-INF/lib/mssqlserver.jar" />
402
   </target>
403
   
404
    <target name="installother" if="other" depends="installCommon">
405
        <echo> Install Other Database</echo>
406
   </target>
407
   
408
   <target name="install" depends="installMSSQL, installother">
409
     
410
   </target>
411
   
412
   
413

    
414
   <target name="test" depends="install">
415
      <!-- copy and compile the tests into a jar file -->
416
      <mkdir dir="${build.metacattest}"/>
417
      <javac srcdir="${junittestsdir}"
418
             destdir="${build.metacattest}"
419
             classpath="${cpath}:${build.dir}/${name}.jar"
420
             debug="on"
421
       includes="**/*.java" />
422

    
423
      <jar jarfile="${build.dir}/${name}-junittests.jar"
424
        basedir="${build.metacattest}"
425
                includes="**/*.class" />
426

    
427
      <!-- use the ant "junit" task to run JUnit tests. -->
428
      <junit printsummary="yes" haltonfailure="no" fork="no"
429
             haltonerror="no">
430
        <classpath>
431
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-junittests.jar" />
432
        </classpath>
433

    
434
        <formatter type="plain" />
435

    
436
        <batchtest fork="yes" todir="${build.dir}">
437
          <fileset dir="${build.metacattest}">
438
            <include name="**/*.class" />
439
          </fileset>
440
        </batchtest>
441
     </junit>
442
   </target>
443

    
444
    <target name="runonetest" depends="install">
445
      <!-- copy and compile the tests into a jar file -->
446
      <!--<property name="testtorun" value="SubTreeTest"/> -->
447
      <echo>testtorun: ${testtorun}</echo>
448
      <mkdir dir="${build.metacattest}"/>
449
      <javac srcdir="${junittestsdir}"
450
             destdir="${build.metacattest}"
451
             classpath="${cpath}:${build.dir}/${name}.jar"
452
       includes="**/*.java" />
453

    
454
      <jar jarfile="${build.dir}/${name}-junittests.jar"
455
        basedir="${build.metacattest}"
456
                includes="**/*.class" />
457

    
458
      <!-- use the ant "junit" task to run JUnit tests. -->
459
      <junit printsummary="yes" haltonfailure="no" fork="no"
460
             haltonerror="no">
461
        <classpath>
462
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-junittests.jar" />
463
        </classpath>
464

    
465
        <formatter type="plain" />
466

    
467
        <batchtest fork="yes" todir="${build.dir}">
468
          <fileset dir="${build.metacattest}">
469

    
470
            <include name="**/${testtorun}.class" />
471
          </fileset>
472
        </batchtest>
473
     </junit>
474
   </target>
475

    
476
  <target name="gethttpclient" depends="prepare">
477
  <!--mkdir dir="${morphosourcedir}" -->
478
        <cvs cvsRoot="${cvsroot}"
479
             package="morpho"
480
             dest="." />
481
        <ant dir="${morphosourcedir}" inheritAll="false"  target="jar" />
482
   </target>
483

    
484
   <!-- run this target, we need to check out a another morpho souce dir was checked out. -->
485
   <target name="nettest" depends="install">
486
      <echo>***********************************
487
      Please run ant gethttpclient first!
488
      ***********************************
489
      </echo>
490
      <!-- copy and compile the tests into a jar file -->
491
      <mkdir dir="${build.metacatnettest}"/>
492
      <javac srcdir="${junitnettestsdir}"
493
             destdir="${build.metacatnettest}"
494
             classpath="${cpath}:${build.dir}/${name}.jar:${httpclient}"
495
             includes="**/*.java" />
496

    
497
      <jar jarfile="${build.dir}/${name}-junitnettests.jar"
498
                    basedir="${build.metacatnettest}"
499
                    includes="**/*.class" />
500

    
501
      <!-- use the ant "junit" task to run JUnit tests. -->
502
      <junit printsummary="yes" haltonfailure="no" fork="yes"
503
             haltonerror="no">
504
        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
505
        <classpath>
506
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${httpclient}:${build.dir}/${name}-junitnettests.jar:${itis}" />
507
        </classpath>
508

    
509
        <formatter type="plain" />
510

    
511
        <batchtest fork="yes" todir="${build.dir}">
512
          <fileset dir="${build.metacatnettest}">
513
            <include name="**/*.class" />
514
          </fileset>
515
        </batchtest>
516
     </junit>
517
   </target>
518

    
519
   <target name="servletclean" depends="clean">
520
     <delete dir="${installdir}" />
521
   </target>
522

    
523

    
524
   <target name="clean" depends="init">
525
       <delete dir="${build.dir}" />
526
   </target>
527

    
528
   <target name="jdoc" depends="prepare">
529
       <javadoc packagenames="edu.ucsb.nceas.*"
530
           sourcepath="${build.src}"
531
           destdir="${build.javadocs}"
532
           author="true"
533
           version="true"
534
           use="true"
535
           windowtitle="${Name} API"
536
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
537
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
538
       />
539
   </target>
540

    
541
   <target name="dist" depends="jar,protocol,jdoc,getdtd,getschema">
542
      <mkdir dir="${dist.dir}"/>
543
      <delete dir="${ver.dir}" />
544
      <mkdir dir="${ver.dir}"/>
545
      <copy todir="${ver.dir}">
546
        <fileset dir="."
547
            excludes="**/CVS* **/.#* **/src* **/test* **/build* **/docs* ${dist.dir}"/>
548
      </copy>
549
      <copy todir="${ver.dir}" file="build.xml"/>
550
      <copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
551
      <copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
552

    
553
      <copy todir="${ver.dir}/docs" filtering="yes">
554
        <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
555
      </copy>
556
      <copy todir="${ver.dir}/docs" filtering="no">
557
        <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
558
      </copy>
559
      <copy todir="${ver.dir}/docs/dev">
560
        <fileset dir="${build.dir}/docs"/>
561
      </copy>
562
      <copy todir="${ver.dir}/src">
563
        <fileset dir="${build.dir}/src"/>
564
      </copy>
565

    
566
      <delete dir="./${ver.dir}/${build.dir}"/>
567
      <delete dir="./${ver.dir}/dist"/>
568
      <delete file="./${name}-${release}.zip"/>
569
      <zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
570
      <delete file="./${name}-${release}.tar.gz" />
571
      <tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
572
      <gzip zipfile="./${name}-${release}.tar.gz"
573
                src="./${name}-${release}.tar"/>
574
      <delete file="./${name}-${release}.tar" />
575
  </target>
576

    
577
  <target name="distsrc" depends="dist">
578
      <mkdir dir="${ver.src}"/>
579
      <copy todir="${ver.src}">
580
        <fileset dir="./src"/>
581
      </copy>
582

    
583
      <delete file="./${name}-src-${release}.zip"/>
584
      <zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
585
      <delete file="./${name}-src-${release}.tar.gz" />
586
      <tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
587
      <gzip zipfile="./${name}-src-${release}.tar.gz"
588
                src="./${name}-src-${release}.tar"/>
589
      <delete file="./${name}-src-${release}.tar" />
590
      <delete dir="${dist.dir}"/>
591
  </target>
592

    
593
   <target name="stylesheettest">
594
     <xslt in="${input}" out="eml.html" style="lib/style/eml2/eml-2.0.0.xsl">
595
      <param name="displaymodule" expression="${displaymodule}"/>
596
      <param name="docid" expression="${input}"/>
597
      <param name="entitytype" expression="${entitytype}"/>
598
      <param name="entityindex" expression="${entityindex}"/>
599
      <outputproperty name="method" value="html"/>
600
      <outputproperty name="standalone" value="yes"/>
601
      <outputproperty name="encoding" value="iso8859_1"/>
602
      <outputproperty name="indent" value="yes"/>
603
    </xslt>
604
  </target>
605

    
606
</project>
(4-4/4)