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