Project

General

Profile

1 113 jones
<?xml version="1.0"?>
2
<!--
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
  *      '$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 113 jones
-->
32 329 jones
<project name="metacat" default="jar" basedir=".">
33 113 jones
   <target name="init">
34 685 jones
      <property name="jdbc-connect"
35
                value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
36 780 berkley
      <property name="installdir" value="/opt/tomcat/webapps/jones" />
37 348 jones
      <property name="name" value="metacat"/>
38
      <property name="Name" value="MetaCat"/>
39 685 jones
      <property name="release" value="1.0beta1"/>
40
      <property name="web-base-url"
41
                value="http://www.nceas.ucsb.edu/collab/2840/knbweb"/>
42 780 berkley
      <property name="replication-path" value="//servlet/replication"/>
43
      <property name="servlet-path" value="/jones/servlet/metacat"/>
44
      <property name="html-path" value="/jones"/>
45
      <property name="image-path" value="/img/jones" />
46 586 berkley
      <property name="server" value="dev.nceas.ucsb.edu"/>
47 780 berkley
      <property name="replication-log" value="/tmp/metacatreplication.log"/>
48 642 berkley
      <property name="dataport" value="4444"/>
49 780 berkley
      <property name="user" value="jones"/>
50
      <property name="password" value="kinkaj0u"/>
51 348 jones
52 588 berkley
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
53 642 berkley
      <filter token="data-port" value="${dataport}"/>
54 614 bojilova
      <filter token="install-dir" value="${installdir}"/>
55 586 berkley
      <filter token="server" value="${server}"/>
56
      <filter token="replication-log" value="${replication-log}"/>
57 348 jones
      <filter token="release" value="${release}"/>
58
      <filter token="servlet-path" value="${servlet-path}"/>
59 359 bojilova
      <filter token="html-path" value="${html-path}"/>
60 362 jones
      <filter token="user" value="${user}"/>
61
      <filter token="password" value="${password}"/>
62 409 berkley
      <filter token="image-path" value="${image-path}"/>
63 506 jones
      <filter token="web-base-url" value="${web-base-url}"/>
64 525 berkley
      <filter token="replication-path" value="${replication-path}"/>
65 254 jones
      <property name="srcdir" value="./src" />
66 348 jones
67
      <property name="build.dir" value="./build"/>
68
      <property name="build.src" value="${build.dir}/src"/>
69
      <property name="build.dest" value="${build.dir}/classes"/>
70 516 jones
      <property name="build.docs" value="${build.dir}/docs"/>
71 348 jones
      <property name="build.samples" value="${build.dir}/samples"/>
72
      <property name="build.tests" value="${build.dir}/tests"/>
73
      <property name="build.data" value="${build.dir}/data"/>
74
      <property name="build.javadocs" value="${build.dir}/docs/apiDocs"/>
75 409 berkley
      <property name="build.img" value="/opt/httpd/html${image-path}"/>
76 348 jones
77 113 jones
      <property name="oracle_home"
78 329 jones
                value="/oracle01/app/oracle/product/8.1.6" />
79
      <property name="toolsdir"
80
                value="/usr/local/devtools" />
81 113 jones
      <property name="xmlp"
82 329 jones
                value="${toolsdir}/OracleXSU111/lib/xmlparserv2.jar" />
83 185 jones
      <property name="xmlp2"
84 329 jones
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
85 113 jones
      <property name="jdbc"
86
                value="${oracle_home}/jdbc/lib/classes111.zip" />
87
      <property name="jserv"
88
                value="/usr/lib/apache/ApacheJServ.jar" />
89
      <property name="jsdk"
90 329 jones
                value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
91 213 jones
      <property name="srb"
92
                value="lib/srbrmi" />
93 113 jones
      <property name="cpath"
94 319 jones
                value="${xmlp2}:${xmlp}:${jdbc}:${jserv}:${jsdk}:${srb}"/>
