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