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: tao $'
|
10
|
* '$Date: 2007-08-07 17:48:28 -0700 (Tue, 07 Aug 2007) $'
|
11
|
* '$Revision: 3348 $'
|
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
|
<property environment="env"/>
|
34
|
<property file="build.properties"/> <!-- USER SPECIFIC PROPS -->
|
35
|
|
36
|
<!-- Determine which tomcat we are using and tomcat-specific settings -->
|
37
|
<condition property="jsdk" value="${tomcat}/common/lib/servlet.jar">
|
38
|
<equals arg1="${tomcatversion}" arg2="tomcat4" />
|
39
|
</condition>
|
40
|
<condition property="jsdk" value="${tomcat}/common/lib/servlet-api.jar">
|
41
|
<equals arg1="${tomcatversion}" arg2="tomcat5" />
|
42
|
</condition>
|
43
|
|
44
|
<!-- Determine if installed ecogrid -->
|
45
|
<condition property="enable.ecogrid">
|
46
|
<equals arg1="${install.ecogrid}" arg2="true" />
|
47
|
</condition>
|
48
|
|
49
|
<target name="check-db">
|
50
|
<condition property="use-oracle">
|
51
|
<equals arg1="${database}" arg2="oracle" />
|
52
|
</condition>
|
53
|
<condition property="use-postgresql">
|
54
|
<equals arg1="${database}" arg2="postgresql" />
|
55
|
</condition>
|
56
|
<condition property="use-sqlserver">
|
57
|
<equals arg1="${database}" arg2="sqlserver" />
|
58
|
</condition>
|
59
|
</target>
|
60
|
|
61
|
<target name="oracle" if="use-oracle">
|
62
|
<!-- Customize these properties if you are using oracle -->
|
63
|
<echo message="Using oracle..."/>
|
64
|
<property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
|
65
|
<property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
|
66
|
<property name="jdbc-jar-name" value="classes111.zip" />
|
67
|
<property name="jdbc" value="${jdbc_base}/${jdbc-jar-name}" />
|
68
|
<!-- Property to indicate is not MSSQL installation-->
|
69
|
<property name="other" value="yes"/>
|
70
|
<property name="install-sql"
|
71
|
value="xmltables.sql" />
|
72
|
<property name="upgrade-1.2-sql"
|
73
|
value="upgrade-db-to-1.2.sql" />
|
74
|
<property name="upgrade-1.3-sql"
|
75
|
value="upgrade-db-to-1.3.sql" />
|
76
|
<property name="upgrade-1.4-sql"
|
77
|
value="upgrade-db-to-1.4.sql" />
|
78
|
<property name="upgrade-1.5-sql"
|
79
|
value="upgrade-db-to-1.5.sql" />
|
80
|
<property name="upgrade-1.6-sql"
|
81
|
value="upgrade-db-to-1.6.sql" />
|
82
|
<property name="upgrade-1.7-sql"
|
83
|
value="upgrade-db-to-1.7.sql" />
|
84
|
<property name="upgrade-1.7.1-sql"
|
85
|
value="upgrade-db-to-1.7.1.sql" />
|
86
|
</target>
|
87
|
|
88
|
<target name="postgresql" if="use-postgresql">
|
89
|
<!-- Customize these properties if you are using postgres -->
|
90
|
<echo message="Using PostgreSQL..."/>
|
91
|
<property name="dbDriver" value="org.postgresql.Driver"/>
|
92
|
<property name="dbAdapter"
|
93
|
value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
|
94
|
<property name="jdbc-jar-name" value="postgresql-8.0-312.jdbc3.jar" />
|
95
|
<property name="jdbc" value="lib/${jdbc-jar-name}" />
|
96
|
<!-- Property to indicate is not MSSQL installation-->
|
97
|
<property name="other" value="yes"/>
|
98
|
<property name="install-sql"
|
99
|
value="xmltables-postgres.sql" />
|
100
|
<property name="upgrade-1.2-sql"
|
101
|
value="upgrade-db-to-1.2-postgres.sql" />
|
102
|
<property name="upgrade-1.3-sql"
|
103
|
value="upgrade-db-to-1.3-postgres.sql" />
|
104
|
<property name="upgrade-1.4-sql"
|
105
|
value="upgrade-db-to-1.4-postgres.sql" />
|
106
|
<property name="upgrade-1.5-sql"
|
107
|
value="upgrade-db-to-1.5-postgres.sql" />
|
108
|
<property name="upgrade-1.6-sql"
|
109
|
value="upgrade-db-to-1.6-postgres.sql" />
|
110
|
<property name="upgrade-1.7-sql"
|
111
|
value="upgrade-db-to-1.7-postgres.sql" />
|
112
|
<property name="upgrade-1.7.1-sql"
|
113
|
value="upgrade-db-to-1.7.1-postgres.sql" />
|
114
|
</target>
|
115
|
|
116
|
<target name="sqlserver" if="use-sqlserver">
|
117
|
<!-- Customize these properties if you are using SQL server -->
|
118
|
<echo message="Using SQL Server..."/>
|
119
|
<property name="dbDriver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
|
120
|
<property name="dbAdapter"
|
121
|
value="edu.ucsb.nceas.dbadapter.SqlserverAdapter"/>
|
122
|
<property name="jdbc" value="${jdbc_base}/msbase.jar" />
|
123
|
<property name="jdbc-add1" value="${jdbc_base}/msutil.jar" />
|
124
|
<property name="jdbc-add2" value="${jdbc_base}/mssqlserver.jar" />
|
125
|
<!-- Property to indicate is a MSSQL installation-->
|
126
|
<property name="MSSQL" value="yes"/>
|
127
|
<property name="install-sql"
|
128
|
value="xmltables-sqlserver.sql" />
|
129
|
</target>
|
130
|
|
131
|
<target name="config" depends="check-db,oracle,postgresql,sqlserver">
|
132
|
<!-- usr for client testing, generally you don't need change-->
|
133
|
<property name="mcuser" value="uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org"/>
|
134
|
<property name="mcpassword" value="kepler"/>
|
135
|
<property name="mcanotheruser" value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org"/>
|
136
|
<property name="mcanotherpassword" value=""/>
|
137
|
|
138
|
<property name="debug" value="on" />
|
139
|
<property name="debuglevel" value="55" />
|
140
|
|
141
|
<property name="morphosourcedir" value="../morpho" />
|
142
|
<property name="defaultcontenttype" value="application/octet-stream" />
|
143
|
<property name="utilitiesdir" value="../utilities" />
|
144
|
|
145
|
<echo>*********** tomcatversion = ${tomcatversion}</echo>
|
146
|
<echo>*********** set jsdk to ${jsdk}</echo>
|
147
|
</target>
|
148
|
|
149
|
<target name="init" depends="config">
|
150
|
<path id="compile.classpath">
|
151
|
<pathelement location="${jsdk}"/>
|
152
|
<pathelement location="lib" />
|
153
|
<fileset dir="lib">
|
154
|
<include name="*.jar"/>
|
155
|
</fileset>
|
156
|
<fileset dir="lib">
|
157
|
<include name="xalan.jar"/>
|
158
|
</fileset>
|
159
|
<fileset dir="lib/lsid_lib">
|
160
|
<include name="*.jar"/>
|
161
|
</fileset>
|
162
|
<fileset dir="${jdbc_base}">
|
163
|
<include name="${jdbc-jar-name}"/>
|
164
|
<include name="msbase.jar"/>
|
165
|
<include name="msutil.jar"/>
|
166
|
<include name="mssqlserver.jar"/>
|
167
|
</fileset>
|
168
|
|
169
|
<!-- Include geoserver, geotools, et. al. -->
|
170
|
<fileset dir="lib/spatial/geoserver/WEB-INF/lib">
|
171
|
<include name="*.jar"/>
|
172
|
</fileset>
|
173
|
<pathelement location="lib/spatial/geoserver/WEB-INF/classes"/>
|
174
|
|
175
|
</path>
|
176
|
|
177
|
<!-- It is less likely you'll need to make any changes from here down,
|
178
|
but customization is possible -->
|
179
|
<property name="installdir" value="${deploy.dir}/${metacat.context}" />
|
180
|
<property name="temp-dir" value="/tmp/${metacat.context}" />
|
181
|
<property name="name" value="metacat"/>
|
182
|
<property name="Name" value="MetaCat"/>
|
183
|
<property name="debugprefix" value="${Name}:"/>
|
184
|
<property name="release" value="1.7.0"/>
|
185
|
<property name="replication-path" value="/${metacat.context}/servlet/replication"/>
|
186
|
<property name="harvester-registration-login-path" value="/${metacat.context}/harvesterRegistrationLogin"/>
|
187
|
<property name="harvester-registration-path" value="/${metacat.context}/harvesterRegistration"/>
|
188
|
<property name="servlet-path" value="/${metacat.context}/metacat"/>
|
189
|
<property name="html-path" value="/${metacat.context}"/>
|
190
|
<property name="systemidserver" value="${http.protocol}://${httpserver}"/>
|
191
|
<property name="style-common-relpath" value="/style/common"/>
|
192
|
<property name="style-shared-relpath" value="/style/shared"/>
|
193
|
<property name="style-common-cvsrelpath" value="lib${style-common-relpath}"/>
|
194
|
<property name="style-common-fullpath" value="/${installdir}${style-common-relpath}"/>
|
195
|
<property name="templates.dir" value="${style-common-fullpath}/templates"/>
|
196
|
<property name="style-common-path" value="/${metacat.context}${style-common-relpath}"/>
|
197
|
<property name="style-shared-path" value="/${metacat.context}${style-shared-relpath}"/>
|
198
|
<property name="style-skins-relpath" value="/style/skins"/>
|
199
|
<property name="style-skins-path" value="/${metacat.context}${style-skins-relpath}"/>
|
200
|
<property name="replication-log" value="${log.dir}/metacatreplication.log"/>
|
201
|
<property name="replicationerrorlog" value="${log.dir}/metacatreplication.err"/>
|
202
|
<property name="config-dir" value="${deploy.dir}/${style-skins-path}" />
|
203
|
<property name="util-module" value="utilities" />
|
204
|
<property name="eml-module" value="eml" />
|
205
|
<property name="eml-version" value="2.0.0beta6" />
|
206
|
<property name="eml-tag" value="EML_2_0_0_BETA_6_FOR_METACAT" />
|
207
|
<property name="eml2_0_0-tag" value="RELEASE_EML_2_0_0_UPDATE_1" />
|
208
|
<property name="eml2_0_1-tag" value="RELEASE_EML_2_0_1_UPDATE_3" />
|
209
|
<property name="eml2_0_0namespace" value="eml://ecoinformatics.org/eml-2.0.0" />
|
210
|
<property name="eml2_0_1namespace" value="eml://ecoinformatics.org/eml-2.0.1" />
|
211
|
<property name="eml2_1_0namespace" value="eml://ecoinformatics.org/eml-2.1.0" />
|
212
|
<property name="stmmlnamespace" value="http://www.xml-cml.org/schema/stmml" />
|
213
|
<property name="eml-css" value="eml_xsl.css"/>
|
214
|
<property name="eml-module.default.css"
|
215
|
value="default.css"/>
|
216
|
|
217
|
<!-- Config for registry variables -->
|
218
|
<property name="scope" value="obfs"/>
|
219
|
<property name="responseForm" value="genericResponse.tmpl"/>
|
220
|
<property name="entryForm" value="entryForm.tmpl"/>
|
221
|
<property name="guide" value="genericGuide.tmpl"/>
|
222
|
<property name="loginForm" value="loginForm.tmpl"/>
|
223
|
<property name="confirmData" value="confirmData.tmpl"/>
|
224
|
<property name="deleteData" value="deleteData.tmpl"/>
|
225
|
<property name="genericHeader" value="genericHeader.tmpl"/>
|
226
|
<property name="genericFooter" value="genericFooter.tmpl"/>
|
227
|
<property name="adminname" value="KNB Support"/>
|
228
|
<property name="recipient" value="knb-software\@nceas.ucsb.edu"/>
|
229
|
|
230
|
<property name="defaultStage" value="initregister"/>
|
231
|
<property name="defaultHeader" value="genericHeader.tmpl"/>
|
232
|
<property name="defaultFooter" value="genericFooter.tmpl"/>
|
233
|
<property name="defaultChangePass" value="ldapChangePass.tmpl"/>
|
234
|
<property name="defaultResetPass" value="ldapResetPass.tmpl"/>
|
235
|
<property name="changePassSuccess" value="ldapChangePassSuccess.tmpl"/>
|
236
|
<property name="resetPassSuccess" value="ldapResetPassSuccess.tmpl"/>
|
237
|
<property name="registerFailed" value="ldapRegisterFailed.tmpl"/>
|
238
|
<property name="registerLter" value="ldapRegisterLter.tmpl"/>
|
239
|
<property name="registerMatch" value="ldapRegisterMatch.tmpl"/>
|
240
|
<property name="registerSuccess" value="ldapRegisterSuccess.tmpl"/>
|
241
|
<property name="register" value="ldapRegister.tmpl"/>
|
242
|
<property name="searchResults" value="searchResults.tmpl"/>
|
243
|
<property name="ldapMainServerFailure" value="ldapMainServerFailure.tmpl"/>
|
244
|
|
245
|
<filter token="scope" value="${scope}"/>
|
246
|
<filter token="responseForm" value="${responseForm}"/>
|
247
|
<filter token="entryForm" value="${entryForm}"/>
|
248
|
<filter token="guide" value="${guide}"/>
|
249
|
<filter token="loginForm" value="${loginForm}"/>
|
250
|
<filter token="confirmData" value="${confirmData}"/>
|
251
|
<filter token="deleteData" value="${deleteData}"/>
|
252
|
<filter token="genericHeader" value="${genericHeader}"/>
|
253
|
<filter token="genericFooter" value="${genericFooter}"/>
|
254
|
<filter token="adminname" value="${adminname}"/>
|
255
|
<filter token="recipient" value="${recipient}"/>
|
256
|
|
257
|
<filter token="ldapurl" value="ldap.ecoinformatics.org"/>
|
258
|
<filter token="ldapSearchBase" value="dc=ecoinformatics,dc=org"/>
|
259
|
<filter token="ldap_user" value="cn=Manager,dc=ecoinformatics,dc=org"/>
|
260
|
<filter token="ldap_password" value="ldap_password"/>
|
261
|
<filter token="mailhost" value="localhost"/>
|
262
|
<filter token="sender" value="knb-software\@nceas.ucsb.edu"/>
|
263
|
<filter token="cgiurl" value="${cgi-prefix}/ldapweb.cgi"/>
|
264
|
|
265
|
<filter token="docrooturl" value="./" />
|
266
|
<filter token="database" value="${database}" />
|
267
|
<filter token="jdbc-connect" value="${jdbc-connect}"/>
|
268
|
<filter token="dbDriver" value="${dbDriver}"/>
|
269
|
<filter token="dbAdapter" value="${dbAdapter}"/>
|
270
|
<filter token="install-dir" value="${installdir}"/>
|
271
|
<filter token="temp-dir" value="${temp-dir}"/>
|
272
|
<filter token="server" value="${server}"/>
|
273
|
<filter token="systemidserver" value="${systemidserver}"/>
|
274
|
<filter token="cgi-prefix" value="${cgi-prefix}"/>
|
275
|
<filter token="ldapUrl" value="${ldapUrl}"/>
|
276
|
<filter token="replication-log" value="${replication-log}"/>
|
277
|
<filter token="replicationerrorlog" value="${replicationerrorlog}"/>
|
278
|
<filter token="servlet-path" value="${servlet-path}"/>
|
279
|
<filter token="html-path" value="${html-path}"/>
|
280
|
<filter token="user" value="${user}"/>
|
281
|
<filter token="password" value="${password}"/>
|
282
|
<filter token="mcuser" value="${mcuser}"/>
|
283
|
<filter token="mcpassword" value="${mcpassword}"/>
|
284
|
<filter token="mcanotheruser" value="${mcanotheruser}"/>
|
285
|
<filter token="mcanotherpassword" value="${mcanotherpassword}"/>
|
286
|
<filter token="knb-site-url" value="${knb-site-url}"/>
|
287
|
<filter token="eml-css" value="${eml-css}"/>
|
288
|
<filter token="style-skins-relpath" value="${style-skins-relpath}"/>
|
289
|
<filter token="style-skins-path" value="${style-skins-path}"/>
|
290
|
<filter token="style-common-relpath" value="${style-common-relpath}"/>
|
291
|
<filter token="style-common-fullpath" value="${style-common-fullpath}"/>
|
292
|
<filter token="style-common-path" value="${style-common-path}"/>
|
293
|
<filter token="style-shared-path" value="${style-shared-path}"/>
|
294
|
<filter token="templates.dir" value="${templates.dir}"/>
|
295
|
|
296
|
<!-- The "style-path" filter is used by the eml xsl stylesheets!! -->
|
297
|
<filter token="style-path" value="${style-skins-path}"/>
|
298
|
<filter token="replication-path" value="${replication-path}"/>
|
299
|
<filter token="harvester-registration-login-path" value="${harvester-registration-login-path}"/>
|
300
|
<filter token="harvester-registration-path" value="${harvester-registration-path}"/>
|
301
|
<filter token="config-dir" value="${config-dir}"/>
|
302
|
<filter token="default-style" value="${default-style}"/>
|
303
|
<filter token="eml-version" value="${eml-version}"/>
|
304
|
<filter token="eml2_0_0namespace" value="${eml2_0_0namespace}"/>
|
305
|
<filter token="eml2_0_1namespace" value="${eml2_0_1namespace}"/>
|
306
|
<filter token="eml2_1_0namespace" value="${eml2_1_0namespace}"/>
|
307
|
<filter token="stmmlnamespace" value="${stmmlnamespace}"/>
|
308
|
<filter token="context" value="${metacat.context}"/>
|
309
|
<filter token="httpserver" value="${httpserver}"/>
|
310
|
<filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" />
|
311
|
<filter token="debuglevel" value="${debuglevel}" />
|
312
|
<filter token="datafilepath" value="${datafilepath}" />
|
313
|
<filter token="inlinedatafilepath" value="${inlinedatafilepath}" />
|
314
|
<filter token="defaultcontenttype" value="${defaultcontenttype}" />
|
315
|
<filter token="debugprefix" value="${debugprefix}"/>
|
316
|
<filter token="administrators" value="${administrators}"/>
|
317
|
<filter token="moderators" value="${moderators}"/>
|
318
|
<filter token="allowedSubmitters" value="${allowedSubmitters}"/>
|
319
|
<filter token="deniedSubmitters" value="${deniedSubmitters}"/>
|
320
|
<filter token="indexPaths" value="${indexPaths}"/>
|
321
|
|
322
|
<filter token="defaultStage" value="${defaultStage}"/>
|
323
|
<filter token="defaultHeader" value="${defaultHeader}"/>
|
324
|
<filter token="defaultFooter" value="${defaultFooter}"/>
|
325
|
<filter token="defaultChangePass" value="${defaultChangePass}"/>
|
326
|
<filter token="defaultResetPass" value="${defaultResetPass}"/>
|
327
|
<filter token="changePassSuccess" value="${changePassSuccess}"/>
|
328
|
<filter token="resetPassSuccess" value="${resetPassSuccess}"/>
|
329
|
<filter token="registerFailed" value="${registerFailed}"/>
|
330
|
<filter token="registerLter" value="${registerLter}"/>
|
331
|
<filter token="registerMatch" value="${registerMatch}"/>
|
332
|
<filter token="registerSuccess" value="${registerSuccess}"/>
|
333
|
<filter token="register" value="${register}"/>
|
334
|
<filter token="searchResults" value="${searchResults}"/>
|
335
|
<filter token="ldapMainServerFailure" value="${ldapMainServerFailure}"/>
|
336
|
|
337
|
<filter token="timedreplication" value="${timedreplication}" />
|
338
|
<filter token="firsttimedreplication" value="${firsttimedreplication}" />
|
339
|
<filter token="timedreplicationinterval" value="${timedreplicationinterval}" />
|
340
|
|
341
|
<property name="srcdir" value="./src" />
|
342
|
<property name="lib.dir" value="./lib" />
|
343
|
<property name="testdir" value="./test" />
|
344
|
<property name="testtorun" value="BuildIndexTest" />
|
345
|
<property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
|
346
|
<property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
|
347
|
<property name="build.dir" value="./build"/>
|
348
|
<property name="build.src" value="${build.dir}/src"/>
|
349
|
<property name="build.dest" value="${build.dir}/classes"/>
|
350
|
<property name="build.docs" value="${build.dir}/docs"/>
|
351
|
<property name="build.samples" value="${build.dir}/samples"/>
|
352
|
<property name="build.tests" value="${build.dir}/tests"/>
|
353
|
<property name="build.tmp" value="${build.dir}/tmp"/>
|
354
|
<property name="build.metacattest" value="${build.tests}/metacattest"/>
|
355
|
<property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
|
356
|
<property name="build.data" value="${build.dir}/data"/>
|
357
|
<property name="build.javadocs" value="${build.dir}/docs/api"/>
|
358
|
<property name="build.war" value="${build.dir}/war"/>
|
359
|
|
360
|
<property name="dist.dir" value="dist"/>
|
361
|
<property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
|
362
|
<property name="ver.src" value="${ver.dir}/src"/>
|
363
|
<property name="util.dir" value="${dist.dir}/${util-module}"/>
|
364
|
<!-- directories for creating a Harvest List Editor distribution -->
|
365
|
<property name="dist.dir.hle" value="disthle"/>
|
366
|
<property name="ver.dir.hle" value="${dist.dir.hle}/harvest-list-editor-${release}"/>
|
367
|
|
368
|
|
369
|
<property name="ecogrid-target-name" value="metacatImpl"/>
|
370
|
<property name="ecogrid-module-dest-dir" value =".."/>
|
371
|
<property name="ecogrid-module" value="seek/projects/ecogrid"/>
|
372
|
<property name="ecogrid-dist-dir" value="${dist.dir}/${ecogrid-module}"/>
|
373
|
<property name="ecogrid-dir" value="${ecogrid-module-dest-dir}/${ecogrid-module}"/>
|
374
|
|
375
|
<property name="package.home" value="edu/ucsb/nceas/metacat" />
|
376
|
<condition property="utilities.required">
|
377
|
<or>
|
378
|
<not><available file="lib/httpclient.jar"/></not>
|
379
|
<not><available file="lib/utilities.jar"/></not>
|
380
|
</or>
|
381
|
</condition>
|
382
|
<condition property="eml.required">
|
383
|
<or>
|
384
|
<not><available file="lib/schema/eml-2.0.1/eml.xsd"/></not>
|
385
|
<not><available file="lib/schema/eml-2.0.0/eml.xsd"/></not>
|
386
|
<not><available file="lib/dtd/eml-dataset-2.0.0beta6.dtd"/></not>
|
387
|
</or>
|
388
|
</condition>
|
389
|
|
390
|
<condition property="ecogrid.required">
|
391
|
<or>
|
392
|
<not><available file="${ecogrid-dir}/build.properties"/></not>
|
393
|
<not><available file="${ecogrid-dir}/buildfiles/metacatImpl.xml"/></not>
|
394
|
</or>
|
395
|
</condition>
|
396
|
|
397
|
</target>
|
398
|
|
399
|
<target name="prepare" depends="init">
|
400
|
<mkdir dir="${build.dir}"/>
|
401
|
<mkdir dir="${build.src}"/>
|
402
|
<mkdir dir="${build.dest}"/>
|
403
|
<mkdir dir="${build.javadocs}"/>
|
404
|
<mkdir dir="${build.tmp}"/>
|
405
|
|
406
|
<copy todir="${build.src}" filtering="yes">
|
407
|
<fileset dir="${srcdir}">
|
408
|
<include name="edu/**"/>
|
409
|
<include name="com/**"/>
|
410
|
<include name="org/**"/>
|
411
|
<include name="**/*.sql"/>
|
412
|
<exclude name="**/CVS*"/>
|
413
|
<exclude name="**/.#*"/>
|
414
|
</fileset>
|
415
|
</copy>
|
416
|
<available file="lib/style/common/emlb6toeml2" type="dir"
|
417
|
property="styles.not.needed"/>
|
418
|
</target>
|
419
|
|
420
|
<target name="compile" depends="prepare,utilities"
|
421
|
description="Compiles java code to build dir, and copies metacat props files there">
|
422
|
|
423
|
<javac srcdir="${build.src}"
|
424
|
destdir="${build.dest}"
|
425
|
debug="${debug}"
|
426
|
excludes="**/*.sql **/stringclient/** **/client/*.java **/harvesterClient/*.java">
|
427
|
<classpath>
|
428
|
<path refid="compile.classpath"/>
|
429
|
</classpath>
|
430
|
</javac>
|
431
|
</target>
|
432
|
|
433
|
<target name="jar" depends="compile,geteml"
|
434
|
description="Compiles and jars metacat java code to metacat.jar in build dir">
|
435
|
|
436
|
<delete file="${build.dir}/${name}.jar" />
|
437
|
<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
|
438
|
excludes="**/protocols/ **/harvesterClient/" />
|
439
|
</target>
|
440
|
|
441
|
<target name="protocol" depends="compile"
|
442
|
description="Compiles and jars protocol java code to protocol.jar in build dir">
|
443
|
<delete file="${build.dir}/protocol.jar" />
|
444
|
<jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
|
445
|
includes="**/protocols/" />
|
446
|
</target>
|
447
|
|
448
|
<target name="utilities" depends="config" if="utilities.required">
|
449
|
<ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
|
450
|
<ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
|
451
|
<copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
|
452
|
<copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
|
453
|
</target>
|
454
|
|
455
|
<target name="getutilities" depends="prepare"
|
456
|
description="Checks utility out of cvs and copies it to your metacat cvs sandbox">
|
457
|
<echo>Enter CVS password: </echo>
|
458
|
<cvs cvsRoot="${cvsroot}"
|
459
|
package="${util-module}"
|
460
|
dest="${build.tmp}" />
|
461
|
</target>
|
462
|
|
463
|
<target name="client" depends="utilities, prepare"
|
464
|
description="Compiles metacat-client java code to build dir">
|
465
|
<javac srcdir="${build.src}"
|
466
|
destdir="${build.dest}"
|
467
|
includes="edu/ucsb/nceas/metacat/client/*">
|
468
|
<classpath>
|
469
|
<path refid="compile.classpath"/>
|
470
|
</classpath>
|
471
|
</javac>
|
472
|
</target>
|
473
|
|
474
|
<target name="clientjar" depends="client"
|
475
|
description="Compiles and jars metacat-client java code to metacat-client.jar in build dir">
|
476
|
<delete file="${build.dir}/${name}-client.jar" />
|
477
|
<jar jarfile="${build.dir}/${name}-client.jar" basedir="${build.dest}"
|
478
|
includes="**/metacat/client/" />
|
479
|
</target>
|
480
|
|
481
|
<target name="advancedsearchjar" depends="compile"
|
482
|
description="Compiles and jars advanced search Java code to advancedsearch.jar in build dir">
|
483
|
<delete file="${build.dir}/advancedsearch.jar" />
|
484
|
<jar jarfile="${build.dir}/advancedsearch.jar" basedir="${build.dest}"
|
485
|
includes="**/metacat/advancedsearch/" />
|
486
|
</target>
|
487
|
|
488
|
<target name="harvester" depends="client"
|
489
|
description="Compiles harvester java code to build dir">
|
490
|
<javac srcdir="${build.src}"
|
491
|
destdir="${build.dest}"
|
492
|
includes="edu/ucsb/nceas/metacat/harvesterClient/*">
|
493
|
<classpath>
|
494
|
<path refid="compile.classpath"/>
|
495
|
</classpath>
|
496
|
</javac>
|
497
|
</target>
|
498
|
|
499
|
<target name="harvesterjar" depends="harvester"
|
500
|
description="Compiles and jars harvester java code to harvester.jar in build dir">
|
501
|
<delete file="${build.dir}/harvester.jar" />
|
502
|
<jar jarfile="${build.dir}/harvester.jar" basedir="${build.dest}"
|
503
|
includes="**/metacat/harvesterClient/" />
|
504
|
</target>
|
505
|
|
506
|
<target name="harvestListEditorDist" depends="harvesterjar"
|
507
|
description="Prepares a distribution of the Harvest List Editor tool">
|
508
|
<mkdir dir="${dist.dir.hle}"/>
|
509
|
<delete dir="${ver.dir.hle}" />
|
510
|
<mkdir dir="${ver.dir.hle}"/>
|
511
|
<copy todir="${ver.dir.hle}" file="${build.dir}/harvester.jar"/>
|
512
|
<copy todir="${ver.dir.hle}" file="lib/xercesImpl.jar"/>
|
513
|
<copy todir="${ver.dir.hle}" file="lib/harvester/harvestList.xsd"/>
|
514
|
<copy todir="${ver.dir.hle}" file="lib/harvester/harvestListEditor.bat"/>
|
515
|
<copy todir="${ver.dir.hle}" file="lib/harvester/harvestListEditor.sh"/>
|
516
|
<delete file="./harvest-list-editor-${release}.zip"/>
|
517
|
<zip zipfile="./harvest-list-editor-${release}.zip" basedir="${ver.dir.hle}" />
|
518
|
<delete file="./harvest-list-editor-${release}.tar.gz" />
|
519
|
<tar tarfile="./harvest-list-editor-${release}.tar" basedir="${ver.dir.hle}" />
|
520
|
<gzip zipfile="./harvest-list-editor-${release}.tar.gz"
|
521
|
src="./harvest-list-editor-${release}.tar"/>
|
522
|
<delete file="./harvest-list-editor-${release}.tar" />
|
523
|
</target>
|
524
|
|
525
|
<target name="geteml" depends="getemlpre2,geteml2+" if="eml.required"
|
526
|
description="Calls getemlpre2 and geteml2+ targets" />
|
527
|
|
528
|
<target name="getemlpre2" depends="prepare" if="eml.required"
|
529
|
description="Checks EML-beta6 out of cvs and copies dtds and xsl to your metacat cvs sandbox">
|
530
|
<echo>Enter CVS password: </echo>
|
531
|
<cvs cvsRoot="${cvsroot}"
|
532
|
package="${eml-module}"
|
533
|
tag="${eml-tag}"
|
534
|
dest="${build.tmp}/eml_${eml-tag}" />
|
535
|
<mkdir dir="lib/dtd" />
|
536
|
<copy todir="lib/dtd" filtering="yes">
|
537
|
<fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}">
|
538
|
<include name="*.dtd"/>
|
539
|
</fileset>
|
540
|
<mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
|
541
|
</copy>
|
542
|
|
543
|
<copy todir="${style-common-cvsrelpath}" filtering="yes">
|
544
|
<fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}/style">
|
545
|
<include name="**/*.xsl"/>
|
546
|
</fileset>
|
547
|
</copy>
|
548
|
</target>
|
549
|
|
550
|
<target name="geteml2+" depends="prepare" if="eml.required"
|
551
|
description="Checks eml-2 out of cvs and copies schema and xsl to your metacat cvs sandbox">
|
552
|
<echo>Enter CVS password: </echo>
|
553
|
<cvs cvsRoot="${cvsroot}"
|
554
|
package="${eml-module}"
|
555
|
tag="${eml2_0_0-tag}"
|
556
|
dest="${build.tmp}/eml_${eml2_0_0-tag}" />
|
557
|
<mkdir dir="lib/schema/eml-2.0.0" />
|
558
|
<copy todir="lib/schema/eml-2.0.0" filtering="yes">
|
559
|
<fileset dir="${build.tmp}/eml_${eml2_0_0-tag}/${eml-module}">
|
560
|
<include name="*.xsd"/>
|
561
|
</fileset>
|
562
|
|
563
|
<!-- shouldn't we have a mapper here like this??
|
564
|
<mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" />
|
565
|
|
566
|
Jing's code didn't nave one - does it need to be added?
|
567
|
NOTE that eml-version is set to beta 6, so this would need changing -->
|
568
|
|
569
|
</copy>
|
570
|
<!-- <antcall target="copyxsl">
|
571
|
<param name="cvs.tagname" value="${eml2_0_0-tag}" />
|
572
|
<param name="dirname" value="eml-2.0.0" />
|
573
|
</antcall> -->
|
574
|
|
575
|
<echo>Enter CVS password: </echo>
|
576
|
<cvs cvsRoot="${cvsroot}"
|
577
|
package="${eml-module}"
|
578
|
tag="${eml2_0_1-tag}"
|
579
|
dest="${build.tmp}/eml_${eml2_0_1-tag}" />
|
580
|
<mkdir dir="lib/schema/eml-2.0.1" />
|
581
|
<copy todir="lib/schema/eml-2.0.1" filtering="yes">
|
582
|
<fileset dir="${build.tmp}/eml_${eml2_0_1-tag}/${eml-module}">
|
583
|
<include name="*.xsd"/>
|
584
|
</fileset>
|
585
|
</copy>
|
586
|
<antcall target="copyxsl">
|
587
|
<param name="cvs.tagname" value="${eml2_0_1-tag}" />
|
588
|
<param name="dirname" value="eml-2.0.1" />
|
589
|
</antcall>
|
590
|
</target>
|
591
|
|
592
|
<target name="copyxsl"
|
593
|
description="Copies xsl stylesheets from checkout in build/tmp to your metacat cvs sandbox">
|
594
|
|
595
|
<delete file="${style-common-cvsrelpath}/${eml-css}"/>
|
596
|
|
597
|
<copy todir="${style-common-cvsrelpath}/${dirname}" filtering="yes">
|
598
|
<fileset dir="${build.tmp}/eml_${cvs.tagname}/${eml-module}/style/eml">
|
599
|
<include name="**/*.xsl"/>
|
600
|
</fileset>
|
601
|
</copy>
|
602
|
|
603
|
|
604
|
<!-- now copy default css from eml module and put it in style-common-path
|
605
|
dir with a new name, so other skin-specific css can import it if reqd -->
|
606
|
<copy file="${build.tmp}/eml_${cvs.tagname}/${eml-module}/${eml-module.default.css}"
|
607
|
tofile="${style-common-cvsrelpath}/${eml-css}" />
|
608
|
|
609
|
</target>
|
610
|
|
611
|
|
612
|
|
613
|
<target name="register-schemas" depends="prepare"
|
614
|
description="Registers the Schemas with a new Metacat instance">
|
615
|
<echo/>
|
616
|
<echo>Registering the Schemas with the new Metacat instance...</echo>
|
617
|
<sql driver="${dbDriver}"
|
618
|
url="${jdbc-connect}"
|
619
|
userid="${user}"
|
620
|
password="${password}"
|
621
|
src="${build.src}/loaddtdschema.sql">
|
622
|
<classpath>
|
623
|
<path refid="compile.classpath"/>
|
624
|
</classpath>
|
625
|
</sql>
|
626
|
</target>
|
627
|
|
628
|
<target name="installdb" depends="prepare"
|
629
|
description="Installs the database tables">
|
630
|
<echo/>
|
631
|
<echo>Installing the database tables...</echo>
|
632
|
<echo>In case of failure, run the sql script manually. Look at Metacat install instructions for more details</echo>
|
633
|
<echo/>
|
634
|
<sql driver="${dbDriver}"
|
635
|
url="${jdbc-connect}"
|
636
|
userid="${user}"
|
637
|
password="${password}"
|
638
|
src="${build.src}/${install-sql}">
|
639
|
<classpath>
|
640
|
<path refid="compile.classpath"/>
|
641
|
</classpath>
|
642
|
</sql>
|
643
|
</target>
|
644
|
|
645
|
<target name="dropdb" depends="prepare"
|
646
|
description="WARNING: Drops the database tables">
|
647
|
<echo/>
|
648
|
<echo>Dropping the database tables...</echo>
|
649
|
<echo>In case of failure, run the sql script manually. Look at Metacat install instructions for more details</echo>
|
650
|
<echo/>
|
651
|
<sql driver="${dbDriver}"
|
652
|
url="${jdbc-connect}"
|
653
|
userid="${user}"
|
654
|
password="${password}"
|
655
|
src="${build.src}/drop-postgres.sql">
|
656
|
<classpath>
|
657
|
<path refid="compile.classpath"/>
|
658
|
</classpath>
|
659
|
</sql>
|
660
|
</target>
|
661
|
|
662
|
<target name="upgrade12" depends="prepare"
|
663
|
description="Updates the database tables to upgrade to version 1.2">
|
664
|
<echo/>
|
665
|
<echo>Updating the database tables to upgrade to version 1.2...</echo>
|
666
|
<sql driver="${dbDriver}"
|
667
|
url="${jdbc-connect}"
|
668
|
userid="${user}"
|
669
|
password="${password}"
|
670
|
src="${build.src}/${upgrade-1.2-sql}">
|
671
|
<classpath>
|
672
|
<path refid="compile.classpath"/>
|
673
|
</classpath>
|
674
|
</sql>
|
675
|
</target>
|
676
|
|
677
|
<target name="upgrade13" depends="prepare"
|
678
|
description="Updates the database tables to upgrade to version 1.3">
|
679
|
<echo/>
|
680
|
<echo>Updating the database tables to upgrade to version 1.3...</echo>
|
681
|
<sql driver="${dbDriver}"
|
682
|
url="${jdbc-connect}"
|
683
|
userid="${user}"
|
684
|
password="${password}"
|
685
|
src="${build.src}/${upgrade-1.3-sql}">
|
686
|
<classpath>
|
687
|
<path refid="compile.classpath"/>
|
688
|
</classpath>
|
689
|
</sql>
|
690
|
</target>
|
691
|
|
692
|
<target name="upgrade14" depends="prepare"
|
693
|
description="Updates the database tables to upgrade to version 1.4">
|
694
|
<echo/>
|
695
|
<echo>Updating the database tables to upgrade to version 1.4...</echo>
|
696
|
<sql driver="${dbDriver}"
|
697
|
url="${jdbc-connect}"
|
698
|
userid="${user}"
|
699
|
password="${password}"
|
700
|
src="${build.src}/${upgrade-1.4-sql}">
|
701
|
<classpath>
|
702
|
<path refid="compile.classpath"/>
|
703
|
</classpath>
|
704
|
</sql>
|
705
|
</target>
|
706
|
|
707
|
<target name="upgrade15" depends="sqlupgrade15"
|
708
|
description="Updates the database tables to upgrade to version 1.5">
|
709
|
<echo/>
|
710
|
<echo>Updating the database tables to upgrade to version 1.5...</echo>
|
711
|
<copy file="${srcdir}/upgrade_db_to_1_5.java"
|
712
|
todir="${build.tmp}" filtering="yes"/>
|
713
|
|
714
|
<javac srcdir="${build.tmp}"
|
715
|
destdir="${build.tmp}"
|
716
|
debug="${debug}"
|
717
|
includes="upgrade_db_to_1_5.java">
|
718
|
<classpath>
|
719
|
<path refid="compile.classpath"/>
|
720
|
</classpath>
|
721
|
</javac>
|
722
|
|
723
|
<java classname="upgrade_db_to_1_5">
|
724
|
<classpath>
|
725
|
<path refid="compile.classpath"/>
|
726
|
<fileset dir="${build.tmp}"/>
|
727
|
</classpath>
|
728
|
</java>
|
729
|
|
730
|
</target>
|
731
|
|
732
|
<target name="upgrade16" depends="prepare"
|
733
|
description="Updates the database tables from version 1.5 to version 1.6">
|
734
|
<echo/>
|
735
|
<echo>Updating the database tables to upgrade to version 1.6...</echo>
|
736
|
<sql driver="${dbDriver}"
|
737
|
url="${jdbc-connect}"
|
738
|
userid="${user}"
|
739
|
password="${password}"
|
740
|
src="${build.src}/${upgrade-1.6-sql}">
|
741
|
<classpath>
|
742
|
<path refid="compile.classpath"/>
|
743
|
</classpath>
|
744
|
</sql>
|
745
|
</target>
|
746
|
|
747
|
<target name="upgrade17" depends="prepare"
|
748
|
description="Updates the database tables from version 1.6 to version 1.7">
|
749
|
<echo/>
|
750
|
<echo>Updating the database tables to upgrade to version 1.7...</echo>
|
751
|
<sql driver="${dbDriver}"
|
752
|
url="${jdbc-connect}"
|
753
|
userid="${user}"
|
754
|
password="${password}"
|
755
|
src="${build.src}/${upgrade-1.7-sql}">
|
756
|
<classpath>
|
757
|
<path refid="compile.classpath"/>
|
758
|
</classpath>
|
759
|
</sql>
|
760
|
</target>
|
761
|
|
762
|
<target name="upgrade171" depends="prepare"
|
763
|
description="Updates the database tables from version 1.7 to version 1.7.1">
|
764
|
<echo/>
|
765
|
<echo>Updating the database tables to upgrade to version 1.7.1...</echo>
|
766
|
<sql driver="${dbDriver}"
|
767
|
url="${jdbc-connect}"
|
768
|
userid="${user}"
|
769
|
password="${password}"
|
770
|
src="${build.src}/${upgrade-1.7.1-sql}">
|
771
|
<classpath>
|
772
|
<path refid="compile.classpath"/>
|
773
|
</classpath>
|
774
|
</sql>
|
775
|
</target>
|
776
|
|
777
|
<target name="sqlupgrade15" depends="prepare">
|
778
|
<echo>Updating the database tables to upgrade to version 1.5 by sql command</echo>
|
779
|
<sql driver="${dbDriver}"
|
780
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
781
|
url="${jdbc-connect}"
|
782
|
userid="${user}"
|
783
|
password="${password}"
|
784
|
src="${build.src}/${upgrade-1.5-sql}" />
|
785
|
<sql driver="${dbDriver}"
|
786
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
787
|
url="${jdbc-connect}"
|
788
|
userid="${user}"
|
789
|
password="${password}"
|
790
|
rdbms="oracle"
|
791
|
delimiter="/">
|
792
|
<transaction>
|
793
|
CREATE TRIGGER xml_returnfield_before_insert
|
794
|
BEFORE INSERT ON xml_returnfield FOR EACH ROW
|
795
|
BEGIN
|
796
|
SELECT xml_returnfield_id_seq.nextval
|
797
|
INTO :new.returnfield_id
|
798
|
FROM dual;
|
799
|
END;
|
800
|
/
|
801
|
</transaction>
|
802
|
<transaction>
|
803
|
CREATE TRIGGER xml_queryresult_before_insert
|
804
|
BEFORE INSERT ON xml_queryresult FOR EACH ROW
|
805
|
BEGIN
|
806
|
SELECT xml_queryresult_id_seq.nextval
|
807
|
INTO :new.queryresult_id
|
808
|
FROM dual;
|
809
|
END;
|
810
|
/
|
811
|
</transaction>
|
812
|
</sql>
|
813
|
</target>
|
814
|
|
815
|
<target name="install-spatial" depends="jar,clientjar,harvesterjar"
|
816
|
description="Installs spatial option for metacat">
|
817
|
|
818
|
<property name="spatial.dir" value="./lib/spatial"/>
|
819
|
<property name="spatial.geoserver.dir" value="${spatial.dir}/geoserver"/>
|
820
|
<property name="spatial.webinf-mods" value="${spatial.dir}/WEB-INF"/>
|
821
|
|
822
|
<!-- Copy geoserver libs into ${war.lib} -->
|
823
|
<copy todir="${war.lib}" filtering="no">
|
824
|
<fileset dir="${spatial.geoserver.dir}/WEB-INF/lib">
|
825
|
<include name="**"/>
|
826
|
</fileset>
|
827
|
</copy>
|
828
|
|
829
|
<!-- Copy everything in geoservers WEB-INF (except the libs) into ${war.webinf} -->
|
830
|
<copy todir="${war.webinf}" filtering="no">
|
831
|
<fileset dir="${spatial.geoserver.dir}/WEB-INF">
|
832
|
<exclude name="lib/**"/>
|
833
|
<exclude name="web.xml"/>
|
834
|
</fileset>
|
835
|
</copy>
|
836
|
|
837
|
<!-- Copy the rest of the geoserver codebase into ${war.context} -->
|
838
|
<copy todir="${war.context}" filtering="no">
|
839
|
<fileset dir="${spatial.geoserver.dir}">
|
840
|
<exclude name="WEB-INF/**"/>
|
841
|
<exclude name="index.jsp"/>
|
842
|
</fileset>
|
843
|
</copy>
|
844
|
|
845
|
<!-- Copy the geoserver index.jsp but rename it to avoid conflicting w/metcat -->
|
846
|
<copy file="${spatial.geoserver.dir}/WEB-INF/pages/index.jsp"
|
847
|
tofile="${war.context}/geoserver.jsp"
|
848
|
overwrite="true"
|
849
|
filtering="no"/>
|
850
|
|
851
|
<!-- Copy the rest of the modified geoserver web-inf files
|
852
|
<copy todir="${war.webinf}" filtering="no">
|
853
|
<fileset dir="${spatial.webinf-mods}">
|
854
|
<exclude name="web.xml.combined"/>
|
855
|
</fileset>
|
856
|
</copy> -->
|
857
|
|
858
|
</target>
|
859
|
|
860
|
|
861
|
<target name="install" depends="install-ecogrid" description="* Full Install *">
|
862
|
<mkdir dir="${datafilepath}" />
|
863
|
<mkdir dir="${inlinedatafilepath}" />
|
864
|
<chmod dir="${datafilepath}" perm="ug+w" />
|
865
|
<mkdir dir="${temp-dir}"/>
|
866
|
<chmod dir="${temp-dir}" perm="ug+w" />
|
867
|
<copy file="${dist.dir}/${metacat.context}.war" todir="${deploy.dir}"/>
|
868
|
<echo>If you enable ecogrid installation, please run "ant deploy-ecogrid" when installation or upgrade is done</echo>
|
869
|
</target>
|
870
|
|
871
|
<target name="install-ecogrid" depends="war, get-ecogrid" if="enable.ecogrid"
|
872
|
description="Install Ecogrid Compentent">
|
873
|
<copyfile src="lib/metacat.url" dest="${ecogrid-dir}/conf/MetacatImpl/classes/metacat.properties" forceoverwrite="true" filtering="yes"/>
|
874
|
<ant antfile="build.xml" dir="${ecogrid-dir}" target ="clean" inheritall="false">
|
875
|
<property name="context" value="${metacat.context}"/>
|
876
|
<property name="target" value="${ecogrid-target-name}"/>
|
877
|
<property name="metacat.dir" value="${metacat.dir}"/>
|
878
|
</ant>
|
879
|
<ant antfile="build.xml" dir="${ecogrid-dir}" target ="war" inheritall="false">
|
880
|
<property name="context" value="${metacat.context}"/>
|
881
|
<property name="target" value="${ecogrid-target-name}"/>
|
882
|
<property name="metacat.dir" value="${metacat.dir}"/>
|
883
|
</ant>
|
884
|
<war destfile="${ecogrid-dir}/build/${metacat.context}.war" update="true">
|
885
|
<webinf dir="${ecogrid-dir}/lib">
|
886
|
<include name="server-config.wsdd"/>
|
887
|
</webinf>
|
888
|
</war>
|
889
|
<copy file="${ecogrid-dir}/build/${metacat.context}.war" todir="${dist.dir}" overwrite="true"/>
|
890
|
|
891
|
|
892
|
</target>
|
893
|
|
894
|
<target name="get-ecogrid" depends="init" if="ecogrid.required" description="Check out ecogrid module">
|
895
|
<echo>Enter CVS password: </echo>
|
896
|
<cvs cvsRoot="${cvsroot}"
|
897
|
package="${ecogrid-module}" dest="${ecogrid-module-dest-dir}"/>
|
898
|
</target>
|
899
|
|
900
|
|
901
|
<target name="upgrade" depends="install"
|
902
|
description="* Upgrade an existing metacat installation with a new version *">
|
903
|
<unwar src="${deploy.dir}/${metacat.context}.war" dest="${deploy.dir}/${metacat.context}" />
|
904
|
</target>
|
905
|
|
906
|
<target name="deploy-ecogrid" depends="clean-ecogrid-server-config-wsdd" if="enable.ecogrid" description="Automately generate wsdd for ecogrid service">
|
907
|
<ant antfile="build.xml" dir="${ecogrid-dir}" target ="deploy" inheritall="false">
|
908
|
<property name="context" value="${metacat.context}"/>
|
909
|
<property name="target" value="${ecogrid-target-name}"/>
|
910
|
<property name="metacat.dir" value="${metacat.dir}"/>
|
911
|
<property name="hostname" value="${config.hostname}"/>
|
912
|
<property name="port" value="${config.port}"/>
|
913
|
</ant>
|
914
|
</target>
|
915
|
|
916
|
<target name="clean-ecogrid-server-config-wsdd" depends="init" description="Automately generate wsdd for ecogrid service">
|
917
|
<delete file="${deploy.dir}/${metacat.context}/WEB-INF/server-config.wsdd"/>
|
918
|
</target>
|
919
|
|
920
|
<target name="install-registry" depends="init,getConversionXSL"
|
921
|
description="Install Registry">
|
922
|
|
923
|
<copy file="${srcdir}/perl/register-dataset.cgi"
|
924
|
todir="${inst.cgi.dir}" filtering="yes"/>
|
925
|
<chmod file="${inst.cgi.dir}/register-dataset.cgi" perm="ugo+x" />
|
926
|
|
927
|
<mkdir dir="${temp-dir}" />
|
928
|
<copy todir="${temp-dir}" filtering="yes">
|
929
|
<fileset dir="lib/style/common/emlb6toeml2">
|
930
|
<include name="*.xsl"/>
|
931
|
<include name="*.xml"/>
|
932
|
</fileset>
|
933
|
</copy>
|
934
|
|
935
|
<echo message="Install Registry completed." />
|
936
|
</target>
|
937
|
|
938
|
<target name="install-ldap" depends="init">
|
939
|
<copy file="${srcdir}/perl/ldapweb.cgi"
|
940
|
todir="${inst.cgi.dir}" filtering="yes"/>
|
941
|
<chmod file="${inst.cgi.dir}/ldapweb.cgi" perm="ugo+x" />
|
942
|
<copy file="lib/ldapweb.cfg"
|
943
|
todir="${inst.cgi.dir}" filtering="yes"/>
|
944
|
<chmod file="${inst.cgi.dir}/ldapweb.cfg" perm="ugo+x" />
|
945
|
<mkdir dir="${templates.dir}" />
|
946
|
<copy todir="${templates.dir}" filtering="yes">
|
947
|
<fileset dir="lib/style/common/templates">
|
948
|
<include name="${defaultChangePass}"/>
|
949
|
<include name="${defaultResetPass}"/>
|
950
|
<include name="${changePassSuccess}"/>
|
951
|
<include name="${resetPassSuccess}"/>
|
952
|
<include name="${registerFailed}"/>
|
953
|
<include name="${registerLter}"/>
|
954
|
<include name="${registerMatch}"/>
|
955
|
<include name="${registerSuccess}"/>
|
956
|
<include name="${register}"/>
|
957
|
<include name="${searchResults}"/>
|
958
|
<include name="${defaultHeader}"/>
|
959
|
<include name="${defaultFooter}"/>
|
960
|
<include name="${responseForm}"/>
|
961
|
<include name="${ldapMainServerFailure}"/>
|
962
|
</fileset>
|
963
|
</copy>
|
964
|
<echo message="ldapweb install complete." />
|
965
|
</target>
|
966
|
|
967
|
|
968
|
<target name="install-skin" depends="init"
|
969
|
description="Install a Skin">
|
970
|
|
971
|
<input message="Please enter name of the skin"
|
972
|
addproperty="skin-name"/>
|
973
|
|
974
|
<mkdir dir="${installdir}/style/skins/${skin-name}" />
|
975
|
<copy todir="${installdir}/style/skins/${skin-name}" filtering="yes">
|
976
|
<fileset dir="lib/style/skins/${skin-name}">
|
977
|
<exclude name="**/*.png"/>
|
978
|
<exclude name="**/*.gif"/>
|
979
|
<exclude name="**/*.jpg"/>
|
980
|
<exclude name="**/CVS*"/>
|
981
|
<exclude name="**/.#*"/>
|
982
|
</fileset>
|
983
|
</copy>
|
984
|
<copy todir="${installdir}/style/skins/${skin-name}" filtering="no">
|
985
|
<fileset dir="lib/style/skins/${skin-name}">
|
986
|
<include name="**/*.png"/>
|
987
|
<include name="**/*.gif"/>
|
988
|
<include name="**/*.jpg"/>
|
989
|
<exclude name="**/CVS*"/>
|
990
|
<exclude name="**/.#*"/>
|
991
|
</fileset>
|
992
|
</copy>
|
993
|
<copy todir="${installdir}/style/common" filtering="yes">
|
994
|
<fileset dir="lib/style/common">
|
995
|
<include name="*.js"/>
|
996
|
<include name="*.jsp"/>
|
997
|
<include name="*.css"/>
|
998
|
<exclude name="*.png"/>
|
999
|
<exclude name="*.gif"/>
|
1000
|
<exclude name="*.jpg"/>
|
1001
|
<exclude name="**/CVS*"/>
|
1002
|
<exclude name="**/.#*"/>
|
1003
|
</fileset>
|
1004
|
</copy>
|
1005
|
<!--
|
1006
|
<mkdir dir="${installdir}/style/skins/${skin-name}/images" />
|
1007
|
<copy todir="${installdir}/style/skins/${skin-name}/images" filtering="no">
|
1008
|
<fileset dir="lib/style/skins/${skin-name}/images">
|
1009
|
<include name="*.png"/>
|
1010
|
<include name="*.gif"/>
|
1011
|
<include name="*.jpg"/>
|
1012
|
</fileset>
|
1013
|
</copy>
|
1014
|
-->
|
1015
|
|
1016
|
<echo message="Install Skin completed." />
|
1017
|
</target>
|
1018
|
|
1019
|
<target name="war" depends="warPrepare,warMSSQL,install-spatial"
|
1020
|
description="Create a web archive (WAR) for servlet deployment">
|
1021
|
<mkdir dir="${dist.dir}" />
|
1022
|
<war destfile="${dist.dir}/${metacat.context}.war"
|
1023
|
webxml="${build.war}/web.xml">
|
1024
|
<fileset dir="${war.context}"/>
|
1025
|
<lib dir="${war.lib}"/>
|
1026
|
<webinf dir="${war.webinf}"/>
|
1027
|
</war>
|
1028
|
</target>
|
1029
|
|
1030
|
|
1031
|
|
1032
|
<target name="warPrepare" depends="jar,clientjar,harvesterjar"
|
1033
|
description="Prepare files for creating a web archive (WAR)">
|
1034
|
|
1035
|
<property name="war.lib" value="${build.war}/lib" />
|
1036
|
<property name="war.webinf" value="${build.war}/WEB-INF" />
|
1037
|
<property name="war.context" value="${build.war}/${metacat.context}" />
|
1038
|
<mkdir dir="${war.lib}" />
|
1039
|
<mkdir dir="${war.webinf}" />
|
1040
|
<mkdir dir="${war.context}" />
|
1041
|
|
1042
|
<copy file="${jdbc}" tofile="${war.lib}/jdbc.jar" />
|
1043
|
<copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
|
1044
|
<copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
|
1045
|
<copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
|
1046
|
<copy todir="${war.lib}" filtering="no">
|
1047
|
<fileset dir="lib">
|
1048
|
<not>
|
1049
|
<filename name="${jdbc-jar-name}"/>
|
1050
|
</not>
|
1051
|
<include name="*.jar"/>
|
1052
|
</fileset>
|
1053
|
<fileset dir="lib">
|
1054
|
<include name="xalan.jar"/>
|
1055
|
<include name="gwt*.jar"/>
|
1056
|
</fileset>
|
1057
|
</copy>
|
1058
|
<copy file="lib/web.xml.${tomcatversion}"
|
1059
|
tofile="${build.war}/web.xml" />
|
1060
|
<copy file="lib/metacat.properties" todir="${war.webinf}"
|
1061
|
filtering="yes" />
|
1062
|
<copy file="lib/metacat.properties.metadata" todir="${war.webinf}"
|
1063
|
filtering="no" />
|
1064
|
<copy todir="${war.webinf}" filtering="yes">
|
1065
|
<fileset dir="lib">
|
1066
|
<include name="skin.configs/**"/>
|
1067
|
</fileset>
|
1068
|
</copy>
|
1069
|
<copy file="lib/log4j.properties" todir="${war.webinf}"
|
1070
|
filtering="yes" />
|
1071
|
<copy todir="${war.context}" filtering="no">
|
1072
|
<fileset dir="lib">
|
1073
|
<include name="**/*.jpg"/>
|
1074
|
<include name="**/*.png"/>
|
1075
|
<include name="**/*.gif"/>
|
1076
|
<include name="LiveMap_30/**"/>
|
1077
|
</fileset>
|
1078
|
</copy>
|
1079
|
<copy todir="${war.context}" filtering="yes">
|
1080
|
<fileset dir="lib">
|
1081
|
<exclude name="*.jar"/>
|
1082
|
<exclude name="*.properties"/>
|
1083
|
<exclude name="*.metadata"/>
|
1084
|
<exclude name="web.xml"/>
|
1085
|
<exclude name="**/*.jpg"/>
|
1086
|
<exclude name="**/*.png"/>
|
1087
|
<exclude name="**/*.gif"/>
|
1088
|
<exclude name="lsid_lib/**"/>
|
1089
|
<exclude name="lsid_conf/**"/>
|
1090
|
<exclude name="LiveMap_30/**"/>
|
1091
|
<exclude name="skin.configs/**"/>
|
1092
|
<exclude name="spatial/geoserver/**"/>
|
1093
|
<exclude name="spatial/WEB-INF/**"/>
|
1094
|
</fileset>
|
1095
|
</copy>
|
1096
|
</target>
|
1097
|
|
1098
|
<target name="warMSSQL" if="MSSQL" depends="warPrepare">
|
1099
|
<copy file="${jdbc-add1}" tofile="${war.lib}/msutil.jar" />
|
1100
|
<copy file="${jdbc-add2}" tofile="${war.lib}/mssqlserver.jar" />
|
1101
|
</target>
|
1102
|
|
1103
|
<target name="getConversionXSL" depends="prepare"
|
1104
|
unless="styles.not.needed"
|
1105
|
description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
|
1106
|
|
1107
|
<echo>Enter CVS password: </echo>
|
1108
|
<cvs cvsRoot="${cvsroot}"
|
1109
|
package="${eml-module}"
|
1110
|
tag="${eml2_0_1-tag}"
|
1111
|
dest="${build.tmp}/eml_${eml2_0_1-tag}" />
|
1112
|
|
1113
|
<mkdir dir="lib/style/common/emlb6toeml2" />
|
1114
|
<copy todir="lib/style/common/emlb6toeml2" filtering="yes">
|
1115
|
<fileset dir="${build.tmp}/eml_${eml2_0_1-tag}/${eml-module}/lib/beta6toeml2/xsl">
|
1116
|
<include name="*.xsl"/>
|
1117
|
<include name="*.xml"/>
|
1118
|
</fileset>
|
1119
|
</copy>
|
1120
|
</target>
|
1121
|
|
1122
|
<target name="testprep" depends="jar,clientjar,harvesterjar">
|
1123
|
<mkdir dir="${build.tests}"/>
|
1124
|
<copy todir="${build.tests}" filtering="yes">
|
1125
|
<fileset dir="${testdir}">
|
1126
|
<include name="edu/**"/>
|
1127
|
</fileset>
|
1128
|
</copy>
|
1129
|
<!-- copy and compile the tests into a jar file -->
|
1130
|
<javac srcdir="${build.tests}"
|
1131
|
destdir="${build.tests}"
|
1132
|
debug="on"
|
1133
|
includes="**/*.java">
|
1134
|
<classpath>
|
1135
|
<path refid="compile.classpath"/>
|
1136
|
<fileset dir="${build.dir}">
|
1137
|
<include name="${name}.jar"/>
|
1138
|
<include name="${name}-client.jar"/>
|
1139
|
<include name="harvester.jar"/>
|
1140
|
</fileset>
|
1141
|
</classpath>
|
1142
|
</javac>
|
1143
|
|
1144
|
<jar jarfile="${build.dir}/${name}-junittests.jar"
|
1145
|
basedir="${build.tests}"
|
1146
|
includes="**/*.class" />
|
1147
|
</target>
|
1148
|
|
1149
|
<target name="test" depends="testprep"
|
1150
|
description="Uses the ant junit task to run all JUnit tests">
|
1151
|
|
1152
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
1153
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
1154
|
haltonerror="no">
|
1155
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
|
1156
|
<classpath>
|
1157
|
<path refid="compile.classpath"/>
|
1158
|
<fileset dir="${build.dir}">
|
1159
|
<include name="${name}.jar"/>
|
1160
|
<include name="${name}-client.jar"/>
|
1161
|
<include name="harvester.jar"/>
|
1162
|
<include name="${name}-junittests.jar"/>
|
1163
|
</fileset>
|
1164
|
</classpath>
|
1165
|
|
1166
|
<formatter type="plain" />
|
1167
|
|
1168
|
<batchtest fork="yes" todir="${build.dir}">
|
1169
|
<fileset dir="${build.tests}">
|
1170
|
<include name="**/*.class" />
|
1171
|
</fileset>
|
1172
|
</batchtest>
|
1173
|
</junit>
|
1174
|
</target>
|
1175
|
|
1176
|
<target name="runonetest" depends="testprep"
|
1177
|
description="Uses the ant junit task to run a single JUnit test, defined by the ${testtorun} property">
|
1178
|
|
1179
|
<echo>testtorun: ${testtorun}</echo>
|
1180
|
|
1181
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
1182
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
1183
|
haltonerror="no">
|
1184
|
<!--<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>-->
|
1185
|
<classpath>
|
1186
|
<path refid="compile.classpath"/>
|
1187
|
<fileset dir="${build.dir}">
|
1188
|
<include name="${name}.jar"/>
|
1189
|
<include name="${name}-client.jar"/>
|
1190
|
<include name="harvester.jar"/>
|
1191
|
<include name="${name}-junittests.jar"/>
|
1192
|
</fileset>
|
1193
|
</classpath>
|
1194
|
|
1195
|
<formatter type="plain" />
|
1196
|
|
1197
|
<batchtest fork="yes" todir="${build.dir}">
|
1198
|
<fileset dir="${build.tests}">
|
1199
|
<include name="**/${testtorun}.class" />
|
1200
|
</fileset>
|
1201
|
</batchtest>
|
1202
|
</junit>
|
1203
|
</target>
|
1204
|
|
1205
|
<target name="testharvester"
|
1206
|
depends="testprep"
|
1207
|
description="Uses the ant junit task to test only the Harvester code">
|
1208
|
<junit printsummary="yes"
|
1209
|
haltonfailure="off"
|
1210
|
fork="yes"
|
1211
|
haltonerror="off">
|
1212
|
<classpath>
|
1213
|
<path refid="compile.classpath"/>
|
1214
|
<fileset dir="${build.dir}">
|
1215
|
<include name="${name}.jar"/>
|
1216
|
<include name="${name}-client.jar"/>
|
1217
|
<include name="harvester.jar"/>
|
1218
|
<include name="${name}-junittests.jar"/>
|
1219
|
</fileset>
|
1220
|
</classpath>
|
1221
|
<formatter type="plain" />
|
1222
|
<batchtest fork="yes" todir="${build.dir}">
|
1223
|
<fileset dir="${build.tests}">
|
1224
|
<include name="**/harvesterClient/*.class" />
|
1225
|
</fileset>
|
1226
|
</batchtest>
|
1227
|
</junit>
|
1228
|
</target>
|
1229
|
|
1230
|
<target name="gethttpclient" depends="prepare"
|
1231
|
description="checks out and compiles morpho httpclient code">
|
1232
|
<!--mkdir dir="${morphosourcedir}" -->
|
1233
|
<cvs cvsRoot="${cvsroot}"
|
1234
|
package="morpho"
|
1235
|
dest="." />
|
1236
|
<ant dir="${morphosourcedir}" inheritAll="false" target="jar" />
|
1237
|
</target>
|
1238
|
|
1239
|
<!-- run this target, we need to check out a another morpho souce dir was checked out. -->
|
1240
|
<target name="nettest" depends="install"
|
1241
|
description="compiles and runs the metacatnettest code">
|
1242
|
|
1243
|
<echo>***********************************
|
1244
|
Please run ant gethttpclient first!
|
1245
|
***********************************
|
1246
|
</echo>
|
1247
|
<!-- copy and compile the tests into a jar file -->
|
1248
|
<mkdir dir="${build.metacatnettest}"/>
|
1249
|
<javac srcdir="${junitnettestsdir}"
|
1250
|
destdir="${build.metacatnettest}"
|
1251
|
includes="**/*.java">
|
1252
|
<classpath>
|
1253
|
<path refid="compile.classpath"/>
|
1254
|
<fileset dir="${build.dir}">
|
1255
|
<include name="${name}.jar"/>
|
1256
|
</fileset>
|
1257
|
</classpath>
|
1258
|
</javac>
|
1259
|
|
1260
|
<jar jarfile="${build.dir}/${name}-junitnettests.jar"
|
1261
|
basedir="${build.metacatnettest}"
|
1262
|
includes="**/*.class" />
|
1263
|
|
1264
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
1265
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
1266
|
haltonerror="no">
|
1267
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
|
1268
|
<classpath>
|
1269
|
<path refid="compile.classpath"/>
|
1270
|
<fileset dir="${build.dir}">
|
1271
|
<include name="${name}.jar"/>
|
1272
|
<include name="${name}-junitnettests.jar"/>
|
1273
|
</fileset>
|
1274
|
</classpath>
|
1275
|
|
1276
|
<formatter type="plain" />
|
1277
|
|
1278
|
<batchtest fork="yes" todir="${build.dir}">
|
1279
|
<fileset dir="${build.metacatnettest}">
|
1280
|
<include name="**/*.class" />
|
1281
|
</fileset>
|
1282
|
</batchtest>
|
1283
|
</junit>
|
1284
|
</target>
|
1285
|
|
1286
|
<target name="cleanweb" depends="clean"
|
1287
|
description="deletes tomcat web context dir and all its contents">
|
1288
|
<delete dir="${installdir}" />
|
1289
|
</target>
|
1290
|
|
1291
|
|
1292
|
<target name="clean" depends="init"
|
1293
|
description="deletes build dir and files that can be regenerated form the release">
|
1294
|
<delete dir="${build.dir}" />
|
1295
|
<delete dir="${dist.dir}" />
|
1296
|
</target>
|
1297
|
|
1298
|
<target name="fullclean" depends="clean"
|
1299
|
description="deletes even jars that depend on external sources such as stylesheets and jars">
|
1300
|
<delete file="lib/httpclient.jar" />
|
1301
|
<delete file="lib/utilities.jar" />
|
1302
|
<delete includeEmptyDirs="true" failonerror="false">
|
1303
|
<fileset dir="${style-common-cvsrelpath}">
|
1304
|
<include name="${eml-css}" />
|
1305
|
<include name="eml-*/*.xsl" />
|
1306
|
<include name="eml-*" />
|
1307
|
</fileset>
|
1308
|
</delete>
|
1309
|
</target>
|
1310
|
|
1311
|
<target name="jdoc" depends="prepare"
|
1312
|
description="generates javadoc documentation">
|
1313
|
<javadoc packagenames="edu.ucsb.nceas.*"
|
1314
|
sourcepath="${build.src}"
|
1315
|
destdir="${build.javadocs}"
|
1316
|
author="true"
|
1317
|
version="true"
|
1318
|
use="true"
|
1319
|
windowtitle="${Name} API"
|
1320
|
doctitle="<h1>${Name}</h1>"
|
1321
|
bottom="<i>Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>">
|
1322
|
<classpath>
|
1323
|
<path refid="compile.classpath"/>
|
1324
|
</classpath>
|
1325
|
</javadoc>
|
1326
|
</target>
|
1327
|
|
1328
|
<target name="dist"
|
1329
|
depends="geteml,get-ecogrid,jar,protocol,jdoc,getConversionXSL,getutilities"
|
1330
|
description="prepares a full release distribution">
|
1331
|
<mkdir dir="${dist.dir}"/>
|
1332
|
<delete dir="${ver.dir}" />
|
1333
|
<mkdir dir="${ver.dir}"/>
|
1334
|
<copy todir="${ver.dir}">
|
1335
|
<fileset dir="."
|
1336
|
excludes="**/CVS* **/.#* src/** test/** build/** docs/** ${dist.dir}/** ${dist.dir.hle}/**"/>
|
1337
|
</copy>
|
1338
|
<copy todir="${ver.dir}" file="build.xml"/>
|
1339
|
<copy todir="${ver.dir}" file="build.properties"/>
|
1340
|
|
1341
|
<copy todir="${ver.dir}/docs" filtering="yes">
|
1342
|
<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
|
1343
|
</copy>
|
1344
|
<copy todir="${ver.dir}/docs" filtering="no">
|
1345
|
<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
|
1346
|
</copy>
|
1347
|
<copy todir="${ver.dir}/docs/dev">
|
1348
|
<fileset dir="${build.dir}/docs"/>
|
1349
|
</copy>
|
1350
|
<copy todir="${ver.dir}/src">
|
1351
|
<fileset dir="${build.dir}/src"/>
|
1352
|
</copy>
|
1353
|
<!-- copy loaddtdschemal.sql form src dir(which has the server token to ver.dir/src-->
|
1354
|
<copy todir="${ver.dir}/src" file="${srcdir}/loaddtdschema.sql" overwrite="yes" filtering="no"/>
|
1355
|
<copy todir="${ver.dir}/src" file="${srcdir}/upgrade-db-to-1.5.sql" overwrite="yes" filtering="no"/>
|
1356
|
<!--
|
1357
|
<delete dir="./${ver.dir}/${build.dir}"/>
|
1358
|
<delete dir="./${ver.dir}/dist"/>
|
1359
|
-->
|
1360
|
<delete file="./${name}-${release}.zip"/>
|
1361
|
<zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
1362
|
<delete file="./${name}-${release}.tar.gz" />
|
1363
|
<tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
1364
|
<gzip zipfile="./${name}-${release}.tar.gz"
|
1365
|
src="./${name}-${release}.tar"/>
|
1366
|
<delete file="./${name}-${release}.tar" />
|
1367
|
</target>
|
1368
|
|
1369
|
<target name="distsrc" depends="dist"
|
1370
|
description="prepares a source distribution">
|
1371
|
<mkdir dir="${ver.src}"/>
|
1372
|
<copy todir="${ver.src}">
|
1373
|
<fileset dir="./src"/>
|
1374
|
</copy>
|
1375
|
<mkdir dir="${util.dir}"/>
|
1376
|
<copy todir="${util.dir}">
|
1377
|
<fileset dir="${build.tmp}/utilities" excludes="**/CVS*" />
|
1378
|
</copy>
|
1379
|
|
1380
|
<mkdir dir="${ecogrid-dist-dir}"/>
|
1381
|
<copy todir="${ecogrid-dist-dir}">
|
1382
|
<fileset dir="${ecogrid-dir}" excludes="**/CVS*" />
|
1383
|
</copy>
|
1384
|
|
1385
|
<delete file="${ver.dir}/lib/utilities.jar"/>
|
1386
|
|
1387
|
<delete file="./${name}-src-${release}.zip"/>
|
1388
|
<zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
|
1389
|
<delete file="./${name}-src-${release}.tar.gz" />
|
1390
|
<tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
|
1391
|
<gzip zipfile="./${name}-src-${release}.tar.gz"
|
1392
|
src="./${name}-src-${release}.tar"/>
|
1393
|
<delete file="./${name}-src-${release}.tar" />
|
1394
|
<delete dir="${dist.dir}"/>
|
1395
|
</target>
|
1396
|
|
1397
|
<target name="stylesheettest">
|
1398
|
<xslt in="${input}" out="eml.html" style="${style-common-cvsrelpath}/eml-2.0.0/eml-2.0.0.xsl">
|
1399
|
<param name="displaymodule" expression="${displaymodule}"/>
|
1400
|
<param name="docid" expression="${input}"/>
|
1401
|
<param name="entitytype" expression="${entitytype}"/>
|
1402
|
<param name="entityindex" expression="${entityindex}"/>
|
1403
|
<outputproperty name="method" value="html"/>
|
1404
|
<outputproperty name="standalone" value="yes"/>
|
1405
|
<outputproperty name="encoding" value="iso8859_1"/>
|
1406
|
<outputproperty name="indent" value="yes"/>
|
1407
|
</xslt>
|
1408
|
</target>
|
1409
|
|
1410
|
|
1411
|
<target name="compilewebclient" depends="prepare">
|
1412
|
<javac srcdir="${build.src}" destdir="${build.dest}" includes="**/application/*.java" classpathref="webservicepath" />
|
1413
|
</target>
|
1414
|
|
1415
|
<target name="runwebclient" depends="compilewebclient">
|
1416
|
<java classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
|
1417
|
dir="${build.dest}" fork="yes"
|
1418
|
classpathref="webservicepath" classpath="./lib/utilities.jar" failonerror="true">
|
1419
|
<arg value="${serviceUrl}"/>
|
1420
|
<arg value="${docid}"/>
|
1421
|
</java>
|
1422
|
</target>
|
1423
|
|
1424
|
<target name="spatial_option" depends="prepare" description=" -- compiles code for the spatial option">
|
1425
|
|
1426
|
<echo message="Compiling the metatcat shapefile creator"/>
|
1427
|
<echo message="using the shapelib at: ${shapelib.dir}"/>
|
1428
|
<exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
|
1429
|
<arg line="./src/spatial/cpp/metacat_shapefile.cpp -I ${shapelib.dir} -c -o build/metacat_shapefile.o" />
|
1430
|
</exec>
|
1431
|
|
1432
|
<exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
|
1433
|
<arg line="build/metacat_shapefile.o ${shapelib.dir}/.libs/libshp.a -o bin/metacat_shapefile" />
|
1434
|
</exec>
|
1435
|
</target>
|
1436
|
|
1437
|
<!-- LSID Authority support -->
|
1438
|
<patternset id="lsid.jars">
|
1439
|
<include name="axis.jar" />
|
1440
|
<include name="commons-discovery-0.2.jar" />
|
1441
|
<include name="jaxrpc.jar" />
|
1442
|
<include name="lsid-client-1.1.1.jar" />
|
1443
|
<include name="lsid-server-1.1.1.jar" />
|
1444
|
<include name="saaj.jar" />
|
1445
|
<include name="wsdl4j-1.5.1.jar" />
|
1446
|
<include name="activation.jar" />
|
1447
|
<include name="castor-0.9.5.jar" />
|
1448
|
<include name="dnsjava-1.3.2.jar" />
|
1449
|
<include name="mail.jar" />
|
1450
|
<include name="commons-logging-1.0.4.jar" />
|
1451
|
<!-- These jars may be needed but seem to not actually be,
|
1452
|
so leaving them out for now
|
1453
|
<include name="axis-ant.jar" />
|
1454
|
-->
|
1455
|
<!--<include name="GenCastor.class" />-->
|
1456
|
</patternset>
|
1457
|
<patternset id="lib.jars">
|
1458
|
<include name="httpclient.jar" />
|
1459
|
<include name="log4j-1.2.12.jar" />
|
1460
|
<include name="utilities.jar" />
|
1461
|
<include name="xercesImpl.jar" />
|
1462
|
<include name="xalan.jar" />
|
1463
|
<include name="xml-apis.jar" />
|
1464
|
</patternset>
|
1465
|
|
1466
|
<path id="lsid.classpath">
|
1467
|
<fileset dir="${lsid.lib.dir}">
|
1468
|
<patternset refid="lsid.jars"/>
|
1469
|
</fileset>
|
1470
|
<fileset dir="${lib.dir}">
|
1471
|
<patternset refid="lsid.jars"/>
|
1472
|
</fileset>
|
1473
|
<fileset dir="${lib.dir}">
|
1474
|
<include name="xalan.jar" />
|
1475
|
<include name="xml-apis.jar" />
|
1476
|
</fileset>
|
1477
|
<fileset dir="${build.dir}">
|
1478
|
<include name="metacat-client.jar" />
|
1479
|
</fileset>
|
1480
|
</path>
|
1481
|
|
1482
|
<filterset id="configFilters">
|
1483
|
<filter token="LSID_AUTHORITY_HOSTNAME"
|
1484
|
value="${config.hostname}" />
|
1485
|
<filter token="LSID_AUTHORITY_PORT"
|
1486
|
value="${config.port}" />
|
1487
|
<filter token="METADATA_LABELS"
|
1488
|
value="${config.metadataLabelLsid}" />
|
1489
|
<filter token="METACAT_SERVER"
|
1490
|
value="${config.metacatserver}" />
|
1491
|
<filter token="LSID_AUTHORITY_STRING"
|
1492
|
value="${config.lsidauthority}" />
|
1493
|
</filterset>
|
1494
|
|
1495
|
<target name="prepare-lsid"
|
1496
|
depends="prepare,utilities,clientjar"
|
1497
|
description="Configure files prior to compilation">
|
1498
|
<mkdir dir="${lsid.build.dir}" />
|
1499
|
<!-- Copy the properties file into the build -->
|
1500
|
<copy file="${conf.dir}/metacat-lsid.properties"
|
1501
|
tofile="${lsid.build.dir}/WEB-INF/classes/metacat-lsid.properties"
|
1502
|
overwrite="true">
|
1503
|
<filterset refid="configFilters" />
|
1504
|
</copy>
|
1505
|
<copy file="${conf.dir}/log4j.properties"
|
1506
|
tofile="${lsid.build.dir}/WEB-INF/classes/log4j.properties"
|
1507
|
overwrite="true">
|
1508
|
<filterset refid="configFilters" />
|
1509
|
</copy>
|
1510
|
<!-- Copy config files into the build -->
|
1511
|
<copy todir="${lsid.build.dir}/WEB-INF">
|
1512
|
<fileset dir="${webinf.dir}"
|
1513
|
includes="**/*.wsdd" />
|
1514
|
</copy>
|
1515
|
<!-- Copy the metadata configuration files into the build -->
|
1516
|
<mkdir dir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}" />
|
1517
|
<copy todir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}">
|
1518
|
<fileset dir="${conf.dir}"
|
1519
|
includes="**/*.xml" />
|
1520
|
<fileset dir="${conf.dir}"
|
1521
|
includes="**/*.xslt" />
|
1522
|
<filterset refid="configFilters" />
|
1523
|
</copy>
|
1524
|
<!-- Copy services files into the build -->
|
1525
|
<mkdir dir="${lsid.build.dir}/services" />
|
1526
|
<copy todir="${lsid.build.dir}/services">
|
1527
|
<fileset dir="${services.dir}" />
|
1528
|
<filterset refid="configFilters" />
|
1529
|
</copy>
|
1530
|
<!-- Copy axis files into the build -->
|
1531
|
<mkdir dir="${lsid.build.dir}" />
|
1532
|
<copy todir="${lsid.build.dir}">
|
1533
|
<fileset dir="${conf.dir}/axis"
|
1534
|
excludes="*.properties"/>
|
1535
|
</copy>
|
1536
|
<mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
|
1537
|
<copy todir="${lsid.build.dir}/WEB-INF/classes">
|
1538
|
<fileset dir="${conf.dir}/axis"
|
1539
|
includes="*.properties"/>
|
1540
|
</copy>
|
1541
|
</target>
|
1542
|
|
1543
|
<target name="compile-lsid"
|
1544
|
depends="prepare-lsid"
|
1545
|
description="Compile Java sources">
|
1546
|
<mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
|
1547
|
<javac srcdir="src/edu/ucsb/nceas/metacat/lsid"
|
1548
|
destdir="${lsid.build.dir}/WEB-INF/classes"
|
1549
|
debug="${compile.debug}"
|
1550
|
deprecation="${compile.deprecation}"
|
1551
|
optimize="${compile.optimize}">
|
1552
|
<classpath refid="lsid.classpath" />
|
1553
|
</javac>
|
1554
|
</target>
|
1555
|
|
1556
|
<target name="war-lsid"
|
1557
|
depends="compile-lsid"
|
1558
|
description="Create a war file for the application">
|
1559
|
<mkdir dir="${dist.dir}" />
|
1560
|
<war destfile="${dist.dir}/${authority.context}.war"
|
1561
|
webxml="${webinf.dir}/web.xml">
|
1562
|
<fileset dir="${lsid.build.dir}" />
|
1563
|
<lib dir="${lsid.lib.dir}">
|
1564
|
<patternset refid="lsid.jars"/>
|
1565
|
</lib>
|
1566
|
<lib dir="${lib.dir}">
|
1567
|
<patternset refid="lib.jars"/>
|
1568
|
</lib>
|
1569
|
<lib dir="${lib.dir}">
|
1570
|
<include name="xalan.jar" />
|
1571
|
<include name="xml-apis.jar" />
|
1572
|
</lib>
|
1573
|
<lib dir="${build.dir}">
|
1574
|
<include name="metacat-client.jar" />
|
1575
|
</lib>
|
1576
|
</war>
|
1577
|
</target>
|
1578
|
|
1579
|
<target name="deploy-lsid"
|
1580
|
depends="war-lsid"
|
1581
|
description="Deploy LSID war to servlet container">
|
1582
|
<delete dir="${deploy.dir}/${authority.context}" />
|
1583
|
<delete file="${deploy.dir}/${authority.context}.war" />
|
1584
|
<mkdir dir="${deploy.dir}" />
|
1585
|
<copy todir="${deploy.dir}">
|
1586
|
<fileset dir="${dist.dir}" />
|
1587
|
</copy>
|
1588
|
</target>
|
1589
|
</project>
|