95 254 jones
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
96 348 jones
97 113 jones
   </target>
98
99 348 jones
   <target name="prepare" depends="init">
100
      <mkdir dir="${build.dir}"/>
101
      <mkdir dir="${build.src}"/>
102
      <mkdir dir="${build.dest}"/>
103 516 jones
      <mkdir dir="${build.javadocs}"/>
104 348 jones
105
      <copydir src="${srcdir}"
106
               dest="${build.src}"
107
               filtering="yes"
108
               includes="edu/**, com/**"
109
               excludes="**/CVS* **/.#* **/*.sql"/>
110
111
   </target>
112
113
   <target name="compile" depends="prepare">
114
       <javac srcdir="${build.src}"
115
              destdir="${build.dest}"
116 257 jones
              classpath="${cpath}"
117
              excludes="**/*.sql" />
118 116 jones
       <copyfile src="lib/metacat.properties"
119 356 bojilova
                 dest="${build.dest}/${package.home}/metacat.properties"
120
                 filtering="yes" />
121 481 bojilova
       <copyfile src="lib/srbProps.properties"
122
                 dest="${build.dest}/${package.home}/srbProps.properties"/>
123 113 jones
   </target>
124
125 204 jones
   <target name="jar" depends="compile">
126 353 jones
       <delete file="${build.dir}/${name}.jar" />
127 348 jones
       <copydir src="lib/srbrmi" dest="${build.dest}" />
128 635 jones
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
129
            excludes="**/protocols/" />
130 113 jones
   </target>
131 635 jones
132
   <target name="protocol" depends="compile">
133
       <delete file="${build.dir}/protocol.jar" />
134
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
135
            includes="**/protocols/" />
136
   </target>
137 113 jones
138 204 jones
   <target name="install" depends="jar">
139 329 jones
       <mkdir dir="${installdir}/WEB-INF/lib" />
140 353 jones
       <copyfile src="${build.dir}/${name}.jar"
141 348 jones
                 dest="${installdir}/WEB-INF/lib/${name}.jar" />
142 329 jones
       <copyfile src="${xmlp2}"
143
                 dest="${installdir}/WEB-INF/lib/xerces.jar" />
144
       <copyfile src="${xmlp}"
145
                 dest="${installdir}/WEB-INF/lib/xmlparserv2.jar" />
146
       <copyfile src="${jdbc}"
147
                 dest="${installdir}/WEB-INF/lib/oracle-jdbc111.jar" />
148
       <copyfile src="lib/web.xml"
149
                 dest="${installdir}/WEB-INF/web.xml" />
150 409 berkley
       <copydir src="lib"
151 410 berkley
                dest="${build.img}"
152
                includes="*.jpg,*.png,*.gif,**/marine/*.jpg, **/marine/*.png, **/marine/*.gif"/>
153 329 jones
       <copydir src="lib" dest="${installdir}"
154 348 jones
                filtering="yes"
155 329 jones
                excludes="*.jar,*.properties,web.xml,**/srbrmi/*" />
156 693 berkley
<!--       <mkdir dir="${installdir}/dtd" />
157 391 jones
       <copydir src="../dtd" dest="${installdir}/dtd"
158
                filtering="yes"
159 693 berkley
                includes="*.dtd" />-->
160 204 jones
   </target>
161
162 113 jones
   <target name="clean" depends="init">
163 348 jones
       <deltree dir="${build.dir}" />
164 113 jones
   </target>
165
166 516 jones
   <target name="jdoc" depends="prepare">
167 113 jones
       <javadoc packagenames="edu.ucsb.nceas.metacat"
168 516 jones
           sourcepath="${build.src}"
169
           destdir="${build.javadocs}"
170 113 jones
           author="true"
171
           version="true"
172
           use="true"
173 348 jones
           windowtitle="${Name} API"
174
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
175 113 jones
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
176
       />
177
   </target>
178
179
</project>