1 |
113
|
jones
|
<?xml version="1.0"?>
|
2 |
1311
|
berkley
|
<!--
|
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 |
1292
|
tao
|
* '$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 |
1311
|
berkley
|
-->
|
32 |
329
|
jones
|
<project name="metacat" default="jar" basedir=".">
|
33 |
931
|
jones
|
|
34 |
925
|
berkley
|
<target name="oracle">
|
35 |
931
|
jones
|
<!-- Customize these properties if you are using oracle -->
|
36 |
|
|
<property name="jdbc-connect"
|
37 |
|
|
value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
|
38 |
925
|
berkley
|
<property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
|
39 |
|
|
<property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
|
40 |
|
|
<property name="oracle_home" value="/oracle01/app/oracle/product/8.1.6" />
|
41 |
|
|
<property name="jdbc" value="${oracle_home}/jdbc/lib/classes111.zip" />
|
42 |
|
|
</target>
|
43 |
1311
|
berkley
|
|
44 |
925
|
berkley
|
<target name="postgresql">
|
45 |
931
|
jones
|
<!-- Customize these properties if you are using postgres -->
|
46 |
1311
|
berkley
|
<property name="jdbc-connect"
|
47 |
1570
|
tao
|
value="jdbc:postgresql://localhost/exp"/>
|
48 |
925
|
berkley
|
<property name="dbDriver" value="org.postgresql.Driver"/>
|
49 |
1311
|
berkley
|
<property name="dbAdapter"
|
50 |
931
|
jones
|
value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
|
51 |
1522
|
berkley
|
<property name="jdbc" value="/usr/share/pgsql/jdbc7.1-1.2.jar" />
|
52 |
925
|
berkley
|
</target>
|
53 |
1311
|
berkley
|
|
54 |
1500
|
tao
|
<target name="config" depends="postgresql">
|
55 |
1311
|
berkley
|
<!-- Change the 'depends' attribute above to 'postgresql' to install
|
56 |
931
|
jones
|
metacat with postgres instead of oracle -->
|
57 |
|
|
|
58 |
|
|
<!-- Customize these properties for your system -->
|
59 |
1455
|
tao
|
<property name="tomcat" value="/usr/local/devtools/jakarta-tomcat" />
|
60 |
1570
|
tao
|
<property name="webapps" value="/usr/local/devtools/jakarta-tomcat/webapps" />
|
61 |
|
|
<property name="context" value="tao" />
|
62 |
|
|
<property name="user" value="tao"/>
|
63 |
1538
|
berkley
|
<property name="password" value=""/>
|
64 |
1570
|
tao
|
<property name="server" value="pine.nceas.ucsb.edu:8443"/>
|
65 |
|
|
<property name="systemidserver" value="http://pine.nceas.ucsb.edu:8080" />
|
66 |
|
|
<property name="datafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/data" />
|
67 |
|
|
<property name="inlinedatafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/inlinedata" />
|
68 |
1523
|
tao
|
<property name="debuglevel" value="45" />
|
69 |
1292
|
tao
|
<property name="forcereplicationwaitingtime" value="30000"/>
|
70 |
1523
|
tao
|
<property name="cvsroot"
|
71 |
1570
|
tao
|
value=":ext:tao@cvs.ecoinformatics.org:/cvs" />
|
72 |
1311
|
berkley
|
<property name="web-base-url"
|
73 |
931
|
jones
|
value="http://knb.ecoinformatics.org"/>
|
74 |
|
|
<property name="default-style" value="knb" />
|
75 |
1522
|
berkley
|
<property name="morphosourcedir" value="../morpho" />
|
76 |
1570
|
tao
|
<property name="defaultcontenttype" value="application/octet-stream" />
|
77 |
931
|
jones
|
|
78 |
|
|
<!-- Make sure these paths match the location of the jar files
|
79 |
|
|
on your system, the defaults should usually work -->
|
80 |
1311
|
berkley
|
<property name="jsdk"
|
81 |
1570
|
tao
|
value="${tomcat}/lib/common/servlet.jar" />
|
82 |
1311
|
berkley
|
<property name="xmlp"
|
83 |
1376
|
tao
|
value="lib/xercesImpl.jar" />
|
84 |
1311
|
berkley
|
<property name="srb"
|
85 |
931
|
jones
|
value="lib/srbrmi" />
|
86 |
1311
|
berkley
|
<property name="cos"
|
87 |
931
|
jones
|
value="lib/cos.jar" />
|
88 |
939
|
tao
|
<property name="morpho"
|
89 |
|
|
value="lib/morpho.jar" />
|
90 |
931
|
jones
|
<property name="xalan"
|
91 |
|
|
value="lib/xalan/xalan.jar" />
|
92 |
|
|
<property name="apis"
|
93 |
|
|
value="lib/xalan/xml-apis.jar" />
|
94 |
1103
|
tao
|
<property name="httpclient"
|
95 |
|
|
value="${morphosourcedir}/lib/httpclient.jar" />
|
96 |
|
|
<property name="itis"
|
97 |
1311
|
berkley
|
value="${morphosourcedir}/lib/itislib.jar" />
|
98 |
1470
|
tao
|
<property name="emlparser"
|
99 |
|
|
value="lib/eml.jar" />
|
100 |
|
|
<property name="configxml"
|
101 |
|
|
value="lib/configxml.jar" />
|
102 |
1578
|
tao
|
<property name="itislib"
|
103 |
|
|
value="lib/itislib.jar" />
|
104 |
931
|
jones
|
|
105 |
1487
|
tao
|
<property name="emlparser"
|
106 |
|
|
value="lib/eml.jar" />
|
107 |
1103
|
tao
|
</target>
|
108 |
|
|
|
109 |
931
|
jones
|
<target name="init" depends="config">
|
110 |
|
|
<!-- It is less likely you'll need to make any changes from here down,
|
111 |
|
|
but customization is possible -->
|
112 |
|
|
<property name="installdir" value="${webapps}/${context}" />
|
113 |
348
|
jones
|
<property name="name" value="metacat"/>
|
114 |
|
|
<property name="Name" value="MetaCat"/>
|
115 |
1538
|
berkley
|
<property name="debugprefix" value="${Name}:"/>
|
116 |
1339
|
tao
|
<property name="release" value="1.2.1"/>
|
117 |
1311
|
berkley
|
<property name="replication-path"
|
118 |
931
|
jones
|
value="/${context}/servlet/replication"/>
|
119 |
|
|
<property name="servlet-path" value="/${context}/servlet/metacat"/>
|
120 |
|
|
<property name="html-path" value="/${context}"/>
|
121 |
1437
|
berkley
|
<property name="image-path" value="/${context}" />
|
122 |
931
|
jones
|
<property name="style-path" value="/${context}/style"/>
|
123 |
923
|
jones
|
<property name="replication-log" value="/tmp/metacatreplication.log"/>
|
124 |
832
|
jones
|
<property name="config-dir" value="${installdir}" />
|
125 |
924
|
jones
|
<property name="eml-module" value="eml" />
|
126 |
877
|
jones
|
<property name="eml-version" value="2.0.0beta6" />
|
127 |
1227
|
tao
|
<property name="eml-tag" value="RELEASE_EML_2_0_0_BETA_6_REV1" />
|
128 |
1463
|
tao
|
<property name="eml2-tag" value="XALAN_STYLESHEET_CHANGES" />
|
129 |
1570
|
tao
|
<property name="eml2namespace" value="eml://ecoinformatics.org/eml-2.0.0" />
|
130 |
348
|
jones
|
|
131 |
1311
|
berkley
|
<property name="cpath"
|
132 |
1470
|
tao
|
value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${srb}:${cos}:${morpho}:${emlparser}"/>
|
133 |
882
|
jones
|
|
134 |
|
|
<filter token="docrooturl" value="./" />
|
135 |
588
|
berkley
|
<filter token="jdbc-connect" value="${jdbc-connect}"/>
|
136 |
882
|
jones
|
<filter token="dbDriver" value="${dbDriver}"/>
|
137 |
915
|
berkley
|
<filter token="dbAdapter" value="${dbAdapter}"/>
|
138 |
614
|
bojilova
|
<filter token="install-dir" value="${installdir}"/>
|
139 |
586
|
berkley
|
<filter token="server" value="${server}"/>
|
140 |
977
|
tao
|
<filter token="systemidserver" value="${systemidserver}"/>
|
141 |
586
|
berkley
|
<filter token="replication-log" value="${replication-log}"/>
|
142 |
348
|
jones
|
<filter token="release" value="${release}"/>
|
143 |
|
|
<filter token="servlet-path" value="${servlet-path}"/>
|
144 |
359
|
bojilova
|
<filter token="html-path" value="${html-path}"/>
|
145 |
362
|
jones
|
<filter token="user" value="${user}"/>
|
146 |
|
|
<filter token="password" value="${password}"/>
|
147 |
409
|
berkley
|
<filter token="image-path" value="${image-path}"/>
|
148 |
828
|
jones
|
<filter token="style-path" value="${style-path}"/>
|
149 |
506
|
jones
|
<filter token="web-base-url" value="${web-base-url}"/>
|
150 |
525
|
berkley
|
<filter token="replication-path" value="${replication-path}"/>
|
151 |
832
|
jones
|
<filter token="config-dir" value="${config-dir}"/>
|
152 |
|
|
<filter token="default-style" value="${default-style}"/>
|
153 |
877
|
jones
|
<filter token="eml-version" value="${eml-version}"/>
|
154 |
1570
|
tao
|
<filter token="eml2namespace" value="${eml2namespace}"/>
|
155 |
1009
|
tao
|
<filter token="context" value="${context}"/>
|
156 |
1292
|
tao
|
<filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" />
|
157 |
1051
|
tao
|
<filter token="debuglevel" value="${debuglevel}" />
|
158 |
1079
|
tao
|
<filter token="datafilepath" value="${datafilepath}" />
|
159 |
1455
|
tao
|
<filter token="inlinedatafilepath" value="${inlinedatafilepath}" />
|
160 |
1522
|
berkley
|
<filter token="defaultcontenttype" value="${defaultcontenttype}" />
|
161 |
1538
|
berkley
|
<filter token="debugprefix" value="${debugprefix}"/>
|
162 |
1487
|
tao
|
|
163 |
254
|
jones
|
<property name="srcdir" value="./src" />
|
164 |
1116
|
tao
|
<property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
|
165 |
|
|
<property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
|
166 |
348
|
jones
|
<property name="build.dir" value="./build"/>
|
167 |
|
|
<property name="build.src" value="${build.dir}/src"/>
|
168 |
|
|
<property name="build.dest" value="${build.dir}/classes"/>
|
169 |
516
|
jones
|
<property name="build.docs" value="${build.dir}/docs"/>
|
170 |
348
|
jones
|
<property name="build.samples" value="${build.dir}/samples"/>
|
171 |
|
|
<property name="build.tests" value="${build.dir}/tests"/>
|
172 |
1116
|
tao
|
<property name="build.metacattest" value="${build.tests}/metacattest"/>
|
173 |
|
|
<property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
|
174 |
348
|
jones
|
<property name="build.data" value="${build.dir}/data"/>
|
175 |
806
|
jones
|
<property name="build.javadocs" value="${build.dir}/docs/api"/>
|
176 |
1437
|
berkley
|
<property name="build.img" value="${installdir}"/>
|
177 |
348
|
jones
|
|
178 |
882
|
jones
|
<property name="dist.dir" value="dist"/>
|
179 |
806
|
jones
|
<property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
|
180 |
|
|
<property name="ver.src" value="${ver.dir}/src"/>
|
181 |
|
|
|
182 |
254
|
jones
|
<property name="package.home" value="edu/ucsb/nceas/metacat" />
|
183 |
915
|
berkley
|
|
184 |
113
|
jones
|
</target>
|
185 |
1311
|
berkley
|
|
186 |
348
|
jones
|
<target name="prepare" depends="init">
|
187 |
|
|
<mkdir dir="${build.dir}"/>
|
188 |
|
|
<mkdir dir="${build.src}"/>
|
189 |
|
|
<mkdir dir="${build.dest}"/>
|
190 |
516
|
jones
|
<mkdir dir="${build.javadocs}"/>
|
191 |
348
|
jones
|
|
192 |
822
|
jones
|
<copy todir="${build.src}" filtering="yes">
|
193 |
|
|
<fileset dir="${srcdir}">
|
194 |
|
|
<include name="edu/**"/>
|
195 |
|
|
<include name="com/**"/>
|
196 |
877
|
jones
|
<include name="**/*.sql"/>
|
197 |
822
|
jones
|
<exclude name="**/CVS*"/>
|
198 |
|
|
<exclude name="**/.#*"/>
|
199 |
|
|
</fileset>
|
200 |
|
|
</copy>
|
201 |
348
|
jones
|
</target>
|
202 |
|
|
|
203 |
|
|
<target name="compile" depends="prepare">
|
204 |
1311
|
berkley
|
<javac srcdir="${build.src}"
|
205 |
|
|
destdir="${build.dest}"
|
206 |
|
|
classpath="${cpath}"
|
207 |
|
|
excludes="**/*.sql" />
|
208 |
|
|
<copy file="lib/metacat.properties"
|
209 |
|
|
tofile="${build.dest}/${package.home}/metacat.properties"
|
210 |
822
|
jones
|
filtering="yes" />
|
211 |
1311
|
berkley
|
<copy file="lib/srbProps.properties"
|
212 |
822
|
jones
|
tofile="${build.dest}/${package.home}/srbProps.properties"/>
|
213 |
1311
|
berkley
|
</target>
|
214 |
113
|
jones
|
|
215 |
204
|
jones
|
<target name="jar" depends="compile">
|
216 |
353
|
jones
|
<delete file="${build.dir}/${name}.jar" />
|
217 |
822
|
jones
|
<copy todir="${build.dest}">
|
218 |
|
|
<fileset dir="lib/srbrmi"/>
|
219 |
|
|
</copy>
|
220 |
635
|
jones
|
<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
|
221 |
|
|
excludes="**/protocols/" />
|
222 |
1311
|
berkley
|
</target>
|
223 |
|
|
|
224 |
635
|
jones
|
<target name="protocol" depends="compile">
|
225 |
|
|
<delete file="${build.dir}/protocol.jar" />
|
226 |
|
|
<jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
|
227 |
|
|
includes="**/protocols/" />
|
228 |
1311
|
berkley
|
</target>
|
229 |
113
|
jones
|
|
230 |
877
|
jones
|
<target name="getdtd" depends="prepare">
|
231 |
1307
|
jones
|
<echo>Enter CVS password: </echo>
|
232 |
|
|
<cvs cvsRoot="${cvsroot}"
|
233 |
|
|
package="${eml-module}"
|
234 |
|
|
tag="${eml-tag}"
|
235 |
|
|
dest="${build.src}" />
|
236 |
|
|
<mkdir dir="lib/dtd" />
|
237 |
|
|
<copy todir="lib/dtd" filtering="yes">
|
238 |
|
|
<fileset dir="${build.src}/${eml-module}">
|
239 |
|
|
<include name="*.dtd"/>
|
240 |
|
|
</fileset>
|
241 |
|
|
<mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
|
242 |
|
|
</copy>
|
243 |
1463
|
tao
|
</target>
|
244 |
1522
|
berkley
|
|
245 |
1463
|
tao
|
<target name="getschema" depends="prepare">
|
246 |
|
|
<echo>Enter CVS password: </echo>
|
247 |
|
|
<cvs cvsRoot="${cvsroot}"
|
248 |
|
|
package="${eml-module}"
|
249 |
|
|
tag="${eml2-tag}"
|
250 |
|
|
dest="${build.src}" />
|
251 |
|
|
<mkdir dir="lib/schema" />
|
252 |
|
|
<copy todir="lib/schema" filtering="yes">
|
253 |
|
|
<fileset dir="${build.src}/${eml-module}">
|
254 |
|
|
<include name="*.xsd"/>
|
255 |
|
|
</fileset>
|
256 |
|
|
</copy>
|
257 |
1314
|
tao
|
<copy todir="lib/style">
|
258 |
1307
|
jones
|
<fileset dir="${build.src}/${eml-module}/style">
|
259 |
1311
|
berkley
|
<include name="*.xsl"/>
|
260 |
|
|
</fileset>
|
261 |
1307
|
jones
|
</copy>
|
262 |
1522
|
berkley
|
</target>
|
263 |
877
|
jones
|
|
264 |
|
|
<target name="dtdsql" depends="prepare">
|
265 |
|
|
<echo/>
|
266 |
|
|
<echo>Registering the DTDs with the new Metacat instance...</echo>
|
267 |
|
|
<sql driver="${dbDriver}"
|
268 |
|
|
classpath="${jdbc}"
|
269 |
|
|
url="${jdbc-connect}"
|
270 |
|
|
userid="${user}"
|
271 |
|
|
password="${password}"
|
272 |
|
|
src="${build.src}/loaddtd.sql" />
|
273 |
|
|
</target>
|
274 |
1570
|
tao
|
|
275 |
|
|
<target name="schemasql" depends="prepare">
|
276 |
|
|
<echo/>
|
277 |
|
|
<echo>Registering the DTDs with the new Metacat instance...</echo>
|
278 |
|
|
<sql driver="${dbDriver}"
|
279 |
|
|
classpath="${jdbc}"
|
280 |
|
|
url="${jdbc-connect}"
|
281 |
|
|
userid="${user}"
|
282 |
|
|
password="${password}"
|
283 |
|
|
src="${build.src}/loadschema.sql" />
|
284 |
|
|
</target>
|
285 |
877
|
jones
|
|
286 |
204
|
jones
|
<target name="install" depends="jar">
|
287 |
1079
|
tao
|
<mkdir dir="${datafilepath}" />
|
288 |
1455
|
tao
|
<mkdir dir="${inlinedatafilepath}" />
|
289 |
1079
|
tao
|
<chmod dir="${datafilepath}" perm="ug+w" />
|
290 |
329
|
jones
|
<mkdir dir="${installdir}/WEB-INF/lib" />
|
291 |
1311
|
berkley
|
<copy file="${build.dir}/${name}.jar"
|
292 |
822
|
jones
|
tofile="${installdir}/WEB-INF/lib/${name}.jar" />
|
293 |
1311
|
berkley
|
<copy file="${xmlp}"
|
294 |
1376
|
tao
|
tofile="${installdir}/WEB-INF/lib/xercesImpl.jar" />
|
295 |
1311
|
berkley
|
<copy file="${xalan}"
|
296 |
923
|
jones
|
tofile="${installdir}/WEB-INF/lib/xalan.jar" />
|
297 |
1311
|
berkley
|
<copy file="${apis}"
|
298 |
923
|
jones
|
tofile="${installdir}/WEB-INF/lib/xml-apis.jar" />
|
299 |
1311
|
berkley
|
<copy file="${jdbc}"
|
300 |
1522
|
berkley
|
tofile="${installdir}/WEB-INF/lib/jdbc.jar" />
|
301 |
1311
|
berkley
|
<copy file="${cos}"
|
302 |
822
|
jones
|
tofile="${installdir}/WEB-INF/lib/cos.jar" />
|
303 |
939
|
tao
|
<copy file="${morpho}"
|
304 |
1470
|
tao
|
tofile="${installdir}/WEB-INF/lib/morpho.jar" />
|
305 |
|
|
<copy file="${emlparser}"
|
306 |
1522
|
berkley
|
tofile="${installdir}/WEB-INF/lib/eml.jar" />
|
307 |
1470
|
tao
|
<copy file="${configxml}"
|
308 |
|
|
tofile="${installdir}/WEB-INF/lib/configxml.jar" />
|
309 |
1578
|
tao
|
<copy file="${itislib}"
|
310 |
|
|
tofile="${installdir}/WEB-INF/lib/itislib.jar" />
|
311 |
1311
|
berkley
|
<copy file="lib/web.xml"
|
312 |
822
|
jones
|
tofile="${installdir}/WEB-INF/web.xml" />
|
313 |
|
|
<copy todir="${build.img}" filtering="no">
|
314 |
|
|
<fileset dir="lib">
|
315 |
|
|
<include name="**/*.jpg"/>
|
316 |
|
|
<include name="**/*.png"/>
|
317 |
|
|
<include name="**/*.gif"/>
|
318 |
|
|
</fileset>
|
319 |
|
|
</copy>
|
320 |
|
|
<copy todir="${installdir}" filtering="yes">
|
321 |
|
|
<fileset dir="lib">
|
322 |
|
|
<exclude name="*.jar"/>
|
323 |
|
|
<exclude name="*.properties"/>
|
324 |
|
|
<exclude name="web.xml"/>
|
325 |
|
|
<exclude name="**/srbrmi*"/>
|
326 |
1437
|
berkley
|
<exclude name="**/*.jpg"/>
|
327 |
|
|
<exclude name="**/*.png"/>
|
328 |
|
|
<exclude name="**/*.gif"/>
|
329 |
822
|
jones
|
</fileset>
|
330 |
|
|
</copy>
|
331 |
877
|
jones
|
<echo>
|
332 |
|
|
***********************************************************
|
333 |
|
|
Remember to register the default DTDs by running the
|
334 |
|
|
"${build.src}/loaddtd.sql script". This is most easily
|
335 |
|
|
done by using the "ant dtdsql" which will run it for you.
|
336 |
|
|
***********************************************************
|
337 |
|
|
</echo>
|
338 |
1311
|
berkley
|
</target>
|
339 |
|
|
|
340 |
971
|
tao
|
<target name="test" depends="install">
|
341 |
|
|
<!-- copy and compile the tests into a jar file -->
|
342 |
1116
|
tao
|
<mkdir dir="${build.metacattest}"/>
|
343 |
1049
|
tao
|
<javac srcdir="${junittestsdir}"
|
344 |
1116
|
tao
|
destdir="${build.metacattest}"
|
345 |
1049
|
tao
|
classpath="${cpath}:${build.dir}/${name}.jar"
|
346 |
1311
|
berkley
|
includes="**/*.java" />
|
347 |
204
|
jones
|
|
348 |
1311
|
berkley
|
<jar jarfile="${build.dir}/${name}-junittests.jar"
|
349 |
|
|
basedir="${build.metacattest}"
|
350 |
|
|
includes="**/*.class" />
|
351 |
971
|
tao
|
|
352 |
|
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
353 |
|
|
<junit printsummary="yes" haltonfailure="no" fork="no"
|
354 |
|
|
haltonerror="no">
|
355 |
|
|
<classpath>
|
356 |
1049
|
tao
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-junittests.jar" />
|
357 |
971
|
tao
|
</classpath>
|
358 |
|
|
|
359 |
|
|
<formatter type="plain" />
|
360 |
|
|
|
361 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
362 |
1116
|
tao
|
<fileset dir="${build.metacattest}">
|
363 |
|
|
<include name="**/*.class" />
|
364 |
971
|
tao
|
</fileset>
|
365 |
|
|
</batchtest>
|
366 |
|
|
</junit>
|
367 |
|
|
</target>
|
368 |
1103
|
tao
|
|
369 |
1500
|
tao
|
<target name="runonetest" depends="install">
|
370 |
|
|
<!-- copy and compile the tests into a jar file -->
|
371 |
|
|
<!--<property name="testtorun" value="SubTreeTest"/> -->
|
372 |
|
|
<echo>testtorun: ${testtorun}</echo>
|
373 |
|
|
<mkdir dir="${build.metacattest}"/>
|
374 |
|
|
<javac srcdir="${junittestsdir}"
|
375 |
|
|
destdir="${build.metacattest}"
|
376 |
|
|
classpath="${cpath}:${build.dir}/${name}.jar"
|
377 |
|
|
includes="**/*.java" />
|
378 |
|
|
|
379 |
|
|
<jar jarfile="${build.dir}/${name}-junittests.jar"
|
380 |
|
|
basedir="${build.metacattest}"
|
381 |
|
|
includes="**/*.class" />
|
382 |
|
|
|
383 |
|
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
384 |
|
|
<junit printsummary="yes" haltonfailure="no" fork="no"
|
385 |
|
|
haltonerror="no">
|
386 |
|
|
<classpath>
|
387 |
|
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-junittests.jar" />
|
388 |
|
|
</classpath>
|
389 |
|
|
|
390 |
|
|
<formatter type="plain" />
|
391 |
|
|
|
392 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
393 |
|
|
<fileset dir="${build.metacattest}">
|
394 |
1522
|
berkley
|
|
395 |
1500
|
tao
|
<include name="**/${testtorun}.class" />
|
396 |
|
|
</fileset>
|
397 |
|
|
</batchtest>
|
398 |
|
|
</junit>
|
399 |
|
|
</target>
|
400 |
|
|
|
401 |
1103
|
tao
|
<target name="gethttpclient" depends="prepare">
|
402 |
1311
|
berkley
|
<!--mkdir dir="${morphosourcedir}" -->
|
403 |
1487
|
tao
|
<cvs cvsRoot="${cvsroot}"
|
404 |
1103
|
tao
|
package="morpho"
|
405 |
|
|
dest="." />
|
406 |
1107
|
tao
|
<ant dir="${morphosourcedir}" inheritAll="false" target="jar" />
|
407 |
1103
|
tao
|
</target>
|
408 |
|
|
|
409 |
|
|
<!-- run this target, we need to check out a another morpho souce dir was checked out. -->
|
410 |
|
|
<target name="nettest" depends="install">
|
411 |
|
|
<echo>***********************************
|
412 |
1311
|
berkley
|
Please run ant gethttpclient first!
|
413 |
|
|
***********************************
|
414 |
1103
|
tao
|
</echo>
|
415 |
|
|
<!-- copy and compile the tests into a jar file -->
|
416 |
1116
|
tao
|
<mkdir dir="${build.metacatnettest}"/>
|
417 |
1103
|
tao
|
<javac srcdir="${junitnettestsdir}"
|
418 |
1116
|
tao
|
destdir="${build.metacatnettest}"
|
419 |
1103
|
tao
|
classpath="${cpath}:${build.dir}/${name}.jar:${httpclient}"
|
420 |
|
|
includes="**/*.java" />
|
421 |
|
|
|
422 |
|
|
<jar jarfile="${build.dir}/${name}-junitnettests.jar"
|
423 |
1116
|
tao
|
basedir="${build.metacatnettest}"
|
424 |
1103
|
tao
|
includes="**/*.class" />
|
425 |
|
|
|
426 |
|
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
427 |
1107
|
tao
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
428 |
1103
|
tao
|
haltonerror="no">
|
429 |
1107
|
tao
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
|
430 |
1103
|
tao
|
<classpath>
|
431 |
|
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${httpclient}:${build.dir}/${name}-junitnettests.jar:${itis}" />
|
432 |
|
|
</classpath>
|
433 |
|
|
|
434 |
|
|
<formatter type="plain" />
|
435 |
|
|
|
436 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
437 |
1116
|
tao
|
<fileset dir="${build.metacatnettest}">
|
438 |
|
|
<include name="**/*.class" />
|
439 |
1103
|
tao
|
</fileset>
|
440 |
|
|
</batchtest>
|
441 |
|
|
</junit>
|
442 |
1311
|
berkley
|
</target>
|
443 |
1103
|
tao
|
|
444 |
1522
|
berkley
|
<target name="servletclean" depends="clean">
|
445 |
|
|
<delete dir="${installdir}" />
|
446 |
|
|
</target>
|
447 |
|
|
|
448 |
|
|
|
449 |
113
|
jones
|
<target name="clean" depends="init">
|
450 |
822
|
jones
|
<delete dir="${build.dir}" />
|
451 |
113
|
jones
|
</target>
|
452 |
|
|
|
453 |
516
|
jones
|
<target name="jdoc" depends="prepare">
|
454 |
822
|
jones
|
<javadoc packagenames="edu.ucsb.nceas.*"
|
455 |
516
|
jones
|
sourcepath="${build.src}"
|
456 |
|
|
destdir="${build.javadocs}"
|
457 |
113
|
jones
|
author="true"
|
458 |
|
|
version="true"
|
459 |
|
|
use="true"
|
460 |
348
|
jones
|
windowtitle="${Name} API"
|
461 |
|
|
doctitle="<h1>${Name}</h1>"
|
462 |
113
|
jones
|
bottom="<i>Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>"
|
463 |
|
|
/>
|
464 |
|
|
</target>
|
465 |
|
|
|
466 |
879
|
jones
|
<target name="dist" depends="jar,protocol,jdoc,getdtd">
|
467 |
806
|
jones
|
<mkdir dir="${dist.dir}"/>
|
468 |
|
|
<delete dir="${ver.dir}" />
|
469 |
|
|
<mkdir dir="${ver.dir}"/>
|
470 |
|
|
<copy todir="${ver.dir}">
|
471 |
1311
|
berkley
|
<fileset dir="."
|
472 |
882
|
jones
|
excludes="**/CVS* **/.#* **/src* **/test* **/build* **/docs* ${dist.dir}"/>
|
473 |
806
|
jones
|
</copy>
|
474 |
|
|
<copy todir="${ver.dir}" file="build.xml"/>
|
475 |
|
|
<copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
|
476 |
|
|
<copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
|
477 |
882
|
jones
|
|
478 |
|
|
<copy todir="${ver.dir}/docs" filtering="yes">
|
479 |
|
|
<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
|
480 |
|
|
</copy>
|
481 |
|
|
<copy todir="${ver.dir}/docs" filtering="no">
|
482 |
|
|
<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
|
483 |
|
|
</copy>
|
484 |
806
|
jones
|
<copy todir="${ver.dir}/docs/dev">
|
485 |
|
|
<fileset dir="${build.dir}/docs"/>
|
486 |
|
|
</copy>
|
487 |
917
|
berkley
|
<copy todir="${ver.dir}/src">
|
488 |
|
|
<fileset dir="${build.dir}/src"/>
|
489 |
|
|
</copy>
|
490 |
|
|
|
491 |
992
|
berkley
|
<delete dir="./${ver.dir}/${build.dir}"/>
|
492 |
|
|
<delete dir="./${ver.dir}/dist"/>
|
493 |
882
|
jones
|
<delete file="./${name}-${release}.zip"/>
|
494 |
1312
|
tao
|
<zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
495 |
882
|
jones
|
<delete file="./${name}-${release}.tar.gz" />
|
496 |
1312
|
tao
|
<tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
497 |
1311
|
berkley
|
<gzip zipfile="./${name}-${release}.tar.gz"
|
498 |
882
|
jones
|
src="./${name}-${release}.tar"/>
|
499 |
|
|
<delete file="./${name}-${release}.tar" />
|
500 |
1311
|
berkley
|
</target>
|
501 |
806
|
jones
|
|
502 |
|
|
<target name="distsrc" depends="dist">
|
503 |
|
|
<mkdir dir="${ver.src}"/>
|
504 |
|
|
<copy todir="${ver.src}">
|
505 |
|
|
<fileset dir="./src"/>
|
506 |
|
|
</copy>
|
507 |
|
|
|
508 |
882
|
jones
|
<delete file="./${name}-src-${release}.zip"/>
|
509 |
|
|
<zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
|
510 |
|
|
<delete file="./${name}-src-${release}.tar.gz" />
|
511 |
|
|
<tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
|
512 |
1311
|
berkley
|
<gzip zipfile="./${name}-src-${release}.tar.gz"
|
513 |
882
|
jones
|
src="./${name}-src-${release}.tar"/>
|
514 |
|
|
<delete file="./${name}-src-${release}.tar" />
|
515 |
807
|
jones
|
<delete dir="${dist.dir}"/>
|
516 |
1311
|
berkley
|
</target>
|
517 |
806
|
jones
|
|
518 |
113
|
jones
|
</project>
|