Project

General

Profile

« Previous | Next » 

Revision 925

Added by berkley almost 23 years ago

integrated the postgres and oracle properties into one build file. now, if you want to switch between oracle and postgres, you just change the 'depends' attribute in the 'init' target. also, I fixed the path to the servlet.jar file to match up with where tomcat now stores it (lib/common/servlet.jar instead of lib/servlet.jar).

View differences:

build.oracle.xml
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$'
10
  *      '$Date$'
11
  *  '$Revision$'
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="init">
34
      <property name="jdbc-connect" 
35
                value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
36
      <property name="installdir" value="/opt/tomcat/webapps/metacat" />
37
      <property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
38
      <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
39
      <property name="name" value="metacat"/>
40
      <property name="Name" value="MetaCat"/>
41
      <property name="release" value="1.0.3"/>
42
      <property name="web-base-url" 
43
                value="http://knb.ecoinformatics.org"/>
44

  
45
      <property name="replication-path" value="/servlet/replication"/>
46
      <property name="servlet-path" value="/metacat/servlet/metacat"/>
47
      <property name="html-path" value="/metacat"/>
48
      <property name="image-path" value="/img/metacat" />
49
      <property name="style-path" value="/metacat/style"/>
50
      <property name="server" value="dev.nceas.ucsb.edu"/>
51
      <property name="replication-log" value="/tmp/metacatreplication.log"/>
52
      <property name="user" value="metacat_username"/>
53
      <property name="password" value="your_pw_here"/>
54
      <property name="config-dir" value="${installdir}" />
55
      <property name="default-style" value="knb" />
56
      <property name="eml-module" value="mdstandards/eml" />
57
      <property name="eml-version" value="2.0.0beta6" />
58
      <property name="eml-tag" value="RELEASE_EML_2_0_0_BETA_6" />
59
      <property name="cvsroot" 
60
                value=":ext:berkley@cvs.nceas.ucsb.edu:/cvs/pbi" />
61

  
62

  
63
      <filter token="docrooturl" value="./" />
64
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
65
      <filter token="dbDriver" value="${dbDriver}"/>
66
      <filter token="install-dir" value="${installdir}"/>
67
      <filter token="serverhost" value="${serverhost}"/>
68
      <filter token="server" value="${server}"/>
69
      <filter token="replication-log" value="${replication-log}"/>
70
      <filter token="release" value="${release}"/>
71
      <filter token="servlet-path" value="${servlet-path}"/>
72
      <filter token="html-path" value="${html-path}"/>
73
      <filter token="user" value="${user}"/>
74
      <filter token="password" value="${password}"/>
75
      <filter token="image-path" value="${image-path}"/>
76
      <filter token="style-path" value="${style-path}"/>
77
      <filter token="web-base-url" value="${web-base-url}"/>
78
      <filter token="replication-path" value="${replication-path}"/>
79
      <filter token="config-dir" value="${config-dir}"/>
80
      <filter token="default-style" value="${default-style}"/>
81
      <filter token="eml-version" value="${eml-version}"/>
82

  
83
      <property name="srcdir" value="./src" />
84
      <property name="build.dir" value="./build"/>
85
      <property name="build.src" value="${build.dir}/src"/>
86
      <property name="build.dest" value="${build.dir}/classes"/>
87
      <property name="build.docs" value="${build.dir}/docs"/>
88
      <property name="build.samples" value="${build.dir}/samples"/>
89
      <property name="build.tests" value="${build.dir}/tests"/>
90
      <property name="build.data" value="${build.dir}/data"/>
91
      <property name="build.javadocs" value="${build.dir}/docs/api"/>
92
      <property name="build.img" value="${installdir}/${image-path}"/>
93

  
94
      <property name="dist.dir" value="dist"/>
95
      <property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
96
      <property name="ver.src" value="${ver.dir}/src"/>
97

  
98
      <property name="oracle_home" 
99
                value="/oracle01/app/oracle/product/8.1.6" />
