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