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 |
1742
|
tao
|
<target name="oracle">
|
34 |
931
|
jones
|
<!-- Customize these properties if you are using oracle -->
|
35 |
|
|
<property name="jdbc-connect"
|
36 |
|
|
value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
|
37 |
925
|
berkley
|
<property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
|
38 |
|
|
<property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
|
39 |
|
|
<property name="oracle_home" value="/oracle01/app/oracle/product/8.1.6" />
|
40 |
|
|
<property name="jdbc" value="${oracle_home}/jdbc/lib/classes111.zip" />
|
41 |
1744
|
tao
|
<!-- Property to indicate is not MSSQL installation-->
|
42 |
|
|
<property name="other" value="yes"/>
|
43 |
925
|
berkley
|
</target>
|
44 |
1311
|
berkley
|
|
45 |
925
|
berkley
|
<target name="postgresql">
|
46 |
931
|
jones
|
<!-- Customize these properties if you are using postgres -->
|
47 |
1311
|
berkley
|
<property name="jdbc-connect"
|
48 |
1570
|
tao
|
value="jdbc:postgresql://localhost/exp"/>
|
49 |
925
|
berkley
|
<property name="dbDriver" value="org.postgresql.Driver"/>
|
50 |
1311
|
berkley
|
<property name="dbAdapter"
|
51 |
931
|
jones
|
value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
|
52 |
1716
|
berkley
|
<property name="jdbc" value="lib/jdbc7.1-1.2.jar" />
|
53 |
1744
|
tao
|
<!-- Property to indicate is not MSSQL installation-->
|
54 |
|
|
<property name="other" value="yes"/>
|
55 |
|
|
</target>
|
56 |
1739
|
tao
|
|
57 |
|
|
<target name="sqlserver">
|
58 |
|
|
<!-- Customize these properties if you are using SQL server -->
|
59 |
|
|
<property name="jdbc-connect"
|
60 |
1742
|
tao
|
value="jdbc:microsoft:sqlserver://fatali.nceas.ucsb.edu:1433"/>
|
61 |
1739
|
tao
|
<property name="dbDriver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
|
62 |
|
|
<property name="dbAdapter"
|
63 |
|
|
value="edu.ucsb.nceas.dbadapter.SqlserverAdapter"/>
|
64 |
1742
|
tao
|
<property name="jdbc-base" value="F:\\Program Files\\Microsoft SQL Server 2000 Driver for JDBC\\lib" />
|
65 |
|
|
<property name="jdbc" value="${jdbc-base}/msbase.jar" />
|
66 |
1744
|
tao
|
<property name="jdbc-add1" value="${jdbc-base}/msutil.jar" />
|
67 |
|
|
<property name="jdbc-add2" value="${jdbc-base}/mssqlserver.jar" />
|
68 |
|
|
<!-- Property to indicate is a MSSQL installation-->
|
69 |
|
|
<property name="MSSQL" value="yes"/>
|
70 |
1739
|
tao
|
</target>
|
71 |
1311
|
berkley
|
|
72 |
1744
|
tao
|
<target name="config" depends="postgresql">
|
73 |
1311
|
berkley
|
<!-- Change the 'depends' attribute above to 'postgresql' to install
|
74 |
931
|
jones
|
metacat with postgres instead of oracle -->
|
75 |
|
|
|
76 |
|
|
<!-- Customize these properties for your system -->
|
77 |
1744
|
tao
|
<property name="tomcat" value="/usr/local/devtools/jakarta-tomcat" />
|
78 |
|
|
<property name="webapps" value="/usr/local/devtools/jakarta-tomcat/webapps" />
|
79 |
1722
|
tao
|
<property name="context" value="tao" />
|
80 |
|
|
<property name="user" value="tao"/>
|
81 |
1778
|
tao
|
<property name="password" value=""/>
|
82 |
1783
|
jones
|
<property name="mcuser" value="uid=jones,o=NCEAS,dc=ecoinformatics,dc=org"/>
|
83 |
|
|
<property name="mcpassword" value=""/>
|
84 |
1729
|
tao
|
<!-- Tomcat version, if you use tomcat 3, please fill it "tomcat3". If you using tomcat4, please fill it "tomcat4"-->
|
85 |
1771
|
tao
|
<property name="tomcatversion" value="tomcat4"/>
|
86 |
1716
|
berkley
|
|
87 |
1744
|
tao
|
<property name="server" value="pine.nceas.ucsb.edu:8443"/>
|
88 |
|
|
<property name="systemidserver" value="http://pine.nceas.ucsb.edu:8080" />
|
89 |
|
|
<property name="datafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/data" />
|
90 |
|
|
<property name="inlinedatafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/inlinedata" />
|
91 |
1771
|
tao
|
<property name="debuglevel" value="45" />
|
92 |
1716
|
berkley
|
|
93 |
1292
|
tao
|
<property name="forcereplicationwaitingtime" value="30000"/>
|
94 |
1523
|
tao
|
<property name="cvsroot"
|
95 |
1722
|
tao
|
value=":ext:tao@cvs.ecoinformatics.org:/cvs" />
|
96 |
1311
|
berkley
|
<property name="web-base-url"
|
97 |
931
|
jones
|
value="http://knb.ecoinformatics.org"/>
|
98 |
|
|
<property name="default-style" value="knb" />
|
99 |
1522
|
berkley
|
<property name="morphosourcedir" value="../morpho" />
|
100 |
1570
|
tao
|
<property name="defaultcontenttype" value="application/octet-stream" />
|
101 |
1780
|
jones
|
<property name="utilitiesdir" value="../utilities" />
|
102 |
931
|
jones
|
|
103 |
|
|
<!-- Make sure these paths match the location of the jar files
|
104 |
|
|
on your system, the defaults should usually work -->
|
105 |
1311
|
berkley
|
<property name="jsdk"
|
106 |
1742
|
tao
|
value="${tomcat}/common/lib/servlet.jar" />
|
107 |
1311
|
berkley
|
<property name="xmlp"
|
108 |
1376
|
tao
|
value="lib/xercesImpl.jar" />
|
109 |
1311
|
berkley
|
<property name="srb"
|
110 |
931
|
jones
|
value="lib/srbrmi" />
|
111 |
1311
|
berkley
|
<property name="cos"
|
112 |
931
|
jones
|
value="lib/cos.jar" />
|
113 |
939
|
tao
|
<property name="morpho"
|
114 |
|
|
value="lib/morpho.jar" />
|
115 |
931
|
jones
|
<property name="xalan"
|
116 |
|
|
value="lib/xalan/xalan.jar" />
|
117 |
|
|
<property name="apis"
|
118 |
|
|
value="lib/xalan/xml-apis.jar" />
|
119 |
1103
|
tao
|
<property name="httpclient"
|
120 |
1780
|
jones
|
value="lib/httpclient.jar" />
|
121 |
1103
|
tao
|
<property name="itis"
|
122 |
1311
|
berkley
|
value="${morphosourcedir}/lib/itislib.jar" />
|
123 |
1470
|
tao
|
<property name="emlparser"
|
124 |
|
|
value="lib/eml.jar" />
|
125 |
|
|
<property name="configxml"
|
126 |
|
|
value="lib/configxml.jar" />
|
127 |
1578
|
tao
|
<property name="itislib"
|
128 |
|
|
value="lib/itislib.jar" />
|
129 |
1487
|
tao
|
<property name="emlparser"
|
130 |
|
|
value="lib/eml.jar" />
|
131 |
1780
|
jones
|
<property name="util"
|
132 |
|
|
value="lib/utilities.jar" />
|
133 |
1103
|
tao
|
</target>
|
134 |
|
|
|
135 |
931
|
jones
|
<target name="init" depends="config">
|
136 |
|
|
<!-- It is less likely you'll need to make any changes from here down,
|
137 |
|
|
but customization is possible -->
|
138 |
|
|
<property name="installdir" value="${webapps}/${context}" />
|
139 |
348
|
jones
|
<property name="name" value="metacat"/>
|
140 |
|
|
<property name="Name" value="MetaCat"/>
|
141 |
1538
|
berkley
|
<property name="debugprefix" value="${Name}:"/>
|
142 |
1339
|
tao
|
<property name="release" value="1.2.1"/>
|
143 |
1311
|
berkley
|
<property name="replication-path"
|
144 |
931
|
jones
|
value="/${context}/servlet/replication"/>
|
145 |
|
|
<property name="servlet-path" value="/${context}/servlet/metacat"/>
|
146 |
|
|
<property name="html-path" value="/${context}"/>
|
147 |
1437
|
berkley
|
<property name="image-path" value="/${context}" />
|
148 |
931
|
jones
|
<property name="style-path" value="/${context}/style"/>
|
149 |
923
|
jones
|
<property name="replication-log" value="/tmp/metacatreplication.log"/>
|
150 |
1579
|
tao
|
<property name="replicationerrorlog" value="/tmp/metacatreplication.err"/>
|
151 |
832
|
jones
|
<property name="config-dir" value="${installdir}" />
|
152 |
924
|
jones
|
<property name="eml-module" value="eml" />
|
153 |
877
|
jones
|
<property name="eml-version" value="2.0.0beta6" />
|
154 |
1227
|
tao
|
<property name="eml-tag" value="RELEASE_EML_2_0_0_BETA_6_REV1" />
|
155 |
1722
|
tao
|
<property name="eml2-tag" value="STMML_SCHEMA_UPDATE" />
|
156 |
1570
|
tao
|
<property name="eml2namespace" value="eml://ecoinformatics.org/eml-2.0.0" />
|
157 |
1718
|
tao
|
<property name="stmmlnamespace" value="http://www.xml-cml.org/schema/stmml" />
|
158 |
348
|
jones
|
|
159 |
1311
|
berkley
|
<property name="cpath"
|
160 |
1780
|
jones
|
value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${srb}:${cos}:${morpho}:${emlparser}:${jdbc-add1}:${jdbc-add2}:${util}:${httpclient}"/>
|
161 |
882
|
jones
|
|
162 |
|
|
<filter token="docrooturl" value="./" />
|
163 |
588
|
berkley
|
<filter token="jdbc-connect" value="${jdbc-connect}"/>
|
164 |
882
|
jones
|
<filter token="dbDriver" value="${dbDriver}"/>
|
165 |
915
|
berkley
|
<filter token="dbAdapter" value="${dbAdapter}"/>
|
166 |
614
|
bojilova
|
<filter token="install-dir" value="${installdir}"/>
|
167 |
586
|
berkley
|
<filter token="server" value="${server}"/>
|
168 |
977
|
tao
|
<filter token="systemidserver" value="${systemidserver}"/>
|
169 |
586
|
berkley
|
<filter token="replication-log" value="${replication-log}"/>
|
170 |
1579
|
tao
|
<filter token="replicationerrorlog" value="${replicationerrorlog}"/>
|
171 |
348
|
jones
|
<filter token="release" value="${release}"/>
|
172 |
|
|
<filter token="servlet-path" value="${servlet-path}"/>
|
173 |
359
|
bojilova
|
<filter token="html-path" value="${html-path}"/>
|
174 |
362
|
jones
|
<filter token="user" value="${user}"/>
|
175 |
|
|
<filter token="password" value="${password}"/>
|
176 |
1783
|
jones
|
<filter token="mcuser" value="${mcuser}"/>
|
177 |
|
|
<filter token="mcpassword" value="${mcpassword}"/>
|
178 |
409
|
berkley
|
<filter token="image-path" value="${image-path}"/>
|
179 |
828
|
jones
|
<filter token="style-path" value="${style-path}"/>
|
180 |
506
|
jones
|
<filter token="web-base-url" value="${web-base-url}"/>
|
181 |
525
|
berkley
|
<filter token="replication-path" value="${replication-path}"/>
|
182 |
832
|
jones
|
<filter token="config-dir" value="${config-dir}"/>
|
183 |
|
|
<filter token="default-style" value="${default-style}"/>
|
184 |
877
|
jones
|
<filter token="eml-version" value="${eml-version}"/>
|
185 |
1570
|
tao
|
<filter token="eml2namespace" value="${eml2namespace}"/>
|
186 |
1718
|
tao
|
<filter token="stmmlnamespace" value="${stmmlnamespace}"/>
|
187 |
1009
|
tao
|
<filter token="context" value="${context}"/>
|
188 |
1292
|
tao
|
<filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" />
|
189 |
1051
|
tao
|
<filter token="debuglevel" value="${debuglevel}" />
|
190 |
1079
|
tao
|
<filter token="datafilepath" value="${datafilepath}" />
|
191 |
1455
|
tao
|
<filter token="inlinedatafilepath" value="${inlinedatafilepath}" />
|
192 |
1522
|
berkley
|
<filter token="defaultcontenttype" value="${defaultcontenttype}" />
|
193 |
1538
|
berkley
|
<filter token="debugprefix" value="${debugprefix}"/>
|
194 |
1487
|
tao
|
|
195 |
254
|
jones
|
<property name="srcdir" value="./src" />
|
196 |
1783
|
jones
|
<property name="testdir" value="./test" />
|
197 |
|
|
<property name="testtorun" value="MetacatClientTest" />
|
198 |
1116
|
tao
|
<property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
|
199 |
|
|
<property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
|
200 |
348
|
jones
|
<property name="build.dir" value="./build"/>
|
201 |
|
|
<property name="build.src" value="${build.dir}/src"/>
|
202 |
|
|
<property name="build.dest" value="${build.dir}/classes"/>
|
203 |
516
|
jones
|
<property name="build.docs" value="${build.dir}/docs"/>
|
204 |
348
|
jones
|
<property name="build.samples" value="${build.dir}/samples"/>
|
205 |
|
|
<property name="build.tests" value="${build.dir}/tests"/>
|
206 |
1778
|
tao
|
<property name="build.tmp" value="${build.dir}/tmp"/>
|
207 |
1116
|
tao
|
<property name="build.metacattest" value="${build.tests}/metacattest"/>
|
208 |
|
|
<property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
|
209 |
348
|
jones
|
<property name="build.data" value="${build.dir}/data"/>
|
210 |
806
|
jones
|
<property name="build.javadocs" value="${build.dir}/docs/api"/>
|
211 |
1437
|
berkley
|
<property name="build.img" value="${installdir}"/>
|
212 |
348
|
jones
|
|
213 |
882
|
jones
|
<property name="dist.dir" value="dist"/>
|
214 |
806
|
jones
|
<property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
|
215 |
|
|
<property name="ver.src" value="${ver.dir}/src"/>
|
216 |
|
|
|
217 |
254
|
jones
|
<property name="package.home" value="edu/ucsb/nceas/metacat" />
|
218 |
113
|
jones
|
</target>
|
219 |
1311
|
berkley
|
|
220 |
348
|
jones
|
<target name="prepare" depends="init">
|
221 |
|
|
<mkdir dir="${build.dir}"/>
|
222 |
|
|
<mkdir dir="${build.src}"/>
|
223 |
|
|
<mkdir dir="${build.dest}"/>
|
224 |
516
|
jones
|
<mkdir dir="${build.javadocs}"/>
|
225 |
1778
|
tao
|
<mkdir dir="${build.tmp}"/>
|
226 |
348
|
jones
|
|
227 |
822
|
jones
|
<copy todir="${build.src}" filtering="yes">
|
228 |
|
|
<fileset dir="${srcdir}">
|
229 |
|
|
<include name="edu/**"/>
|
230 |
|
|
<include name="com/**"/>
|
231 |
877
|
jones
|
<include name="**/*.sql"/>
|
232 |
822
|
jones
|
<exclude name="**/CVS*"/>
|
233 |
|
|
<exclude name="**/.#*"/>
|
234 |
1702
|
tao
|
<exclude name="edu/ucsb/nceas/metacat/harvesterClient/*.*"/>
|
235 |
822
|
jones
|
</fileset>
|
236 |
|
|
</copy>
|
237 |
348
|
jones
|
</target>
|
238 |
|
|
|
239 |
|
|
<target name="compile" depends="prepare">
|
240 |
1311
|
berkley
|
<javac srcdir="${build.src}"
|
241 |
|
|
destdir="${build.dest}"
|
242 |
|
|
classpath="${cpath}"
|
243 |
|
|
excludes="**/*.sql" />
|
244 |
|
|
<copy file="lib/metacat.properties"
|
245 |
|
|
tofile="${build.dest}/${package.home}/metacat.properties"
|
246 |
822
|
jones
|
filtering="yes" />
|
247 |
1311
|
berkley
|
<copy file="lib/srbProps.properties"
|
248 |
822
|
jones
|
tofile="${build.dest}/${package.home}/srbProps.properties"/>
|
249 |
1311
|
berkley
|
</target>
|
250 |
113
|
jones
|
|
251 |
204
|
jones
|
<target name="jar" depends="compile">
|
252 |
353
|
jones
|
<delete file="${build.dir}/${name}.jar" />
|
253 |
822
|
jones
|
<copy todir="${build.dest}">
|
254 |
|
|
<fileset dir="lib/srbrmi"/>
|
255 |
|
|
</copy>
|
256 |
635
|
jones
|
<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
|
257 |
|
|
excludes="**/protocols/" />
|
258 |
1311
|
berkley
|
</target>
|
259 |
|
|
|
260 |
635
|
jones
|
<target name="protocol" depends="compile">
|
261 |
|
|
<delete file="${build.dir}/protocol.jar" />
|
262 |
|
|
<jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
|
263 |
|
|
includes="**/protocols/" />
|
264 |
1311
|
berkley
|
</target>
|
265 |
113
|
jones
|
|
266 |
1780
|
jones
|
<target name="utilities" depends="config">
|
267 |
|
|
<ant dir="${utilitiesdir}" target="clean"/>
|
268 |
|
|
<ant dir="${utilitiesdir}" target="jar"/>
|
269 |
|
|
<copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
|
270 |
|
|
<copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
|
271 |
|
|
</target>
|
272 |
|
|
|
273 |
|
|
<target name="client" depends="utilities, prepare">
|
274 |
|
|
<javac srcdir="${build.src}"
|
275 |
|
|
destdir="${build.dest}"
|
276 |
|
|
classpath="${cpath}"
|
277 |
|
|
includes="edu/ucsb/nceas/metacat/client/*" />
|
278 |
|
|
</target>
|
279 |
|
|
|
280 |
|
|
<target name="clientjar" depends="client">
|
281 |
|
|
<delete file="${build.dir}/${name}-client.jar" />
|
282 |
|
|
<jar jarfile="${build.dir}/${name}-client.jar" basedir="${build.dest}"
|
283 |
|
|
includes="**/metacat/client/" />
|
284 |
|
|
</target>
|
285 |
|
|
|
286 |
1612
|
tao
|
<target name="getdtdschema" depends="prepare">
|
287 |
|
|
<echo>Enter CVS password: </echo>
|
288 |
|
|
<cvs cvsRoot="${cvsroot}"
|
289 |
|
|
package="${eml-module}"
|
290 |
|
|
tag="${eml-tag}"
|
291 |
1778
|
tao
|
dest="${build.tmp}" />
|
292 |
1612
|
tao
|
<mkdir dir="lib/dtd" />
|
293 |
|
|
<copy todir="lib/dtd" filtering="yes">
|
294 |
1778
|
tao
|
<fileset dir="${build.tmp}/${eml-module}">
|
295 |
1612
|
tao
|
<include name="*.dtd"/>
|
296 |
|
|
</fileset>
|
297 |
|
|
<mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
|
298 |
|
|
</copy>
|
299 |
|
|
<echo>Enter CVS password: </echo>
|
300 |
|
|
<cvs cvsRoot="${cvsroot}"
|
301 |
|
|
package="${eml-module}"
|
302 |
|
|
tag="${eml2-tag}"
|
303 |
1778
|
tao
|
dest="${build.tmp}" />
|
304 |
1612
|
tao
|
<mkdir dir="lib/schema" />
|
305 |
|
|
<copy todir="lib/schema" filtering="yes">
|
306 |
1778
|
tao
|
<fileset dir="${build.tmp}/${eml-module}">
|
307 |
1612
|
tao
|
<include name="*.xsd"/>
|
308 |
|
|
</fileset>
|
309 |
|
|
</copy>
|
310 |
|
|
<copy todir="lib/style">
|
311 |
1778
|
tao
|
<fileset dir="${build.tmp}/${eml-module}/style">
|
312 |
1612
|
tao
|
<include name="*.xsl"/>
|
313 |
|
|
</fileset>
|
314 |
|
|
</copy>
|
315 |
|
|
</target>
|
316 |
|
|
|
317 |
877
|
jones
|
<target name="getdtd" depends="prepare">
|
318 |
1307
|
jones
|
<echo>Enter CVS password: </echo>
|
319 |
|
|
<cvs cvsRoot="${cvsroot}"
|
320 |
|
|
package="${eml-module}"
|
321 |
|
|
tag="${eml-tag}"
|
322 |
1778
|
tao
|
dest="${build.tmp}" />
|
323 |
1307
|
jones
|
<mkdir dir="lib/dtd" />
|
324 |
|
|
<copy todir="lib/dtd" filtering="yes">
|
325 |
1778
|
tao
|
<fileset dir="${build.tmp}/${eml-module}">
|
326 |
1307
|
jones
|
<include name="*.dtd"/>
|
327 |
|
|
</fileset>
|
328 |
|
|
<mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
|
329 |
|
|
</copy>
|
330 |
1463
|
tao
|
</target>
|
331 |
1522
|
berkley
|
|
332 |
1463
|
tao
|
<target name="getschema" depends="prepare">
|
333 |
|
|
<echo>Enter CVS password: </echo>
|
334 |
|
|
<cvs cvsRoot="${cvsroot}"
|
335 |
|
|
package="${eml-module}"
|
336 |
|
|
tag="${eml2-tag}"
|
337 |
1778
|
tao
|
dest="${build.tmp}" />
|
338 |
1463
|
tao
|
<mkdir dir="lib/schema" />
|
339 |
|
|
<copy todir="lib/schema" filtering="yes">
|
340 |
1778
|
tao
|
<fileset dir="${build.tmp}/${eml-module}">
|
341 |
1463
|
tao
|
<include name="*.xsd"/>
|
342 |
|
|
</fileset>
|
343 |
|
|
</copy>
|
344 |
1314
|
tao
|
<copy todir="lib/style">
|
345 |
1778
|
tao
|
<fileset dir="${build.tmp}/${eml-module}/style">
|
346 |
1311
|
berkley
|
<include name="*.xsl"/>
|
347 |
|
|
</fileset>
|
348 |
1307
|
jones
|
</copy>
|
349 |
1522
|
berkley
|
</target>
|
350 |
877
|
jones
|
|
351 |
1593
|
tao
|
<target name="dtdschemasql" depends="prepare">
|
352 |
877
|
jones
|
<echo/>
|
353 |
|
|
<echo>Registering the DTDs with the new Metacat instance...</echo>
|
354 |
|
|
<sql driver="${dbDriver}"
|
355 |
1744
|
tao
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
356 |
877
|
jones
|
url="${jdbc-connect}"
|
357 |
|
|
userid="${user}"
|
358 |
|
|
password="${password}"
|
359 |
1593
|
tao
|
src="${build.src}/loaddtdschema.sql" />
|
360 |
877
|
jones
|
</target>
|
361 |
1716
|
berkley
|
|
362 |
1570
|
tao
|
<target name="schemasql" depends="prepare">
|
363 |
|
|
<echo/>
|
364 |
|
|
<echo>Registering the DTDs with the new Metacat instance...</echo>
|
365 |
|
|
<sql driver="${dbDriver}"
|
366 |
1744
|
tao
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
367 |
1570
|
tao
|
url="${jdbc-connect}"
|
368 |
|
|
userid="${user}"
|
369 |
|
|
password="${password}"
|
370 |
|
|
src="${build.src}/loadschema.sql" />
|
371 |
|
|
</target>
|
372 |
1744
|
tao
|
|
373 |
|
|
<target name="installCommon" depends="jar">
|
374 |
1079
|
tao
|
<mkdir dir="${datafilepath}" />
|
375 |
1455
|
tao
|
<mkdir dir="${inlinedatafilepath}" />
|
376 |
1079
|
tao
|
<chmod dir="${datafilepath}" perm="ug+w" />
|
377 |
329
|
jones
|
<mkdir dir="${installdir}/WEB-INF/lib" />
|
378 |
1311
|
berkley
|
<copy file="${build.dir}/${name}.jar"
|
379 |
822
|
jones
|
tofile="${installdir}/WEB-INF/lib/${name}.jar" />
|
380 |
1311
|
berkley
|
<copy file="${xmlp}"
|
381 |
1376
|
tao
|
tofile="${installdir}/WEB-INF/lib/xercesImpl.jar" />
|
382 |
1311
|
berkley
|
<copy file="${xalan}"
|
383 |
923
|
jones
|
tofile="${installdir}/WEB-INF/lib/xalan.jar" />
|
384 |
1311
|
berkley
|
<copy file="${apis}"
|
385 |
923
|
jones
|
tofile="${installdir}/WEB-INF/lib/xml-apis.jar" />
|
386 |
1311
|
berkley
|
<copy file="${jdbc}"
|
387 |
1522
|
berkley
|
tofile="${installdir}/WEB-INF/lib/jdbc.jar" />
|
388 |
1311
|
berkley
|
<copy file="${cos}"
|
389 |
822
|
jones
|
tofile="${installdir}/WEB-INF/lib/cos.jar" />
|
390 |
939
|
tao
|
<copy file="${morpho}"
|
391 |
1470
|
tao
|
tofile="${installdir}/WEB-INF/lib/morpho.jar" />
|
392 |
|
|
<copy file="${emlparser}"
|
393 |
1522
|
berkley
|
tofile="${installdir}/WEB-INF/lib/eml.jar" />
|
394 |
1470
|
tao
|
<copy file="${configxml}"
|
395 |
|
|
tofile="${installdir}/WEB-INF/lib/configxml.jar" />
|
396 |
1578
|
tao
|
<copy file="${itislib}"
|
397 |
|
|
tofile="${installdir}/WEB-INF/lib/itislib.jar" />
|
398 |
1729
|
tao
|
<copy file="lib/web.xml.${tomcatversion}"
|
399 |
822
|
jones
|
tofile="${installdir}/WEB-INF/web.xml" />
|
400 |
|
|
<copy todir="${build.img}" filtering="no">
|
401 |
|
|
<fileset dir="lib">
|
402 |
|
|
<include name="**/*.jpg"/>
|
403 |
|
|
<include name="**/*.png"/>
|
404 |
|
|
<include name="**/*.gif"/>
|
405 |
|
|
</fileset>
|
406 |
|
|
</copy>
|
407 |
|
|
<copy todir="${installdir}" filtering="yes">
|
408 |
|
|
<fileset dir="lib">
|
409 |
|
|
<exclude name="*.jar"/>
|
410 |
|
|
<exclude name="*.properties"/>
|
411 |
|
|
<exclude name="web.xml"/>
|
412 |
|
|
<exclude name="**/srbrmi*"/>
|
413 |
1437
|
berkley
|
<exclude name="**/*.jpg"/>
|
414 |
|
|
<exclude name="**/*.png"/>
|
415 |
|
|
<exclude name="**/*.gif"/>
|
416 |
822
|
jones
|
</fileset>
|
417 |
|
|
</copy>
|
418 |
877
|
jones
|
<echo>
|
419 |
|
|
***********************************************************
|
420 |
|
|
Remember to register the default DTDs by running the
|
421 |
|
|
"${build.src}/loaddtd.sql script". This is most easily
|
422 |
|
|
done by using the "ant dtdsql" which will run it for you.
|
423 |
|
|
***********************************************************
|
424 |
|
|
</echo>
|
425 |
1311
|
berkley
|
</target>
|
426 |
1744
|
tao
|
|
427 |
|
|
<target name="installMSSQL" if="MSSQL" depends="installCommon">
|
428 |
|
|
<echo> Install MSSQL</echo>
|
429 |
|
|
<copy file="${jdbc-add1}"
|
430 |
|
|
tofile="${installdir}/WEB-INF/lib/msutil.jar" />
|
431 |
|
|
<copy file="${jdbc-add2}"
|
432 |
|
|
tofile="${installdir}/WEB-INF/lib/mssqlserver.jar" />
|
433 |
|
|
</target>
|
434 |
|
|
|
435 |
|
|
<target name="installother" if="other" depends="installCommon">
|
436 |
|
|
<echo> Install Other Database</echo>
|
437 |
|
|
</target>
|
438 |
|
|
|
439 |
|
|
<target name="install" depends="installMSSQL, installother">
|
440 |
|
|
|
441 |
|
|
</target>
|
442 |
|
|
|
443 |
1783
|
jones
|
<target name="testprep" depends="install">
|
444 |
|
|
<mkdir dir="${build.tests}"/>
|
445 |
|
|
<copy todir="${build.tests}" filtering="yes">
|
446 |
|
|
<fileset dir="${testdir}">
|
447 |
|
|
<include name="edu/**"/>
|
448 |
|
|
</fileset>
|
449 |
|
|
</copy>
|
450 |
|
|
</target>
|
451 |
1311
|
berkley
|
|
452 |
1783
|
jones
|
<target name="test" depends="testprep">
|
453 |
971
|
tao
|
<!-- copy and compile the tests into a jar file -->
|
454 |
1783
|
jones
|
<javac srcdir="${build.tests}"
|
455 |
|
|
destdir="${build.tests}"
|
456 |
1049
|
tao
|
classpath="${cpath}:${build.dir}/${name}.jar"
|
457 |
1612
|
tao
|
debug="on"
|
458 |
1311
|
berkley
|
includes="**/*.java" />
|
459 |
204
|
jones
|
|
460 |
1311
|
berkley
|
<jar jarfile="${build.dir}/${name}-junittests.jar"
|
461 |
1783
|
jones
|
basedir="${build.tests}"
|
462 |
1311
|
berkley
|
includes="**/*.class" />
|
463 |
971
|
tao
|
|
464 |
|
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
465 |
1783
|
jones
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
466 |
971
|
tao
|
haltonerror="no">
|
467 |
1783
|
jones
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
|
468 |
971
|
tao
|
<classpath>
|
469 |
1783
|
jones
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/${name}-junittests.jar" />
|
470 |
971
|
tao
|
</classpath>
|
471 |
|
|
|
472 |
|
|
<formatter type="plain" />
|
473 |
|
|
|
474 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
475 |
1783
|
jones
|
<fileset dir="${build.tests}">
|
476 |
1116
|
tao
|
<include name="**/*.class" />
|
477 |
971
|
tao
|
</fileset>
|
478 |
|
|
</batchtest>
|
479 |
|
|
</junit>
|
480 |
|
|
</target>
|
481 |
1103
|
tao
|
|
482 |
1783
|
jones
|
<target name="runonetest" depends="testprep">
|
483 |
1500
|
tao
|
<!-- copy and compile the tests into a jar file -->
|
484 |
|
|
<!--<property name="testtorun" value="SubTreeTest"/> -->
|
485 |
|
|
<echo>testtorun: ${testtorun}</echo>
|
486 |
1783
|
jones
|
<javac srcdir="${build.tests}"
|
487 |
|
|
destdir="${build.tests}"
|
488 |
1500
|
tao
|
classpath="${cpath}:${build.dir}/${name}.jar"
|
489 |
|
|
includes="**/*.java" />
|
490 |
|
|
|
491 |
|
|
<jar jarfile="${build.dir}/${name}-junittests.jar"
|
492 |
1783
|
jones
|
basedir="${build.tests}"
|
493 |
1500
|
tao
|
includes="**/*.class" />
|
494 |
|
|
|
495 |
|
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
496 |
1783
|
jones
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
497 |
1500
|
tao
|
haltonerror="no">
|
498 |
1783
|
jones
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
|
499 |
1500
|
tao
|
<classpath>
|
500 |
1783
|
jones
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/${name}-junittests.jar" />
|
501 |
1500
|
tao
|
</classpath>
|
502 |
|
|
|
503 |
|
|
<formatter type="plain" />
|
504 |
|
|
|
505 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
506 |
1783
|
jones
|
<fileset dir="${build.tests}">
|
507 |
1500
|
tao
|
<include name="**/${testtorun}.class" />
|
508 |
|
|
</fileset>
|
509 |
|
|
</batchtest>
|
510 |
|
|
</junit>
|
511 |
|
|
</target>
|
512 |
|
|
|
513 |
1103
|
tao
|
<target name="gethttpclient" depends="prepare">
|
514 |
1311
|
berkley
|
<!--mkdir dir="${morphosourcedir}" -->
|
515 |
1487
|
tao
|
<cvs cvsRoot="${cvsroot}"
|
516 |
1103
|
tao
|
package="morpho"
|
517 |
|
|
dest="." />
|
518 |
1107
|
tao
|
<ant dir="${morphosourcedir}" inheritAll="false" target="jar" />
|
519 |
1103
|
tao
|
</target>
|
520 |
|
|
|
521 |
|
|
<!-- run this target, we need to check out a another morpho souce dir was checked out. -->
|
522 |
|
|
<target name="nettest" depends="install">
|
523 |
|
|
<echo>***********************************
|
524 |
1311
|
berkley
|
Please run ant gethttpclient first!
|
525 |
|
|
***********************************
|
526 |
1103
|
tao
|
</echo>
|
527 |
|
|
<!-- copy and compile the tests into a jar file -->
|
528 |
1116
|
tao
|
<mkdir dir="${build.metacatnettest}"/>
|
529 |
1103
|
tao
|
<javac srcdir="${junitnettestsdir}"
|
530 |
1116
|
tao
|
destdir="${build.metacatnettest}"
|
531 |
1103
|
tao
|
classpath="${cpath}:${build.dir}/${name}.jar:${httpclient}"
|
532 |
|
|
includes="**/*.java" />
|
533 |
|
|
|
534 |
|
|
<jar jarfile="${build.dir}/${name}-junitnettests.jar"
|
535 |
1116
|
tao
|
basedir="${build.metacatnettest}"
|
536 |
1103
|
tao
|
includes="**/*.class" />
|
537 |
|
|
|
538 |
|
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
539 |
1107
|
tao
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
540 |
1103
|
tao
|
haltonerror="no">
|
541 |
1107
|
tao
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
|
542 |
1103
|
tao
|
<classpath>
|
543 |
|
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${httpclient}:${build.dir}/${name}-junitnettests.jar:${itis}" />
|
544 |
|
|
</classpath>
|
545 |
|
|
|
546 |
|
|
<formatter type="plain" />
|
547 |
|
|
|
548 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
549 |
1116
|
tao
|
<fileset dir="${build.metacatnettest}">
|
550 |
|
|
<include name="**/*.class" />
|
551 |
1103
|
tao
|
</fileset>
|
552 |
|
|
</batchtest>
|
553 |
|
|
</junit>
|
554 |
1311
|
berkley
|
</target>
|
555 |
1103
|
tao
|
|
556 |
1522
|
berkley
|
<target name="servletclean" depends="clean">
|
557 |
|
|
<delete dir="${installdir}" />
|
558 |
|
|
</target>
|
559 |
|
|
|
560 |
|
|
|
561 |
113
|
jones
|
<target name="clean" depends="init">
|
562 |
822
|
jones
|
<delete dir="${build.dir}" />
|
563 |
113
|
jones
|
</target>
|
564 |
|
|
|
565 |
516
|
jones
|
<target name="jdoc" depends="prepare">
|
566 |
822
|
jones
|
<javadoc packagenames="edu.ucsb.nceas.*"
|
567 |
516
|
jones
|
sourcepath="${build.src}"
|
568 |
|
|
destdir="${build.javadocs}"
|
569 |
113
|
jones
|
author="true"
|
570 |
|
|
version="true"
|
571 |
|
|
use="true"
|
572 |
348
|
jones
|
windowtitle="${Name} API"
|
573 |
|
|
doctitle="<h1>${Name}</h1>"
|
574 |
113
|
jones
|
bottom="<i>Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>"
|
575 |
|
|
/>
|
576 |
|
|
</target>
|
577 |
|
|
|
578 |
1724
|
tao
|
<target name="dist" depends="jar,protocol,jdoc,getdtd,getschema">
|
579 |
806
|
jones
|
<mkdir dir="${dist.dir}"/>
|
580 |
|
|
<delete dir="${ver.dir}" />
|
581 |
|
|
<mkdir dir="${ver.dir}"/>
|
582 |
|
|
<copy todir="${ver.dir}">
|
583 |
1311
|
berkley
|
<fileset dir="."
|
584 |
882
|
jones
|
excludes="**/CVS* **/.#* **/src* **/test* **/build* **/docs* ${dist.dir}"/>
|
585 |
806
|
jones
|
</copy>
|
586 |
|
|
<copy todir="${ver.dir}" file="build.xml"/>
|
587 |
|
|
<copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
|
588 |
|
|
<copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
|
589 |
882
|
jones
|
|
590 |
|
|
<copy todir="${ver.dir}/docs" filtering="yes">
|
591 |
|
|
<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
|
592 |
|
|
</copy>
|
593 |
|
|
<copy todir="${ver.dir}/docs" filtering="no">
|
594 |
|
|
<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
|
595 |
|
|
</copy>
|
596 |
806
|
jones
|
<copy todir="${ver.dir}/docs/dev">
|
597 |
|
|
<fileset dir="${build.dir}/docs"/>
|
598 |
|
|
</copy>
|
599 |
917
|
berkley
|
<copy todir="${ver.dir}/src">
|
600 |
|
|
<fileset dir="${build.dir}/src"/>
|
601 |
|
|
</copy>
|
602 |
|
|
|
603 |
992
|
berkley
|
<delete dir="./${ver.dir}/${build.dir}"/>
|
604 |
|
|
<delete dir="./${ver.dir}/dist"/>
|
605 |
882
|
jones
|
<delete file="./${name}-${release}.zip"/>
|
606 |
1312
|
tao
|
<zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
607 |
882
|
jones
|
<delete file="./${name}-${release}.tar.gz" />
|
608 |
1312
|
tao
|
<tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
609 |
1311
|
berkley
|
<gzip zipfile="./${name}-${release}.tar.gz"
|
610 |
882
|
jones
|
src="./${name}-${release}.tar"/>
|
611 |
|
|
<delete file="./${name}-${release}.tar" />
|
612 |
1311
|
berkley
|
</target>
|
613 |
806
|
jones
|
|
614 |
|
|
<target name="distsrc" depends="dist">
|
615 |
|
|
<mkdir dir="${ver.src}"/>
|
616 |
|
|
<copy todir="${ver.src}">
|
617 |
|
|
<fileset dir="./src"/>
|
618 |
|
|
</copy>
|
619 |
|
|
|
620 |
882
|
jones
|
<delete file="./${name}-src-${release}.zip"/>
|
621 |
|
|
<zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
|
622 |
|
|
<delete file="./${name}-src-${release}.tar.gz" />
|
623 |
|
|
<tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
|
624 |
1311
|
berkley
|
<gzip zipfile="./${name}-src-${release}.tar.gz"
|
625 |
882
|
jones
|
src="./${name}-src-${release}.tar"/>
|
626 |
|
|
<delete file="./${name}-src-${release}.tar" />
|
627 |
807
|
jones
|
<delete dir="${dist.dir}"/>
|
628 |
1311
|
berkley
|
</target>
|
629 |
806
|
jones
|
|
630 |
1702
|
tao
|
<target name="stylesheettest">
|
631 |
|
|
<xslt in="${input}" out="eml.html" style="lib/style/eml2/eml-2.0.0.xsl">
|
632 |
|
|
<param name="displaymodule" expression="${displaymodule}"/>
|
633 |
|
|
<param name="docid" expression="${input}"/>
|
634 |
|
|
<param name="entitytype" expression="${entitytype}"/>
|
635 |
|
|
<param name="entityindex" expression="${entityindex}"/>
|
636 |
|
|
<outputproperty name="method" value="html"/>
|
637 |
|
|
<outputproperty name="standalone" value="yes"/>
|
638 |
|
|
<outputproperty name="encoding" value="iso8859_1"/>
|
639 |
|
|
<outputproperty name="indent" value="yes"/>
|
640 |
|
|
</xslt>
|
641 |
|
|
</target>
|
642 |
1716
|
berkley
|
|
643 |
113
|
jones
|
</project>
|