100
      <property name="toolsdir" 
101
                value="/usr/local/devtools" />
102
      <property name="xmlp2" 
103
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
104
      <property name="jdbc" 
105
                value="${oracle_home}/jdbc/lib/classes111.zip" />
106
      <property name="jserv" 
107
                value="/usr/lib/apache/ApacheJServ.jar" />
108
      <property name="jsdk" 
109
                value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
110
      <property name="srb" 
111
                value="lib/srbrmi" />
112
      <property name="cos" 
113
                value="lib/cos.jar" />
114
      <property name="xalan"
115
                value="lib/xalan/xalan.jar" />
116
      <property name="xalanxml-apis"
117
                value="lib/xalan/xml-apis.jar" />
118
      <property name="cpath" 
119
                value="${xmlp2}:${xalan}:${xalanxml-apis}:${jdbc}:${jserv}:${jsdk}:${srb}:${cos}"/>
120
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
121

  
122
   </target>
123
   
124
   <target name="prepare" depends="init">
125
      <mkdir dir="${build.dir}"/>
126
      <mkdir dir="${build.src}"/>
127
      <mkdir dir="${build.dest}"/>
128
      <mkdir dir="${build.javadocs}"/>
129

  
130
      <copy todir="${build.src}" filtering="yes">
131
        <fileset dir="${srcdir}">
132
          <include name="edu/**"/>
133
          <include name="com/**"/>
134
          <include name="**/*.sql"/>
135
          <exclude name="**/CVS*"/>
136
          <exclude name="**/.#*"/>
137
        </fileset>
138
      </copy>
139
   </target>
140

  
141
   <target name="compile" depends="prepare">
142
       <javac srcdir="${build.src}" 
143
              destdir="${build.dest}" 
144
              classpath="${cpath}" 
145
              excludes="**/*.sql" /> 
146
       <copy file="lib/metacat.properties" 
147
             tofile="${build.dest}/${package.home}/metacat.properties" 
148
             filtering="yes" />
149
       <copy file="lib/srbProps.properties" 
150
             tofile="${build.dest}/${package.home}/srbProps.properties"/>
151
   </target> 
152

  
153
   <target name="jar" depends="compile">
154
       <delete file="${build.dir}/${name}.jar" />
155
       <copy todir="${build.dest}">
156
         <fileset dir="lib/srbrmi"/>
157
       </copy>
158
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
159
            excludes="**/protocols/" />
160
   </target> 
161
 
162
   <target name="protocol" depends="compile">
163
       <delete file="${build.dir}/protocol.jar" />
164
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
165
            includes="**/protocols/" />
166
   </target> 
167

  
168
   <target name="getdtd" depends="prepare">
169
        <cvs cvsRoot="${cvsroot}"
170
             package="${eml-module}"
171
             tag="${eml-tag}"
172
             dest="${build.src}" />
173
       <mkdir dir="lib/dtd" />
174
       <copy todir="lib/dtd" filtering="yes">
175
         <fileset dir="${build.src}/${eml-module}">
176
           <include name="*.dtd"/>
177
         </fileset>
178
         <mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
179
       </copy>
180
   </target>
181

  
182
   <target name="dtdsql" depends="prepare">
183
     <echo/>
184
     <echo>Registering the DTDs with the new Metacat instance...</echo>
185
     <sql driver="${dbDriver}"
186
          classpath="${jdbc}"
187
          url="${jdbc-connect}"
188
          userid="${user}"
189
          password="${password}"
190
          src="${build.src}/loaddtd.sql" />
191
   </target>
192

  
193
   <target name="install" depends="jar">
194
       <mkdir dir="${installdir}/WEB-INF/lib" />
195
       <copy file="${build.dir}/${name}.jar" 
196
             tofile="${installdir}/WEB-INF/lib/${name}.jar" />
197
       <copy file="${xmlp2}" 
198
             tofile="${installdir}/WEB-INF/lib/xerces.jar" />
