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