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: jones $'
|
10
|
* '$Date: 2001-10-22 09:46:55 -0700 (Mon, 22 Oct 2001) $'
|
11
|
* '$Revision: 853 $'
|
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/jones" />
|
37
|
<property name="name" value="metacat"/>
|
38
|
<property name="Name" value="MetaCat"/>
|
39
|
<property name="release" value="1.0beta3"/>
|
40
|
<property name="web-base-url"
|
41
|
value="http://knb.ecoinformatics.org"/>
|
42
|
<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
|
<property name="style-path" value="/jones/style"/>
|
47
|
<property name="server" value="dev.nceas.ucsb.edu:8443"/>
|
48
|
<property name="replication-log" value="/tmp/metacatreplication.log"/>
|
49
|
<property name="user" value="jones"/>
|
50
|
<property name="password" value="kinkaj0u"/>
|
51
|
<property name="config-dir" value="${installdir}" />
|
52
|
<property name="default-style" value="knb" />
|
53
|
<property name="eml-version" value="2.0beta4" />
|
54
|
<property name="eml-tag" value="RELEASE_EML_2_BETA_4" />
|
55
|
|
56
|
<filter token="jdbc-connect" value="${jdbc-connect}"/>
|
57
|
<filter token="install-dir" value="${installdir}"/>
|
58
|
<filter token="server" value="${server}"/>
|
59
|
<filter token="replication-log" value="${replication-log}"/>
|
60
|
<filter token="release" value="${release}"/>
|
61
|
<filter token="servlet-path" value="${servlet-path}"/>
|
62
|
<filter token="html-path" value="${html-path}"/>
|
63
|
<filter token="user" value="${user}"/>
|
64
|
<filter token="password" value="${password}"/>
|
65
|
<filter token="image-path" value="${image-path}"/>
|
66
|
<filter token="style-path" value="${style-path}"/>
|
67
|
<filter token="web-base-url" value="${web-base-url}"/>
|
68
|
<filter token="replication-path" value="${replication-path}"/>
|
69
|
<filter token="config-dir" value="${config-dir}"/>
|
70
|
<filter token="default-style" value="${default-style}"/>
|
71
|
<property name="srcdir" value="./src" />
|
72
|
|
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
|
<property name="build.docs" value="${build.dir}/docs"/>
|
77
|
<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
|
<property name="build.javadocs" value="${build.dir}/docs/api"/>
|
81
|
<property name="build.img" value="/opt/httpd/html${image-path}"/>
|
82
|
|
83
|
<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
|
<property name="oracle_home"
|
88
|
value="/oracle01/app/oracle/product/8.1.6" />
|
89
|
<property name="toolsdir"
|
90
|
value="/usr/local/devtools" />
|
91
|
<property name="xmlp"
|
92
|
value="${toolsdir}/OracleXSU111/lib/xmlparserv2.jar" />
|
93
|
<property name="xmlp2"
|
94
|
value="${toolsdir}/xerces-1_1_3/xerces.jar" />
|
95
|
<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
|
value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
|
101
|
<property name="srb"
|
102
|
value="lib/srbrmi" />
|
103
|
<property name="cos"
|
104
|
value="lib/cos.jar" />
|
105
|
<property name="cpath"
|
106
|
value="${xmlp2}:${xmlp}:${jdbc}:${jserv}:${jsdk}:${srb}:${cos}"/>
|
107
|
<property name="package.home" value="edu/ucsb/nceas/metacat" />
|
108
|
|
109
|
</target>
|
110
|
|
111
|
<target name="prepare" depends="init">
|
112
|
<mkdir dir="${build.dir}"/>
|
113
|
<mkdir dir="${build.src}"/>
|
114
|
<mkdir dir="${build.dest}"/>
|
115
|
<mkdir dir="${build.javadocs}"/>
|
116
|
|
117
|
<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
|
</target>
|
127
|
|
128
|
<target name="compile" depends="prepare">
|
129
|
<javac srcdir="${build.src}"
|
130
|
destdir="${build.dest}"
|
131
|
classpath="${cpath}"
|
132
|
excludes="**/*.sql" />
|
133
|
<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
|
</target>
|
139
|
|
140
|
<target name="jar" depends="compile">
|
141
|
<delete file="${build.dir}/${name}.jar" />
|
142
|
<copy todir="${build.dest}">
|
143
|
<fileset dir="lib/srbrmi"/>
|
144
|
</copy>
|
145
|
<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
|
146
|
excludes="**/protocols/" />
|
147
|
</target>
|
148
|
|
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
|
|
155
|
<target name="install" depends="jar">
|
156
|
<mkdir dir="${installdir}/WEB-INF/lib" />
|
157
|
<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
|
<mkdir dir="${installdir}/dtd" />
|
185
|
<copy todir="${installdir}/dtd" filtering="yes">
|
186
|
<fileset dir="lib/dtd">
|
187
|
<include name="*.dtd"/>
|
188
|
</fileset>
|
189
|
</copy>
|
190
|
</target>
|
191
|
|
192
|
<target name="clean" depends="init">
|
193
|
<delete dir="${build.dir}" />
|
194
|
</target>
|
195
|
|
196
|
<target name="jdoc" depends="prepare">
|
197
|
<javadoc packagenames="edu.ucsb.nceas.*"
|
198
|
sourcepath="${build.src}"
|
199
|
destdir="${build.javadocs}"
|
200
|
author="true"
|
201
|
version="true"
|
202
|
use="true"
|
203
|
windowtitle="${Name} API"
|
204
|
doctitle="<h1>${Name}</h1>"
|
205
|
bottom="<i>Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>"
|
206
|
/>
|
207
|
</target>
|
208
|
|
209
|
<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
|
<delete dir="${dist.dir}"/>
|
246
|
</target>
|
247
|
|
248
|
<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
|
</project>
|