199
       <copy file="${xmlp}" 
200
             tofile="${installdir}/WEB-INF/lib/xmlparserv2.jar" />
201
       <copy file="${jdbc}" 
202
             tofile="${installdir}/WEB-INF/lib/oracle-jdbc111.jar" />
203
       <copy file="${cos}" 
204
             tofile="${installdir}/WEB-INF/lib/cos.jar" />
205
       <copy file="lib/web.xml" 
206
             tofile="${installdir}/WEB-INF/web.xml" />
207
       <copy todir="${build.img}" filtering="no">
208
         <fileset dir="lib">
209
           <include name="**/*.jpg"/>
210
           <include name="**/*.png"/>
211
           <include name="**/*.gif"/>
212
         </fileset>
213
       </copy>
214
       <copy todir="${installdir}" filtering="yes">
215
         <fileset dir="lib">
216
           <exclude name="*.jar"/>
217
           <exclude name="*.properties"/>
218
           <exclude name="web.xml"/>
219
           <exclude name="**/srbrmi*"/>
220
         </fileset>
221
       </copy>
222
       <echo>
223
             ***********************************************************
224
              Remember to register the default DTDs by running the
225
              "${build.src}/loaddtd.sql script". This is most easily
226
              done by using the "ant dtdsql" which will run it for you.
227
             ***********************************************************
228
       </echo>
229
   </target> 
230

  
231
   <target name="clean" depends="init">
232
       <delete dir="${build.dir}" />
233
   </target>
234

  
235
   <target name="jdoc" depends="prepare">
236
       <javadoc packagenames="edu.ucsb.nceas.*"
237
           sourcepath="${build.src}"
238
           destdir="${build.javadocs}"
239
           author="true"
240
           version="true"
241
           use="true"
242
           windowtitle="${Name} API"
243
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
244
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
245
       />
246
   </target>
247

  
248
   <target name="dist" depends="jar,protocol,jdoc,getdtd">
249
      <mkdir dir="${dist.dir}"/>
250
      <delete dir="${ver.dir}" />
251
      <mkdir dir="${ver.dir}"/>
252
      <copy todir="${ver.dir}">
253
        <fileset dir="." 
254
            excludes="**/CVS* **/.#* **/src* **/test* **/build* **/docs* ${dist.dir}"/>
255
      </copy>
256
      <copy todir="${ver.dir}" file="build.xml"/>
257
      <copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
258
      <copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
259

  
260
      <copy todir="${ver.dir}/docs" filtering="yes">
261
        <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
262
      </copy>
263
      <copy todir="${ver.dir}/docs" filtering="no">
264
        <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
265
      </copy>
266
      <copy todir="${ver.dir}/docs/dev">
267
        <fileset dir="${build.dir}/docs"/>
268
      </copy>
269
       <copy todir="${ver.dir}/src">
270
        <fileset dir="${build.dir}/src"/>
271
      </copy>
272
 
273
      <delete file="./${name}-${release}.zip"/>
274
      <zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}"/>
275
      <delete file="./${name}-${release}.tar.gz" />
276
      <tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}"/>
277
      <gzip zipfile="./${name}-${release}.tar.gz" 
278
                src="./${name}-${release}.tar"/>
279
      <delete file="./${name}-${release}.tar" />
280
  </target> 
281

  
282
  <target name="distsrc" depends="dist">
283
      <mkdir dir="${ver.src}"/>
284
      <copy todir="${ver.src}">
285
        <fileset dir="./src"/>
286
      </copy>
287

  
288
      <delete file="./${name}-src-${release}.zip"/>
289
      <zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
290
      <delete file="./${name}-src-${release}.tar.gz" />
291
      <tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
292
      <gzip zipfile="./${name}-src-${release}.tar.gz" 
293
                src="./${name}-src-${release}.tar"/>
294
      <delete file="./${name}-src-${release}.tar" />
295
      <delete dir="${dist.dir}"/>
