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 |
848
|
jones
|
<property name="release" value="1.0beta3"/>
|
40 |
685
|
jones
|
<property name="web-base-url"
|
41 |
811
|
bojilova
|
value="http://knb.ecoinformatics.org"/>
|
42 |
845
|
jones
|
<property name="replication-path" value="/servlet/replication"/>
|
43 |
780
|
berkley
|
<property name="servlet-path" value="/jones/servlet/metacat"/>
|
44 |
|
|
<property name="html-path" value="/jones"/>
|
45 |
|
|
<property name="image-path" value="/img/jones" />
|
46 |
833
|
jones
|
<property name="style-path" value="/jones/style"/>
|
47 |
838
|
bojilova
|
<property name="server" value="dev.nceas.ucsb.edu:8443"/>
|
48 |
780
|
berkley
|
<property name="replication-log" value="/tmp/metacatreplication.log"/>
|
49 |
852
|
jones
|
<property name="user" value="jones"/>
|
50 |
853
|
jones
|
<property name="password" value="kinkaj0u"/>
|
51 |
832
|
jones
|
<property name="config-dir" value="${installdir}" />
|
52 |
|
|
<property name="default-style" value="knb" />
|
53 |
852
|
jones
|
<property name="eml-version" value="2.0beta4" />
|
54 |
|
|
<property name="eml-tag" value="RELEASE_EML_2_BETA_4" />
|
55 |
348
|
jones
|
|
56 |
588
|
berkley
|
<filter token="jdbc-connect" value="${jdbc-connect}"/>
|
57 |
614
|
bojilova
|
<filter token="install-dir" value="${installdir}"/>
|
58 |
586
|
berkley
|
<filter token="server" value="${server}"/>
|
59 |
|
|
<filter token="replication-log" value="${replication-log}"/>
|
60 |
348
|
jones
|
<filter token="release" value="${release}"/>
|
61 |
|
|
<filter token="servlet-path" value="${servlet-path}"/>
|
62 |
359
|
bojilova
|
<filter token="html-path" value="${html-path}"/>
|
63 |
362
|
jones
|
<filter token="user" value="${user}"/>
|
64 |
|
|
<filter token="password" value="${password}"/>
|
65 |
409
|
berkley
|
<filter token="image-path" value="${image-path}"/>
|
66 |
828
|
jones
|
<filter token="style-path" value="${style-path}"/>
|
67 |
506
|
jones
|
<filter token="web-base-url" value="${web-base-url}"/>
|
68 |
525
|
berkley
|
<filter token="replication-path" value="${replication-path}"/>
|
69 |
832
|
jones
|
<filter token="config-dir" value="${config-dir}"/>
|
70 |
|
|
<filter token="default-style" value="${default-style}"/>
|
71 |
254
|
jones
|
<property name="srcdir" value="./src" />
|
72 |
348
|
jones
|
|
73 |
|
|
<property name="build.dir" value="./build"/>
|
74 |
|
|
<property name="build.src" value="${build.dir}/src"/>
|
75 |
|
|
<property name="build.dest" value="${build.dir}/classes"/>
|
76 |
516
|
jones
|
<property name="build.docs" value="${build.dir}/docs"/>
|
77 |
348
|
jones
|
<property name="build.samples" value="${build.dir}/samples"/>
|
78 |
|
|
<property name="build.tests" value="${build.dir}/tests"/>
|
79 |
|
|
<property name="build.data" value="${build.dir}/data"/>
|
80 |
806
|
jones
|
<property name="build.javadocs" value="${build.dir}/docs/api"/>
|
81 |
409
|
berkley
|
<property name="build.img" value="/opt/httpd/html${image-path}"/>
|
82 |
348
|
jones
|
|
83 |
806
|
jones
|
<property name="dist.dir" value="./dist"/>
|
84 |
|
|
<property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
|
85 |
|
|
<property name="ver.src" value="${ver.dir}/src"/>
|
86 |
|
|
|
87 |
113
|
jones
|
<property name="oracle_home"
|
88 |
329
|
jones
|
value="/oracle01/app/oracle/product/8.1.6" />
|
89 |
|
|
<property name="toolsdir"
|
90 |
|
|
value="/usr/local/devtools" />
|
91 |
113
|
jones
|
<property name="xmlp"
|
92 |
329
|
jones
|
value="${toolsdir}/OracleXSU111/lib/xmlparserv2.jar" />
|
93 |
185
|
jones
|
<property name="xmlp2"
|
94 |
329
|
jones
|
value="${toolsdir}/xerces-1_1_3/xerces.jar" />
|
95 |
113
|
jones
|
<property name="jdbc"
|
96 |
|
|
value="${oracle_home}/jdbc/lib/classes111.zip" />
|
97 |
|
|
<property name="jserv"
|
98 |
|
|
value="/usr/lib/apache/ApacheJServ.jar" />
|
99 |
|
|
<property name="jsdk"
|
100 |
329
|
jones
|
value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
|
101 |
213
|
jones
|
<property name="srb"
|
102 |
|
|
value="lib/srbrmi" />
|
103 |
798
|
jones
|
<property name="cos"
|
104 |
|
|
value="lib/cos.jar" />
|
105 |
113
|
jones
|
<property name="cpath"
|
106 |
798
|
jones
|
value="${xmlp2}:${xmlp}:${jdbc}:${jserv}:${jsdk}:${srb}:${cos}"/>
|
107 |
254
|
jones
|
<property name="package.home" value="edu/ucsb/nceas/metacat" />
|
108 |
348
|
jones
|
|
109 |
113
|
jones
|
</target>
|
110 |
|
|
|
111 |
348
|
jones
|
<target name="prepare" depends="init">
|
112 |
|
|
<mkdir dir="${build.dir}"/>
|
113 |
|
|
<mkdir dir="${build.src}"/>
|
114 |
|
|
<mkdir dir="${build.dest}"/>
|
115 |
516
|
jones
|
<mkdir dir="${build.javadocs}"/>
|
116 |
348
|
jones
|
|
117 |
822
|
jones
|
<copy todir="${build.src}" filtering="yes">
|
118 |
|
|
<fileset dir="${srcdir}">
|
119 |
|
|
<include name="edu/**"/>
|
120 |
|
|
<include name="com/**"/>
|
121 |
|
|
<exclude name="**/CVS*"/>
|
122 |
|
|
<exclude name="**/.#*"/>
|
123 |
|
|
<exclude name="**/*.sql"/>
|
124 |
|
|
</fileset>
|
125 |
|
|
</copy>
|
126 |
348
|
jones
|
</target>
|
127 |
|
|
|
128 |
|
|
<target name="compile" depends="prepare">
|
129 |
|
|
<javac srcdir="${build.src}"
|
130 |
|
|
destdir="${build.dest}"
|
131 |
257
|
jones
|
classpath="${cpath}"
|
132 |
|
|
excludes="**/*.sql" />
|
133 |
822
|
jones
|
<copy file="lib/metacat.properties"
|
134 |
|
|
tofile="${build.dest}/${package.home}/metacat.properties"
|
135 |
|
|
filtering="yes" />
|
136 |
|
|
<copy file="lib/srbProps.properties"
|
137 |
|
|
tofile="${build.dest}/${package.home}/srbProps.properties"/>
|
138 |
113
|
jones
|
</target>
|
139 |
|
|
|
140 |
204
|
jones
|
<target name="jar" depends="compile">
|
141 |
353
|
jones
|
<delete file="${build.dir}/${name}.jar" />
|
142 |
822
|
jones
|
<copy todir="${build.dest}">
|
143 |
|
|
<fileset dir="lib/srbrmi"/>
|
144 |
|
|
</copy>
|
145 |
635
|
jones
|
<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
|
146 |
|
|
excludes="**/protocols/" />
|
147 |
113
|
jones
|
</target>
|
148 |
635
|
jones
|
|
149 |
|
|
<target name="protocol" depends="compile">
|
150 |
|
|
<delete file="${build.dir}/protocol.jar" />
|
151 |
|
|
<jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
|
152 |
|
|
includes="**/protocols/" />
|
153 |
|
|
</target>
|
154 |
113
|
jones
|
|
155 |
204
|
jones
|
<target name="install" depends="jar">
|
156 |
329
|
jones
|
<mkdir dir="${installdir}/WEB-INF/lib" />
|
157 |
822
|
jones
|
<copy file="${build.dir}/${name}.jar"
|
158 |
|
|
tofile="${installdir}/WEB-INF/lib/${name}.jar" />
|
159 |
|
|
<copy file="${xmlp2}"
|
160 |
|
|
tofile="${installdir}/WEB-INF/lib/xerces.jar" />
|
161 |
|
|
<copy file="${xmlp}"
|
162 |
|
|
tofile="${installdir}/WEB-INF/lib/xmlparserv2.jar" />
|
163 |
|
|
<copy file="${jdbc}"
|
164 |
|
|
tofile="${installdir}/WEB-INF/lib/oracle-jdbc111.jar" />
|
165 |
|
|
<copy file="${cos}"
|
166 |
|
|
tofile="${installdir}/WEB-INF/lib/cos.jar" />
|
167 |
|
|
<copy file="lib/web.xml"
|
168 |
|
|
tofile="${installdir}/WEB-INF/web.xml" />
|
169 |
|
|
<copy todir="${build.img}" filtering="no">
|
170 |
|
|
<fileset dir="lib">
|
171 |
|
|
<include name="**/*.jpg"/>
|
172 |
|
|
<include name="**/*.png"/>
|
173 |
|
|
<include name="**/*.gif"/>
|
174 |
|
|
</fileset>
|
175 |
|
|
</copy>
|
176 |
|
|
<copy todir="${installdir}" filtering="yes">
|
177 |
|
|
<fileset dir="lib">
|
178 |
|
|
<exclude name="*.jar"/>
|
179 |
|
|
<exclude name="*.properties"/>
|
180 |
|
|
<exclude name="web.xml"/>
|
181 |
|
|
<exclude name="**/srbrmi*"/>
|
182 |
|
|
</fileset>
|
183 |
|
|
</copy>
|
184 |
810
|
berkley
|
<mkdir dir="${installdir}/dtd" />
|
185 |
822
|
jones
|
<copy todir="${installdir}/dtd" filtering="yes">
|
186 |
|
|
<fileset dir="lib/dtd">
|
187 |
|
|
<include name="*.dtd"/>
|
188 |
|
|
</fileset>
|
189 |
|
|
</copy>
|
190 |
204
|
jones
|
</target>
|
191 |
|
|
|
192 |
113
|
jones
|
<target name="clean" depends="init">
|
193 |
822
|
jones
|
<delete dir="${build.dir}" />
|
194 |
113
|
jones
|
</target>
|
195 |
|
|
|
196 |
516
|
jones
|
<target name="jdoc" depends="prepare">
|
197 |
822
|
jones
|
<javadoc packagenames="edu.ucsb.nceas.*"
|
198 |
516
|
jones
|
sourcepath="${build.src}"
|
199 |
|
|
destdir="${build.javadocs}"
|
200 |
113
|
jones
|
author="true"
|
201 |
|
|
version="true"
|
202 |
|
|
use="true"
|
203 |
348
|
jones
|
windowtitle="${Name} API"
|
204 |
|
|
doctitle="<h1>${Name}</h1>"
|
205 |
113
|
jones
|
bottom="<i>Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>"
|
206 |
|
|
/>
|
207 |
|
|
</target>
|
208 |
|
|
|
209 |
806
|
jones
|
<target name="dist" depends="jar,protocol,jdoc">
|
210 |
|
|
<mkdir dir="${dist.dir}"/>
|
211 |
|
|
<delete dir="${ver.dir}" />
|
212 |
|
|
<mkdir dir="${ver.dir}"/>
|
213 |
|
|
<copy todir="${ver.dir}">
|
214 |
|
|
<fileset dir="." excludes="**/CVS* **/.#* **/src* **/test* **/build*"/>
|
215 |
|
|
</copy>
|
216 |
|
|
<copy todir="${ver.dir}" file="build.xml"/>
|
217 |
|
|
<copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
|
218 |
|
|
<copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
|
219 |
|
|
<copy todir="${ver.dir}/docs/dev">
|
220 |
|
|
<fileset dir="${build.dir}/docs"/>
|
221 |
|
|
</copy>
|
222 |
|
|
|
223 |
|
|
<delete file="./lib/${name}-${release}.zip"/>
|
224 |
|
|
<zip zipfile="./lib/${name}-${release}.zip" basedir="${dist.dir}"/>
|
225 |
|
|
<delete file="./lib/${name}-${release}.tar.gz" />
|
226 |
|
|
<tar tarfile="./lib/${name}-${release}.tar" basedir="${dist.dir}"/>
|
227 |
|
|
<gzip zipfile="./lib/${name}-${release}.tar.gz"
|
228 |
|
|
src="./lib/${name}-${release}.tar"/>
|
229 |
|
|
<delete file="./lib/${name}-${release}.tar" />
|
230 |
|
|
</target>
|
231 |
|
|
|
232 |
|
|
<target name="distsrc" depends="dist">
|
233 |
|
|
<mkdir dir="${ver.src}"/>
|
234 |
|
|
<copy todir="${ver.src}">
|
235 |
|
|
<fileset dir="./src"/>
|
236 |
|
|
</copy>
|
237 |
|
|
|
238 |
|
|
<delete file="./lib/${name}-src-${release}.zip"/>
|
239 |
|
|
<zip zipfile="./lib/${name}-src-${release}.zip" basedir="${dist.dir}"/>
|
240 |
|
|
<delete file="./lib/${name}-src-${release}.tar.gz" />
|
241 |
|
|
<tar tarfile="./lib/${name}-src-${release}.tar" basedir="${dist.dir}"/>
|
242 |
|
|
<gzip zipfile="./lib/${name}-src-${release}.tar.gz"
|
243 |
|
|
src="./lib/${name}-src-${release}.tar"/>
|
244 |
|
|
<delete file="./lib/${name}-src-${release}.tar" />
|
245 |
807
|
jones
|
<delete dir="${dist.dir}"/>
|
246 |
806
|
jones
|
</target>
|
247 |
|
|
|
248 |
852
|
jones
|
<target name="emlinst" depends="init">
|
249 |
|
|
<mkdir dir="lib/dtd" />
|
250 |
|
|
<cvs command="checkout -d lib/dtd" package="mdstandards/eml"
|
251 |
|
|
tag="${eml-tag}" />
|
252 |
|
|
</target>
|
253 |
113
|
jones
|
</project>
|