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 |
915
|
berkley
|
value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
|
36 |
|
|
<property name="installdir" value="/opt/tomcat/webapps/berkley" />
|
37 |
|
|
<property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
|
38 |
|
|
<property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
|
39 |
348
|
jones
|
<property name="name" value="metacat"/>
|
40 |
|
|
<property name="Name" value="MetaCat"/>
|
41 |
895
|
berkley
|
<property name="release" value="1.0.3"/>
|
42 |
685
|
jones
|
<property name="web-base-url"
|
43 |
915
|
berkley
|
value="http://knb.ecoinformatics.org"/>
|
44 |
887
|
berkley
|
|
45 |
|
|
<property name="replication-path" value="/servlet/replication"/>
|
46 |
915
|
berkley
|
<property name="servlet-path" value="/berkley/servlet/metacat"/>
|
47 |
|
|
<property name="html-path" value="/berkley"/>
|
48 |
|
|
<property name="image-path" value="/img/berkley" />
|
49 |
|
|
<property name="style-path" value="/berkley/style"/>
|
50 |
|
|
<property name="server" value="dev.nceas.ucsb.edu:8090"/>
|
51 |
|
|
<property name="replication-log" value="/tmp/berkley/metacatreplication.log"/>
|
52 |
906
|
berkley
|
<property name="user" value="berkley"/>
|
53 |
915
|
berkley
|
<property name="password" value="UnSinn123"/>
|
54 |
832
|
jones
|
<property name="config-dir" value="${installdir}" />
|
55 |
|
|
<property name="default-style" value="knb" />
|
56 |
877
|
jones
|
<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 |
915
|
berkley
|
value=":ext:berkley@cvs.ecoinformatics.org:/cvs" />
|
61 |
348
|
jones
|
|
62 |
882
|
jones
|
|
63 |
|
|
<filter token="docrooturl" value="./" />
|
64 |
588
|
berkley
|
<filter token="jdbc-connect" value="${jdbc-connect}"/>
|
65 |
882
|
jones
|
<filter token="dbDriver" value="${dbDriver}"/>
|
66 |
915
|
berkley
|
<filter token="dbAdapter" value="${dbAdapter}"/>
|
67 |
614
|
bojilova
|
<filter token="install-dir" value="${installdir}"/>
|
68 |
882
|
jones
|
<filter token="serverhost" value="${serverhost}"/>
|
69 |
586
|
berkley
|
<filter token="server" value="${server}"/>
|
70 |
|
|
<filter token="replication-log" value="${replication-log}"/>
|
71 |
348
|
jones
|
<filter token="release" value="${release}"/>
|
72 |
|
|
<filter token="servlet-path" value="${servlet-path}"/>
|
73 |
359
|
bojilova
|
<filter token="html-path" value="${html-path}"/>
|
74 |
362
|
jones
|
<filter token="user" value="${user}"/>
|
75 |
|
|
<filter token="password" value="${password}"/>
|
76 |
409
|
berkley
|
<filter token="image-path" value="${image-path}"/>
|
77 |
828
|
jones
|
<filter token="style-path" value="${style-path}"/>
|
78 |
506
|
jones
|
<filter token="web-base-url" value="${web-base-url}"/>
|
79 |
525
|
berkley
|
<filter token="replication-path" value="${replication-path}"/>
|
80 |
832
|
jones
|
<filter token="config-dir" value="${config-dir}"/>
|
81 |
|
|
<filter token="default-style" value="${default-style}"/>
|
82 |
877
|
jones
|
<filter token="eml-version" value="${eml-version}"/>
|
83 |
|
|
|
84 |
254
|
jones
|
<property name="srcdir" value="./src" />
|
85 |
348
|
jones
|
<property name="build.dir" value="./build"/>
|
86 |
|
|
<property name="build.src" value="${build.dir}/src"/>
|
87 |
|
|
<property name="build.dest" value="${build.dir}/classes"/>
|
88 |
516
|
jones
|
<property name="build.docs" value="${build.dir}/docs"/>
|
89 |
348
|
jones
|
<property name="build.samples" value="${build.dir}/samples"/>
|
90 |
|
|
<property name="build.tests" value="${build.dir}/tests"/>
|
91 |
|
|
<property name="build.data" value="${build.dir}/data"/>
|
92 |
806
|
jones
|
<property name="build.javadocs" value="${build.dir}/docs/api"/>
|
93 |
887
|
berkley
|
<property name="build.img" value="${installdir}/${image-path}"/>
|
94 |
348
|
jones
|
|
95 |
882
|
jones
|
<property name="dist.dir" value="dist"/>
|
96 |
806
|
jones
|
<property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
|
97 |
|
|
<property name="ver.src" value="${ver.dir}/src"/>
|
98 |
|
|
|
99 |
113
|
jones
|
<property name="oracle_home"
|
100 |
329
|
jones
|
value="/oracle01/app/oracle/product/8.1.6" />
|
101 |
|
|
<property name="toolsdir"
|
102 |
|
|
value="/usr/local/devtools" />
|
103 |
185
|
jones
|
<property name="xmlp2"
|
104 |
915
|
berkley
|
value="${toolsdir}/xerces-1_1_3/xerces.jar" />
|
105 |
113
|
jones
|
<property name="jdbc"
|
106 |
915
|
berkley
|
value="${oracle_home}/jdbc/lib/classes111.zip" />
|
107 |
113
|
jones
|
<property name="jserv"
|
108 |
|
|
value="/usr/lib/apache/ApacheJServ.jar" />
|
109 |
|
|
<property name="jsdk"
|
110 |
915
|
berkley
|
value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
|
111 |
213
|
jones
|
<property name="srb"
|
112 |
|
|
value="lib/srbrmi" />
|
113 |
798
|
jones
|
<property name="cos"
|
114 |
|
|
value="lib/cos.jar" />
|
115 |
906
|
berkley
|
<property name="xalan"
|
116 |
|
|
value="lib/xalan/xalan.jar" />
|
117 |
|
|
<property name="xalanxml-apis"
|
118 |
|
|
value="lib/xalan/xml-apis.jar" />
|
119 |
113
|
jones
|
<property name="cpath"
|
120 |
915
|
berkley
|
value="${xmlp2}:${xalan}:${xalanxml-apis}:${jdbc}:${jserv}:${jsdk}:${srb}:${cos}"/>
|
121 |
254
|
jones
|
<property name="package.home" value="edu/ucsb/nceas/metacat" />
|
122 |
915
|
berkley
|
|
123 |
113
|
jones
|
</target>
|
124 |
|
|
|
125 |
348
|
jones
|
<target name="prepare" depends="init">
|
126 |
|
|
<mkdir dir="${build.dir}"/>
|
127 |
|
|
<mkdir dir="${build.src}"/>
|
128 |
|
|
<mkdir dir="${build.dest}"/>
|
129 |
516
|
jones
|
<mkdir dir="${build.javadocs}"/>
|
130 |
348
|
jones
|
|
131 |
822
|
jones
|
<copy todir="${build.src}" filtering="yes">
|
132 |
|
|
<fileset dir="${srcdir}">
|
133 |
|
|
<include name="edu/**"/>
|
134 |
|
|
<include name="com/**"/>
|
135 |
877
|
jones
|
<include name="**/*.sql"/>
|
136 |
822
|
jones
|
<exclude name="**/CVS*"/>
|
137 |
|
|
<exclude name="**/.#*"/>
|
138 |
|
|
</fileset>
|
139 |
|
|
</copy>
|
140 |
348
|
jones
|
</target>
|
141 |
|
|
|
142 |
|
|
<target name="compile" depends="prepare">
|
143 |
|
|
<javac srcdir="${build.src}"
|
144 |
|
|
destdir="${build.dest}"
|
145 |
257
|
jones
|
classpath="${cpath}"
|
146 |
|
|
excludes="**/*.sql" />
|
147 |
822
|
jones
|
<copy file="lib/metacat.properties"
|
148 |
|
|
tofile="${build.dest}/${package.home}/metacat.properties"
|
149 |
|
|
filtering="yes" />
|
150 |
|
|
<copy file="lib/srbProps.properties"
|
151 |
|
|
tofile="${build.dest}/${package.home}/srbProps.properties"/>
|
152 |
113
|
jones
|
</target>
|
153 |
|
|
|
154 |
204
|
jones
|
<target name="jar" depends="compile">
|
155 |
353
|
jones
|
<delete file="${build.dir}/${name}.jar" />
|
156 |
822
|
jones
|
<copy todir="${build.dest}">
|
157 |
|
|
<fileset dir="lib/srbrmi"/>
|
158 |
|
|
</copy>
|
159 |
635
|
jones
|
<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
|
160 |
|
|
excludes="**/protocols/" />
|
161 |
113
|
jones
|
</target>
|
162 |
635
|
jones
|
|
163 |
|
|
<target name="protocol" depends="compile">
|
164 |
|
|
<delete file="${build.dir}/protocol.jar" />
|
165 |
|
|
<jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
|
166 |
|
|
includes="**/protocols/" />
|
167 |
|
|
</target>
|
168 |
113
|
jones
|
|
169 |
877
|
jones
|
<target name="getdtd" depends="prepare">
|
170 |
|
|
<cvs cvsRoot="${cvsroot}"
|
171 |
|
|
package="${eml-module}"
|
172 |
|
|
tag="${eml-tag}"
|
173 |
|
|
dest="${build.src}" />
|
174 |
879
|
jones
|
<mkdir dir="lib/dtd" />
|
175 |
|
|
<copy todir="lib/dtd" filtering="yes">
|
176 |
|
|
<fileset dir="${build.src}/${eml-module}">
|
177 |
|
|
<include name="*.dtd"/>
|
178 |
|
|
</fileset>
|
179 |
|
|
<mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
|
180 |
|
|
</copy>
|
181 |
877
|
jones
|
</target>
|
182 |
|
|
|
183 |
|
|
<target name="dtdsql" depends="prepare">
|
184 |
|
|
<echo/>
|
185 |
|
|
<echo>Registering the DTDs with the new Metacat instance...</echo>
|
186 |
|
|
<sql driver="${dbDriver}"
|
187 |
|
|
classpath="${jdbc}"
|
188 |
|
|
url="${jdbc-connect}"
|
189 |
|
|
userid="${user}"
|
190 |
|
|
password="${password}"
|
191 |
|
|
src="${build.src}/loaddtd.sql" />
|
192 |
|
|
</target>
|
193 |
|
|
|
194 |
204
|
jones
|
<target name="install" depends="jar">
|
195 |
329
|
jones
|
<mkdir dir="${installdir}/WEB-INF/lib" />
|
196 |
822
|
jones
|
<copy file="${build.dir}/${name}.jar"
|
197 |
|
|
tofile="${installdir}/WEB-INF/lib/${name}.jar" />
|
198 |
|
|
<copy file="${xmlp2}"
|
199 |
|
|
tofile="${installdir}/WEB-INF/lib/xerces.jar" />
|
200 |
|
|
<copy file="${xmlp}"
|
201 |
|
|
tofile="${installdir}/WEB-INF/lib/xmlparserv2.jar" />
|
202 |
|
|
<copy file="${jdbc}"
|
203 |
|
|
tofile="${installdir}/WEB-INF/lib/oracle-jdbc111.jar" />
|
204 |
|
|
<copy file="${cos}"
|
205 |
|
|
tofile="${installdir}/WEB-INF/lib/cos.jar" />
|
206 |
|
|
<copy file="lib/web.xml"
|
207 |
|
|
tofile="${installdir}/WEB-INF/web.xml" />
|
208 |
|
|
<copy todir="${build.img}" filtering="no">
|
209 |
|
|
<fileset dir="lib">
|
210 |
|
|
<include name="**/*.jpg"/>
|
211 |
|
|
<include name="**/*.png"/>
|
212 |
|
|
<include name="**/*.gif"/>
|
213 |
|
|
</fileset>
|
214 |
|
|
</copy>
|
215 |
|
|
<copy todir="${installdir}" filtering="yes">
|
216 |
|
|
<fileset dir="lib">
|
217 |
|
|
<exclude name="*.jar"/>
|
218 |
|
|
<exclude name="*.properties"/>
|
219 |
|
|
<exclude name="web.xml"/>
|
220 |
|
|
<exclude name="**/srbrmi*"/>
|
221 |
|
|
</fileset>
|
222 |
|
|
</copy>
|
223 |
877
|
jones
|
<echo>
|
224 |
|
|
***********************************************************
|
225 |
|
|
Remember to register the default DTDs by running the
|
226 |
|
|
"${build.src}/loaddtd.sql script". This is most easily
|
227 |
|
|
done by using the "ant dtdsql" which will run it for you.
|
228 |
|
|
***********************************************************
|
229 |
|
|
</echo>
|
230 |
204
|
jones
|
</target>
|
231 |
|
|
|
232 |
113
|
jones
|
<target name="clean" depends="init">
|
233 |
822
|
jones
|
<delete dir="${build.dir}" />
|
234 |
113
|
jones
|
</target>
|
235 |
|
|
|
236 |
516
|
jones
|
<target name="jdoc" depends="prepare">
|
237 |
822
|
jones
|
<javadoc packagenames="edu.ucsb.nceas.*"
|
238 |
516
|
jones
|
sourcepath="${build.src}"
|
239 |
|
|
destdir="${build.javadocs}"
|
240 |
113
|
jones
|
author="true"
|
241 |
|
|
version="true"
|
242 |
|
|
use="true"
|
243 |
348
|
jones
|
windowtitle="${Name} API"
|
244 |
|
|
doctitle="<h1>${Name}</h1>"
|
245 |
113
|
jones
|
bottom="<i>Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>"
|
246 |
|
|
/>
|
247 |
|
|
</target>
|
248 |
|
|
|
249 |
879
|
jones
|
<target name="dist" depends="jar,protocol,jdoc,getdtd">
|
250 |
806
|
jones
|
<mkdir dir="${dist.dir}"/>
|
251 |
|
|
<delete dir="${ver.dir}" />
|
252 |
|
|
<mkdir dir="${ver.dir}"/>
|
253 |
|
|
<copy todir="${ver.dir}">
|
254 |
882
|
jones
|
<fileset dir="."
|
255 |
|
|
excludes="**/CVS* **/.#* **/src* **/test* **/build* **/docs* ${dist.dir}"/>
|
256 |
806
|
jones
|
</copy>
|
257 |
|
|
<copy todir="${ver.dir}" file="build.xml"/>
|
258 |
|
|
<copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
|
259 |
|
|
<copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
|
260 |
882
|
jones
|
|
261 |
|
|
<copy todir="${ver.dir}/docs" filtering="yes">
|
262 |
|
|
<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
|
263 |
|
|
</copy>
|
264 |
|
|
<copy todir="${ver.dir}/docs" filtering="no">
|
265 |
|
|
<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
|
266 |
|
|
</copy>
|
267 |
806
|
jones
|
<copy todir="${ver.dir}/docs/dev">
|
268 |
|
|
<fileset dir="${build.dir}/docs"/>
|
269 |
|
|
</copy>
|
270 |
|
|
|
271 |
882
|
jones
|
<delete file="./${name}-${release}.zip"/>
|
272 |
|
|
<zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}"/>
|
273 |
|
|
<delete file="./${name}-${release}.tar.gz" />
|
274 |
|
|
<tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}"/>
|
275 |
|
|
<gzip zipfile="./${name}-${release}.tar.gz"
|
276 |
|
|
src="./${name}-${release}.tar"/>
|
277 |
|
|
<delete file="./${name}-${release}.tar" />
|
278 |
806
|
jones
|
</target>
|
279 |
|
|
|
280 |
|
|
<target name="distsrc" depends="dist">
|
281 |
|
|
<mkdir dir="${ver.src}"/>
|
282 |
|
|
<copy todir="${ver.src}">
|
283 |
|
|
<fileset dir="./src"/>
|
284 |
|
|
</copy>
|
285 |
|
|
|
286 |
882
|
jones
|
<delete file="./${name}-src-${release}.zip"/>
|
287 |
|
|
<zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
|
288 |
|
|
<delete file="./${name}-src-${release}.tar.gz" />
|
289 |
|
|
<tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
|
290 |
|
|
<gzip zipfile="./${name}-src-${release}.tar.gz"
|
291 |
|
|
src="./${name}-src-${release}.tar"/>
|
292 |
|
|
<delete file="./${name}-src-${release}.tar" />
|
293 |
807
|
jones
|
<delete dir="${dist.dir}"/>
|
294 |
806
|
jones
|
</target>
|
295 |
|
|
|
296 |
113
|
jones
|
</project>
|