296
  </target> 
297

  
298
</project>
299 0

  
build.postgres.xml
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$'
10
  *      '$Date$'
11
  *  '$Revision$'
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="init">
34
      <property name="jdbc-connect" 
35
                value="jdbc:postgresql://localhost/metacat"/>
36
      <property name="installdir" value="/home/berkley/tomcat/webapps/metacat" />
37
      <property name="dbDriver" value="org.postgresql.Driver"/>
38
      <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
39
      <property name="name" value="metacat"/>
40
      <property name="Name" value="MetaCat"/>
41
      <property name="release" value="1.0.3"/>
42
      <property name="web-base-url" 
43
                value="http://alpha.nceas.ucsb.edu:8080/"/>
44

  
45
      <property name="replication-path" value="/servlet/replication"/>
46
      <property name="servlet-path" value="/metacat/servlet/metacat"/>
47
      <property name="html-path" value="/metacat"/>
48
      <property name="image-path" value="/img/metacat" />
49
      <property name="style-path" value="/metacat/style"/>
50
      <property name="server" value="alpha.nceas.ucsb.edu:8080"/>
51
      <property name="replication-log" value="/home/berkley/tomcat/webapps/metacat/metacatreplication.log"/>
52
      <property name="user" value="metacat"/>
53
      <property name="password" value=""/>
54
      <property name="config-dir" value="${installdir}" />
55
      <property name="default-style" value="knb" />
56
      <property name="eml-module" value="mdstandards/eml" />
57
      <property name="eml-version" value="2.0.0beta6" />
58
      <property name="eml-tag" value="RELEASE_EML_2_0_0_BETA_6" />
59
      <property name="cvsroot" 
60
                value=":ext:berkley@cvs.nceas.ucsb.edu:/cvs/pbi" />
61

  
62

  
63
      <filter token="docrooturl" value="./" />
64
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
65
      <filter token="dbDriver" value="${dbDriver}"/>
66
      <filter token="install-dir" value="${installdir}"/>
67
      <filter token="serverhost" value="${serverhost}"/>
68
      <filter token="server" value="${server}"/>
69
      <filter token="replication-log" value="${replication-log}"/>
70
      <filter token="release" value="${release}"/>
71
      <filter token="servlet-path" value="${servlet-path}"/>
72
      <filter token="html-path" value="${html-path}"/>
73
      <filter token="user" value="${user}"/>
74
      <filter token="password" value="${password}"/>
75
      <filter token="image-path" value="${image-path}"/>
76
      <filter token="style-path" value="${style-path}"/>
77
      <filter token="web-base-url" value="${web-base-url}"/>
78
      <filter token="replication-path" value="${replication-path}"/>
79
      <filter token="config-dir" value="${config-dir}"/>
80
      <filter token="default-style" value="${default-style}"/>
81
      <filter token="eml-version" value="${eml-version}"/>
82

  
83
      <property name="srcdir" value="./src" />
84
      <property name="build.dir" value="./build"/>
85
      <property name="build.src" value="${build.dir}/src"/>
86
      <property name="build.dest" value="${build.dir}/classes"/>
87
      <property name="build.docs" value="${build.dir}/docs"/>
88
      <property name="build.samples" value="${build.dir}/samples"/>
89
      <property name="build.tests" value="${build.dir}/tests"/>
90
      <property name="build.data" value="${build.dir}/data"/>
91
      <property name="build.javadocs" value="${build.dir}/docs/api"/>
92
      <property name="build.img" value="${installdir}/${image-path}"/>
93

  
94
      <property name="dist.dir" value="dist"/>
95
      <property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
96
      <property name="ver.src" value="${ver.dir}/src"/>
97

  
98
      <property name="xmlp2" 
99
                value="./lib/xerces.jar" />
100
      <property name="jdbc" 
101
                value="lib/jdbc7.1-1.2.jar" />
102
      <property name="jsdk" 
