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