103
                value="/home/berkley/metacat/tomcat/lib/common/servlet.jar" />
104
      <property name="srb" 
105
                value="lib/srbrmi" />
106
      <property name="cos" 
107
                value="lib/cos.jar" />
108
      <property name="xalan"
109
                value="lib/xalan/xalan.jar" />
110
      <property name="xalanxml-apis"
111
                value="lib/xalan/xml-apis.jar" />
112
      <property name="cpath" 
113
                value="${xalan}:${xalanxml-apis}:${xmlp2}:${jdbc}:${jserv}:${jsdk}:${srb}:${cos}"/>
114
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
115
   </target>
116
   
117
   <target name="prepare" depends="init">
118
      <mkdir dir="${build.dir}"/>
119
      <mkdir dir="${build.src}"/>
120
      <mkdir dir="${build.dest}"/>
121
      <mkdir dir="${build.javadocs}"/>
122

  
123
      <copy todir="${build.src}" filtering="yes">
124
        <fileset dir="${srcdir}">
125
          <include name="edu/**"/>
126
          <include name="com/**"/>
127
          <include name="**/*.sql"/>
128
          <exclude name="**/CVS*"/>
129
          <exclude name="**/.#*"/>
130
        </fileset>
131
      </copy>
132
   </target>
133

  
134
   <target name="compile" depends="prepare">
135
       <javac srcdir="${build.src}" 
136
              destdir="${build.dest}" 
137
              classpath="${cpath}" 
138
              excludes="**/*.sql" /> 
139
       <copy file="lib/metacat.properties" 
140
             tofile="${build.dest}/${package.home}/metacat.properties" 
141
             filtering="yes" />
142
       <copy file="lib/srbProps.properties" 
143
             tofile="${build.dest}/${package.home}/srbProps.properties"/>
144
   </target> 
145

  
146
   <target name="jar" depends="compile">
147
       <delete file="${build.dir}/${name}.jar" />
148
       <copy todir="${build.dest}">
149
         <fileset dir="lib/srbrmi"/>
150
       </copy>
151
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
152
            excludes="**/protocols/" />
153
   </target> 
154
 
155
   <target name="protocol" depends="compile">
156
       <delete file="${build.dir}/protocol.jar" />
157
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
158
            includes="**/protocols/" />
159
   </target> 
160

  
161
   <target name="getdtd" depends="prepare">
162
        <cvs cvsRoot="${cvsroot}"
163
             package="${eml-module}"
164
             tag="${eml-tag}"
165
             dest="${build.src}" />
166
       <mkdir dir="lib/dtd" />
167
       <copy todir="lib/dtd" filtering="yes">
168
         <fileset dir="${build.src}/${eml-module}">
169
           <include name="*.dtd"/>
170
         </fileset>
171
         <mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
172
       </copy>
173
   </target>
174

  
175
   <target name="dtdsql" depends="prepare">
176
     <echo/>
177
     <echo>Registering the DTDs with the new Metacat instance...</echo>
178
     <sql driver="${dbDriver}"
179
          classpath="${jdbc}"
180
          url="${jdbc-connect}"
181
          userid="${user}"
182
          password="${password}"
183
          src="${build.src}/loaddtd.sql" />
184
   </target>
185

  
186
   <target name="install" depends="jar">
187
       <mkdir dir="${installdir}/WEB-INF/lib" />
188
       <copy file="${build.dir}/${name}.jar" 
189
             tofile="${installdir}/WEB-INF/lib/${name}.jar" />
190
       <copy file="${xmlp2}" 
191
             tofile="${installdir}/WEB-INF/lib/xerces.jar" />
192
       <copy file="${jdbc}" 
193
             tofile="${installdir}/WEB-INF/lib/oracle-jdbc111.jar" />
194
       <copy file="${cos}" 
195
             tofile="${installdir}/WEB-INF/lib/cos.jar" />
196
       <copy file="${xalan}" 
197
             tofile="${installdir}/WEB-INF/lib/xalan.jar" />
198
       <copy file="${xalanxml-apis}" 
199
             tofile="${installdir}/WEB-INF/lib/xml-apis.jar" />
200
       <copy file="lib/web.xml" 
201
             tofile="${installdir}/WEB-INF/web.xml" />
202
       <copy todir="${build.img}" filtering="no">
203
         <fileset dir="lib">
204
           <include name="**/*.jpg"/>
205
           <include name="**/*.png"/>
206
           <include name="**/*.gif"/>
207
         </fileset>
208
       </copy>
209
       <copy todir="${installdir}" filtering="yes">
210
         <fileset dir="lib">
211
           <exclude name="*.jar"/>
212
           <exclude name="*.properties"/>
213
           <exclude name="web.xml"/>
214
           <exclude name="**/srbrmi*"/>
215
         </fileset>
216
       </copy>
217
       <echo>
218
             ***********************************************************
219
              Remember to register the default DTDs by running the
220
              "${build.src}/loaddtd.sql script". This is most easily
221
              done by using the "ant dtdsql" which will run it for you.
222
             ***********************************************************
223
       </echo>
224
   </target> 
225

  
226
   <target name="clean" depends="init">
227
       <delete dir="${build.dir}" />
228
   </target>
229

  
230
   <target name="jdoc" depends="prepare">
231
       <javadoc packagenames="edu.ucsb.nceas.*"
232
           sourcepath="${build.src}"
233
           destdir="${build.javadocs}"
234
           author="true"
235
           version="true"
236
           use="true"
237
           windowtitle="${Name} API"
238
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
239
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
240
       />
241
   </target>
242

  
243
   <target name="dist" depends="jar,protocol,jdoc,getdtd">
244
      <mkdir dir="${dist.dir}"/>
245
      <delete dir="${ver.dir}" />
246
      <mkdir dir="${ver.dir}"/>
247
      <copy todir="${ver.dir}">
248
        <fileset dir="." 
249
            excludes="**/CVS* **/.#* **/src* **/test* **/build* **/docs* ${dist.dir}"/>
250
      </copy>
251
      <copy todir="${ver.dir}" file="build.xml"/>
252
      <copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
253
      <copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
254

  
255
      <copy todir="${ver.dir}/docs" filtering="yes">
256
        <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
257
      </copy>
258
      <copy todir="${ver.dir}/docs" filtering="no">
259
        <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
260
      </copy>
261
      <copy todir="${ver.dir}/docs/dev">
262
        <fileset dir="${build.dir}/docs"/>
263
      </copy>
264
      <copy todir="${ver.dir}/src">
265
        <fileset dir="${build.dir}/src"/>
266
      </copy>
267
 
268
      <delete file="./${name}-${release}.zip"/>
269
      <zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}"/>
270
      <delete file="./${name}-${release}.tar.gz" />
271
      <tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}"/>
272
      <gzip zipfile="./${name}-${release}.tar.gz" 
273
                src="./${name}-${release}.tar"/>
274
      <delete file="./${name}-${release}.tar" />
275
  </target> 
276

  
277
  <target name="distsrc" depends="dist">
278
      <mkdir dir="${ver.src}"/>
279
      <copy todir="${ver.src}">
280
        <fileset dir="./src"/>
281
      </copy>
282

  
283
      <delete file="./${name}-src-${release}.zip"/>
284
      <zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
285
      <delete file="./${name}-src-${release}.tar.gz" />
286
      <tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
287
      <gzip zipfile="./${name}-src-${release}.tar.gz" 
288
                src="./${name}-src-${release}.tar"/>
289
      <delete file="./${name}-src-${release}.tar" />
290
      <delete dir="${dist.dir}"/>
291
  </target> 
292

  
293
</project>
294 0

  
build.xml
30 30
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
31 31
--> 
32 32
<project name="metacat" default="jar" basedir=".">
33
   <target name="init">
34
      <property name="jdbc-connect" 
35
                value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
36
      <property name="installdir" value="/opt/tomcat/webapps/jones" />
37
      <property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
38
      <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
33
   <target name="oracle">
34
     <property name="jdbc-connect" value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
35
     <property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
36
     <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
37
     <property name="oracle_home" value="/oracle01/app/oracle/product/8.1.6" />
38
     <property name="jdbc" value="${oracle_home}/jdbc/lib/classes111.zip" />
39
     <property name="user" value="berkley"/>
40
     <property name="password" value="UnSinn123"/>
41
   </target>
42
   
43
   <target name="postgresql">
44
     <property name="jdbc-connect" value="jdbc:postgresql://localhost/metacat"/>
45
     <property name="dbDriver" value="org.postgresql.Driver"/>
46
     <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
47
     <property name="jdbc" value="lib/jdbc7.1-1.2.jar" />
48
     <property name="user" value="metacat"/>
49
     <property name="password" value=""/>
50
   </target>
51
   
52
   <target name="init" depends="oracle">
53
      <!--Change the 'depends' attribute above to 'postgresql' to install 
54
          metacat with postgres instead of oracle-->
55
      <property name="installdir" value="/opt/tomcat/webapps/berkley" />
39 56
      <property name="name" value="metacat"/>
40 57
      <property name="Name" value="MetaCat"/>
41 58
      <property name="release" value="1.0.3"/>
42 59
      <property name="web-base-url" 
43 60
                value="http://knb.ecoinformatics.org"/>
44 61

  
45
      <property name="replication-path" value="/jones/servlet/replication"/>
46
      <property name="servlet-path" value="/jones/servlet/metacat"/>
47
      <property name="html-path" value="/jones"/>
48
      <property name="image-path" value="/img/jones" />
49
      <property name="style-path" value="/jones/style"/>
62
      <property name="replication-path" value="/berkley/servlet/replication"/>
63
      <property name="servlet-path" value="/berkley/servlet/metacat"/>
64
      <property name="html-path" value="/berkley"/>
65
      <property name="image-path" value="/img/berkley" />
66
      <property name="style-path" value="/berkley/style"/>
50 67
      <property name="server" value="dev.nceas.ucsb.edu"/>
51 68
      <property name="replication-log" value="/tmp/metacatreplication.log"/>
52
      <property name="user" value="jones"/>
53
      <property name="password" value="your-pw-goes-here"/>
54 69
      <property name="config-dir" value="${installdir}" />
55 70
      <property name="default-style" value="knb" />
56 71
      <property name="eml-module" value="eml" />
57 72
      <property name="eml-version" value="2.0.0beta6" />
58 73
      <property name="eml-tag" value="RELEASE_EML_2_0_0_BETA_6" />
59 74
      <property name="cvsroot" 
60
                value=":ext:jones@cvs.ecoinformatics.org:/cvs" />
75
                value=":ext:berkley@cvs.ecoinformatics.org:/cvs" />
61 76

  
62 77

  
63 78
      <filter token="docrooturl" value="./" />
......
96 111
      <property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
97 112
      <property name="ver.src" value="${ver.dir}/src"/>
98 113

  
99
      <property name="oracle_home" 
100
                value="/oracle01/app/oracle/product/8.1.6" />
114
      
101 115
      <property name="toolsdir" 
102 116
                value="/usr/local/devtools" />
103 117
      <property name="xmlp2" 
104 118
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
105
      <property name="jdbc" 
106
                value="${oracle_home}/jdbc/lib/classes111.zip" />
107 119
      <property name="jserv" 
108 120
                value="/usr/lib/apache/ApacheJServ.jar" />
109 121
      <property name="jsdk" 
110
                value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
122
                value="${toolsdir}/jakarta-tomcat/lib/common/servlet.jar" />
111 123
      <property name="srb" 
112 124
                value="lib/srbrmi" />
113 125
      <property name="cos" 

Also available in: Unified diff