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 |
2277
|
jones
|
<property environment="env"/>
|
34 |
1929
|
brooke
|
<property file="build.properties"/> <!-- USER SPECIFIC PROPS -->
|
35 |
2957
|
tao
|
|
36 |
4098
|
daigle
|
|
37 |
|
|
|
38 |
2957
|
tao
|
<!-- Determine if installed ecogrid -->
|
39 |
|
|
<condition property="enable.ecogrid">
|
40 |
|
|
<equals arg1="${install.ecogrid}" arg2="true" />
|
41 |
|
|
</condition>
|
42 |
3034
|
perry
|
|
43 |
4098
|
daigle
|
<target name="config">
|
44 |
|
|
<property name="jsdk" value="${build.tomcat.dir}/common/lib/servlet-api.jar"/>
|
45 |
1814
|
tao
|
<!-- usr for client testing, generally you don't need change-->
|
46 |
4098
|
daigle
|
<property name="mcuser" value="uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org"/>
|
47 |
|
|
<property name="mcpassword" value="kepler"/>
|
48 |
|
|
<property name="mcanotheruser" value="uid=tao,o=NCEAS,dc=ecoinformatics,dc=org"/>
|
49 |
|
|
<property name="mcanotherpassword" value="yourpass"/>
|
50 |
|
|
<property name="piscouser" value="uid=tao,o=PISCO,dc=ecoinformatics,dc=org"/>
|
51 |
|
|
<property name="piscopassword" value="yourpass"/>
|
52 |
|
|
<property name="lteruser" value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org"/>
|
53 |
|
|
<property name="lterpassword" value="yourpass"/>
|
54 |
1801
|
tao
|
|
55 |
4098
|
daigle
|
<property name="debug" value="on" />
|
56 |
4179
|
daigle
|
<!-- MCD BYE in metacat.properties property name="debuglevel" value="55" / -->
|
57 |
1716
|
berkley
|
|
58 |
4098
|
daigle
|
<property name="morphosourcedir" value="../morpho" />
|
59 |
4179
|
daigle
|
<!-- MCD BYE in metacat.properties property name="defaultcontenttype" value="application/octet-stream" / -->
|
60 |
4098
|
daigle
|
<property name="utilitiesdir" value="../utilities" />
|
61 |
4236
|
leinfelder
|
<property name="installdir" value="${dev.deploy.dir}/${metacat.context}" />
|
62 |
2175
|
tao
|
|
63 |
1941
|
brooke
|
<echo>*********** set jsdk to ${jsdk}</echo>
|
64 |
1103
|
tao
|
</target>
|
65 |
|
|
|
66 |
931
|
jones
|
<target name="init" depends="config">
|
67 |
2631
|
tao
|
<path id="compile.classpath">
|
68 |
|
|
<pathelement location="${jsdk}"/>
|
69 |
4080
|
daigle
|
<pathelement location="lib"/>
|
70 |
2631
|
tao
|
<fileset dir="lib">
|
71 |
|
|
<include name="*.jar"/>
|
72 |
|
|
</fileset>
|
73 |
4121
|
daigle
|
<fileset dir="lib">
|
74 |
3059
|
berkley
|
<include name="xalan.jar"/>
|
75 |
3030
|
sgarg
|
</fileset>
|
76 |
2631
|
tao
|
<fileset dir="lib/lsid_lib">
|
77 |
|
|
<include name="*.jar"/>
|
78 |
4098
|
daigle
|
</fileset>
|
79 |
3034
|
perry
|
|
80 |
|
|
<!-- Include geoserver, geotools, et. al. -->
|
81 |
|
|
<fileset dir="lib/spatial/geoserver/WEB-INF/lib">
|
82 |
|
|
<include name="*.jar"/>
|
83 |
2631
|
tao
|
</fileset>
|
84 |
3034
|
perry
|
<pathelement location="lib/spatial/geoserver/WEB-INF/classes"/>
|
85 |
|
|
|
86 |
4121
|
daigle
|
</path>
|
87 |
2631
|
tao
|
|
88 |
931
|
jones
|
<!-- It is less likely you'll need to make any changes from here down,
|
89 |
|
|
but customization is possible -->
|
90 |
1929
|
brooke
|
<property name="name" value="metacat"/>
|
91 |
|
|
<property name="Name" value="MetaCat"/>
|
92 |
|
|
<property name="debugprefix" value="${Name}:"/>
|
93 |
4080
|
daigle
|
<property name="release" value="${metacat.version}"/>
|
94 |
3095
|
cjones
|
<property name="style-common-relpath" value="/style/common"/>
|
95 |
|
|
<property name="style-shared-relpath" value="/style/shared"/>
|
96 |
4098
|
daigle
|
<property name="schema-relpath" value="/schema"/>
|
97 |
3095
|
cjones
|
<property name="style-common-cvsrelpath" value="lib${style-common-relpath}"/>
|
98 |
4098
|
daigle
|
<property name="schema-cvsrelpath" value="lib${schema-relpath}"/>
|
99 |
1929
|
brooke
|
<property name="style-skins-relpath" value="/style/skins"/>
|
100 |
2461
|
sgarg
|
<property name="util-module" value="utilities" />
|
101 |
1929
|
brooke
|
<property name="eml-module" value="eml" />
|
102 |
|
|
<property name="eml-version" value="2.0.0beta6" />
|
103 |
|
|
<property name="eml-tag" value="EML_2_0_0_BETA_6_FOR_METACAT" />
|
104 |
2232
|
sgarg
|
<property name="eml2_0_0-tag" value="RELEASE_EML_2_0_0_UPDATE_1" />
|
105 |
3994
|
berkley
|
<property name="eml2_0_1-schema-tag" value="RELEASE_EML_2_0_1" />
|
106 |
3807
|
tao
|
<property name="eml2_0_1-style-tag" value="RELEASE_EML_2_0_1_UPDATE_6" />
|
107 |
4328
|
daigle
|
<!-- property name="eml2_1_0-schema-tag" value="RELEASE_EML_2_1_0_RC_3" / -->
|
108 |
|
|
<!-- property name="eml2_1_0-style-tag" value="RELEASE_EML_2_1_0_RC_3" / -->
|
109 |
|
|
<property name="eml2_1_0-schema-tag" value="" />
|
110 |
|
|
<property name="eml2_1_0-style-tag" value="" />
|
111 |
2228
|
sgarg
|
<property name="eml2_0_0namespace" value="eml://ecoinformatics.org/eml-2.0.0" />
|
112 |
|
|
<property name="eml2_0_1namespace" value="eml://ecoinformatics.org/eml-2.0.1" />
|
113 |
|
|
<property name="eml2_1_0namespace" value="eml://ecoinformatics.org/eml-2.1.0" />
|
114 |
1929
|
brooke
|
<property name="stmmlnamespace" value="http://www.xml-cml.org/schema/stmml" />
|
115 |
1933
|
brooke
|
<property name="eml-css" value="eml_xsl.css"/>
|
116 |
|
|
<property name="eml-module.default.css"
|
117 |
|
|
value="default.css"/>
|
118 |
2965
|
tao
|
|
119 |
1929
|
brooke
|
<!-- Config for registry variables -->
|
120 |
4080
|
daigle
|
<!-- TODO: SCW remove these, covered in metacat.properties or in skin.properties -->
|
121 |
1933
|
brooke
|
<property name="scope" value="obfs"/>
|
122 |
|
|
<property name="responseForm" value="genericResponse.tmpl"/>
|
123 |
|
|
<property name="entryForm" value="entryForm.tmpl"/>
|
124 |
|
|
<property name="guide" value="genericGuide.tmpl"/>
|
125 |
2781
|
sgarg
|
<property name="loginForm" value="loginForm.tmpl"/>
|
126 |
2343
|
sgarg
|
<property name="confirmData" value="confirmData.tmpl"/>
|
127 |
|
|
<property name="deleteData" value="deleteData.tmpl"/>
|
128 |
|
|
<property name="genericHeader" value="genericHeader.tmpl"/>
|
129 |
|
|
<property name="genericFooter" value="genericFooter.tmpl"/>
|
130 |
1929
|
brooke
|
|
131 |
2343
|
sgarg
|
<filter token="scope" value="${scope}"/>
|
132 |
|
|
<filter token="responseForm" value="${responseForm}"/>
|
133 |
|
|
<filter token="entryForm" value="${entryForm}"/>
|
134 |
|
|
<filter token="guide" value="${guide}"/>
|
135 |
2781
|
sgarg
|
<filter token="loginForm" value="${loginForm}"/>
|
136 |
2343
|
sgarg
|
<filter token="confirmData" value="${confirmData}"/>
|
137 |
|
|
<filter token="deleteData" value="${deleteData}"/>
|
138 |
|
|
<filter token="genericHeader" value="${genericHeader}"/>
|
139 |
|
|
<filter token="genericFooter" value="${genericFooter}"/>
|
140 |
|
|
<filter token="adminname" value="${adminname}"/>
|
141 |
|
|
<filter token="recipient" value="${recipient}"/>
|
142 |
4080
|
daigle
|
<filter token="metacatVersion" value="${metacat.version}"/>
|
143 |
2343
|
sgarg
|
|
144 |
4098
|
daigle
|
<filter token="docrooturl" value="./" />
|
145 |
|
|
<filter token="mcuser" value="${mcuser}"/>
|
146 |
|
|
<filter token="mcpassword" value="${mcpassword}"/>
|
147 |
|
|
<filter token="mcanotheruser" value="${mcanotheruser}"/>
|
148 |
|
|
<filter token="mcanotherpassword" value="${mcanotherpassword}"/>
|
149 |
|
|
<filter token="eml-css" value="${eml-css}"/>
|
150 |
|
|
<filter token="style-skins-relpath" value="${style-skins-relpath}"/>
|
151 |
1929
|
brooke
|
<filter token="style-common-relpath" value="${style-common-relpath}"/>
|
152 |
2343
|
sgarg
|
|
153 |
4098
|
daigle
|
<filter token="eml-version" value="${eml-version}"/>
|
154 |
|
|
<filter token="eml2_0_0namespace" value="${eml2_0_0namespace}"/>
|
155 |
|
|
<filter token="eml2_0_1namespace" value="${eml2_0_1namespace}"/>
|
156 |
|
|
<filter token="eml2_1_0namespace" value="${eml2_1_0namespace}"/>
|
157 |
|
|
<filter token="stmmlnamespace" value="${stmmlnamespace}"/>
|
158 |
4179
|
daigle
|
<!-- MCD BYE filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" / -->
|
159 |
|
|
<!-- MCD BYE filter filter token="debuglevel" value="${debuglevel}" / -->
|
160 |
|
|
<!-- MCD BYE filter token="defaultcontenttype" value="${defaultcontenttype}" / -->
|
161 |
4098
|
daigle
|
<filter token="debugprefix" value="${debugprefix}"/>
|
162 |
|
|
<filter token="indexPaths" value="${indexPaths}"/>
|
163 |
1487
|
tao
|
|
164 |
4098
|
daigle
|
<filter token="defaultStage" value="${defaultStage}"/>
|
165 |
|
|
<filter token="defaultHeader" value="${defaultHeader}"/>
|
166 |
|
|
<filter token="defaultFooter" value="${defaultFooter}"/>
|
167 |
|
|
<filter token="defaultChangePass" value="${defaultChangePass}"/>
|
168 |
|
|
<filter token="defaultResetPass" value="${defaultResetPass}"/>
|
169 |
|
|
<filter token="changePassSuccess" value="${changePassSuccess}"/>
|
170 |
|
|
<filter token="resetPassSuccess" value="${resetPassSuccess}"/>
|
171 |
|
|
<filter token="registerFailed" value="${registerFailed}"/>
|
172 |
|
|
<filter token="registerLter" value="${registerLter}"/>
|
173 |
|
|
<filter token="registerMatch" value="${registerMatch}"/>
|
174 |
|
|
<filter token="registerSuccess" value="${registerSuccess}"/>
|
175 |
|
|
<filter token="register" value="${register}"/>
|
176 |
|
|
<filter token="searchResults" value="${searchResults}"/>
|
177 |
3174
|
tao
|
<filter token="ldapMainServerFailure" value="${ldapMainServerFailure}"/>
|
178 |
4098
|
daigle
|
<filter token="lter-user" value="${lteruser}"/>
|
179 |
|
|
<filter token="lter-pass" value="${lterpassword}"/>
|
180 |
|
|
<filter token="pisco-user" value="${piscouser}"/>
|
181 |
|
|
<filter token="pisco-pass" value="${piscopassword}"/>
|
182 |
3575
|
tao
|
|
183 |
2549
|
tao
|
|
184 |
4179
|
daigle
|
<!-- MCD BYE filter token="timedreplication" value="${timedreplication}" / -->
|
185 |
|
|
<!-- MCD BYE filter token="firsttimedreplication" value="${firsttimedreplication}" / -->
|
186 |
|
|
<!-- MCD BYE filter token="timedreplicationinterval" value="${timedreplicationinterval}" / -->
|
187 |
2549
|
tao
|
|
188 |
4098
|
daigle
|
<property name="srcdir" value="./src" />
|
189 |
|
|
<property name="lib.dir" value="./lib" />
|
190 |
|
|
<property name="docdir" value="./docs" />
|
191 |
4240
|
daigle
|
<property name="cgidir" value="./cgi-bin" />
|
192 |
4098
|
daigle
|
<property name="testdir" value="./test" />
|
193 |
|
|
<property name="testtorun" value="BuildIndexTest" />
|
194 |
|
|
<property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
|
195 |
|
|
<property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
|
196 |
|
|
<property name="build.dir" value="./build"/>
|
197 |
|
|
<property name="build.src" value="${build.dir}/src"/>
|
198 |
|
|
<property name="build.dest" value="${build.dir}/classes"/>
|
199 |
|
|
<property name="build.samples" value="${build.dir}/samples"/>
|
200 |
|
|
<property name="build.tests" value="${build.dir}/tests"/>
|
201 |
|
|
<property name="build.tmp" value="${build.dir}/tmp"/>
|
202 |
|
|
<property name="build.metacattest" value="${build.tests}/metacattest"/>
|
203 |
1116
|
tao
|
<property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
|
204 |
4098
|
daigle
|
<property name="build.data" value="${build.dir}/data"/>
|
205 |
|
|
<property name="build.javadocs" value="${build.dir}/docs/api"/>
|
206 |
|
|
<property name="build.war" value="${build.dir}/war"/>
|
207 |
|
|
<property name="dist.dir" value="dist"/>
|
208 |
|
|
<property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
|
209 |
|
|
<property name="ver.src" value="${ver.dir}/src"/>
|
210 |
|
|
<property name="util.dir" value="${dist.dir}/${util-module}"/>
|
211 |
2401
|
costa
|
<!-- directories for creating a Harvest List Editor distribution -->
|
212 |
4098
|
daigle
|
<property name="dist.dir.hle" value="disthle"/>
|
213 |
|
|
<property name="ver.dir.hle" value="${dist.dir.hle}/harvest-list-editor-${release}"/>
|
214 |
|
|
|
215 |
2965
|
tao
|
<property name="ecogrid-target-name" value="metacatImpl"/>
|
216 |
|
|
<property name="ecogrid-module-dest-dir" value =".."/>
|
217 |
4098
|
daigle
|
<property name="ecogrid-module" value="seek/projects/ecogrid"/>
|
218 |
|
|
<property name="ecogrid-dist-dir" value="${dist.dir}/${ecogrid-module}"/>
|
219 |
|
|
<property name="ecogrid-dir" value="${ecogrid-module-dest-dir}/${ecogrid-module}"/>
|
220 |
806
|
jones
|
|
221 |
4098
|
daigle
|
<property name="package.home" value="edu/ucsb/nceas/metacat" />
|
222 |
2317
|
jones
|
<condition property="utilities.required">
|
223 |
|
|
<or>
|
224 |
|
|
<not><available file="lib/httpclient.jar"/></not>
|
225 |
|
|
<not><available file="lib/utilities.jar"/></not>
|
226 |
|
|
</or>
|
227 |
|
|
</condition>
|
228 |
2318
|
jones
|
<condition property="eml.required">
|
229 |
|
|
<or>
|
230 |
|
|
<not><available file="lib/schema/eml-2.0.1/eml.xsd"/></not>
|
231 |
|
|
<not><available file="lib/schema/eml-2.0.0/eml.xsd"/></not>
|
232 |
4328
|
daigle
|
<not><available file="lib/schema/eml-2.1.0/eml.xsd"/></not>
|
233 |
2318
|
jones
|
<not><available file="lib/dtd/eml-dataset-2.0.0beta6.dtd"/></not>
|
234 |
|
|
</or>
|
235 |
|
|
</condition>
|
236 |
2965
|
tao
|
|
237 |
|
|
<condition property="ecogrid.required">
|
238 |
|
|
<or>
|
239 |
|
|
<not><available file="${ecogrid-dir}/build.properties"/></not>
|
240 |
|
|
<not><available file="${ecogrid-dir}/buildfiles/metacatImpl.xml"/></not>
|
241 |
|
|
</or>
|
242 |
|
|
</condition>
|
243 |
2599
|
jones
|
|
244 |
113
|
jones
|
</target>
|
245 |
1311
|
berkley
|
|
246 |
348
|
jones
|
<target name="prepare" depends="init">
|
247 |
|
|
<mkdir dir="${build.dir}"/>
|
248 |
|
|
<mkdir dir="${build.src}"/>
|
249 |
|
|
<mkdir dir="${build.dest}"/>
|
250 |
516
|
jones
|
<mkdir dir="${build.javadocs}"/>
|
251 |
1778
|
tao
|
<mkdir dir="${build.tmp}"/>
|
252 |
348
|
jones
|
|
253 |
822
|
jones
|
<copy todir="${build.src}" filtering="yes">
|
254 |
|
|
<fileset dir="${srcdir}">
|
255 |
|
|
<include name="edu/**"/>
|
256 |
|
|
<include name="com/**"/>
|
257 |
3194
|
berkley
|
<include name="org/**"/>
|
258 |
877
|
jones
|
<include name="**/*.sql"/>
|
259 |
822
|
jones
|
<exclude name="**/CVS*"/>
|
260 |
|
|
<exclude name="**/.#*"/>
|
261 |
|
|
</fileset>
|
262 |
|
|
</copy>
|
263 |
2344
|
sgarg
|
<available file="lib/style/common/emlb6toeml2" type="dir"
|
264 |
1954
|
jones
|
property="styles.not.needed"/>
|
265 |
348
|
jones
|
</target>
|
266 |
|
|
|
267 |
1939
|
brooke
|
<target name="compile" depends="prepare,utilities"
|
268 |
1986
|
jones
|
description="Compiles java code to build dir, and copies metacat props files there">
|
269 |
1939
|
brooke
|
|
270 |
1311
|
berkley
|
<javac srcdir="${build.src}"
|
271 |
|
|
destdir="${build.dest}"
|
272 |
1827
|
jones
|
debug="${debug}"
|
273 |
3994
|
berkley
|
excludes="**/*.sql **/stringclient/** **/client/*.java **/harvesterClient/*.java">
|
274 |
2599
|
jones
|
<classpath>
|
275 |
|
|
<path refid="compile.classpath"/>
|
276 |
|
|
</classpath>
|
277 |
|
|
</javac>
|
278 |
1311
|
berkley
|
</target>
|
279 |
113
|
jones
|
|
280 |
2322
|
jones
|
<target name="jar" depends="compile,geteml"
|
281 |
1939
|
brooke
|
description="Compiles and jars metacat java code to metacat.jar in build dir">
|
282 |
|
|
|
283 |
353
|
jones
|
<delete file="${build.dir}/${name}.jar" />
|
284 |
635
|
jones
|
<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
|
285 |
2135
|
costa
|
excludes="**/protocols/ **/harvesterClient/" />
|
286 |
1311
|
berkley
|
</target>
|
287 |
|
|
|
288 |
1939
|
brooke
|
<target name="protocol" depends="compile"
|
289 |
|
|
description="Compiles and jars protocol java code to protocol.jar in build dir">
|
290 |
635
|
jones
|
<delete file="${build.dir}/protocol.jar" />
|
291 |
|
|
<jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
|
292 |
|
|
includes="**/protocols/" />
|
293 |
1311
|
berkley
|
</target>
|
294 |
113
|
jones
|
|
295 |
2317
|
jones
|
<target name="utilities" depends="config" if="utilities.required">
|
296 |
1796
|
jones
|
<ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
|
297 |
|
|
<ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
|
298 |
1780
|
jones
|
<copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
|
299 |
|
|
<copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
|
300 |
|
|
</target>
|
301 |
|
|
|
302 |
2461
|
sgarg
|
<target name="getutilities" depends="prepare"
|
303 |
|
|
description="Checks utility out of cvs and copies it to your metacat cvs sandbox">
|
304 |
|
|
<echo>Enter CVS password: </echo>
|
305 |
|
|
<cvs cvsRoot="${cvsroot}"
|
306 |
2468
|
sgarg
|
package="${util-module}"
|
307 |
2461
|
sgarg
|
dest="${build.tmp}" />
|
308 |
|
|
</target>
|
309 |
|
|
|
310 |
1939
|
brooke
|
<target name="client" depends="utilities, prepare"
|
311 |
|
|
description="Compiles metacat-client java code to build dir">
|
312 |
1780
|
jones
|
<javac srcdir="${build.src}"
|
313 |
|
|
destdir="${build.dest}"
|
314 |
2599
|
jones
|
includes="edu/ucsb/nceas/metacat/client/*">
|
315 |
|
|
<classpath>
|
316 |
|
|
<path refid="compile.classpath"/>
|
317 |
|
|
</classpath>
|
318 |
|
|
</javac>
|
319 |
1780
|
jones
|
</target>
|
320 |
|
|
|
321 |
1939
|
brooke
|
<target name="clientjar" depends="client"
|
322 |
|
|
description="Compiles and jars metacat-client java code to metacat-client.jar in build dir">
|
323 |
1780
|
jones
|
<delete file="${build.dir}/${name}-client.jar" />
|
324 |
|
|
<jar jarfile="${build.dir}/${name}-client.jar" basedir="${build.dest}"
|
325 |
|
|
includes="**/metacat/client/" />
|
326 |
|
|
</target>
|
327 |
|
|
|
328 |
2748
|
costa
|
<target name="advancedsearchjar" depends="compile"
|
329 |
|
|
description="Compiles and jars advanced search Java code to advancedsearch.jar in build dir">
|
330 |
|
|
<delete file="${build.dir}/advancedsearch.jar" />
|
331 |
|
|
<jar jarfile="${build.dir}/advancedsearch.jar" basedir="${build.dest}"
|
332 |
|
|
includes="**/metacat/advancedsearch/" />
|
333 |
|
|
</target>
|
334 |
|
|
|
335 |
2059
|
costa
|
<target name="harvester" depends="client"
|
336 |
1950
|
costa
|
description="Compiles harvester java code to build dir">
|
337 |
|
|
<javac srcdir="${build.src}"
|
338 |
|
|
destdir="${build.dest}"
|
339 |
2599
|
jones
|
includes="edu/ucsb/nceas/metacat/harvesterClient/*">
|
340 |
|
|
<classpath>
|
341 |
|
|
<path refid="compile.classpath"/>
|
342 |
|
|
</classpath>
|
343 |
|
|
</javac>
|
344 |
1950
|
costa
|
</target>
|
345 |
|
|
|
346 |
|
|
<target name="harvesterjar" depends="harvester"
|
347 |
2059
|
costa
|
description="Compiles and jars harvester java code to harvester.jar in build dir">
|
348 |
|
|
<delete file="${build.dir}/harvester.jar" />
|
349 |
|
|
<jar jarfile="${build.dir}/harvester.jar" basedir="${build.dest}"
|
350 |
1950
|
costa
|
includes="**/metacat/harvesterClient/" />
|
351 |
|
|
</target>
|
352 |
|
|
|
353 |
2369
|
costa
|
<target name="harvestListEditorDist" depends="harvesterjar"
|
354 |
|
|
description="Prepares a distribution of the Harvest List Editor tool">
|
355 |
2401
|
costa
|
<mkdir dir="${dist.dir.hle}"/>
|
356 |
|
|
<delete dir="${ver.dir.hle}" />
|
357 |
|
|
<mkdir dir="${ver.dir.hle}"/>
|
358 |
|
|
<copy todir="${ver.dir.hle}" file="${build.dir}/harvester.jar"/>
|
359 |
|
|
<copy todir="${ver.dir.hle}" file="lib/xercesImpl.jar"/>
|
360 |
|
|
<copy todir="${ver.dir.hle}" file="lib/harvester/harvestList.xsd"/>
|
361 |
|
|
<copy todir="${ver.dir.hle}" file="lib/harvester/harvestListEditor.bat"/>
|
362 |
|
|
<copy todir="${ver.dir.hle}" file="lib/harvester/harvestListEditor.sh"/>
|
363 |
|
|
<delete file="./harvest-list-editor-${release}.zip"/>
|
364 |
|
|
<zip zipfile="./harvest-list-editor-${release}.zip" basedir="${ver.dir.hle}" />
|
365 |
|
|
<delete file="./harvest-list-editor-${release}.tar.gz" />
|
366 |
|
|
<tar tarfile="./harvest-list-editor-${release}.tar" basedir="${ver.dir.hle}" />
|
367 |
|
|
<gzip zipfile="./harvest-list-editor-${release}.tar.gz"
|
368 |
|
|
src="./harvest-list-editor-${release}.tar"/>
|
369 |
|
|
<delete file="./harvest-list-editor-${release}.tar" />
|
370 |
2369
|
costa
|
</target>
|
371 |
|
|
|
372 |
4240
|
daigle
|
<target name="geteml" depends="getemlpre2,geteml2+,getConversionXSL" if="eml.required"
|
373 |
1939
|
brooke
|
description="Calls getemlpre2 and geteml2+ targets" />
|
374 |
|
|
|
375 |
2318
|
jones
|
<target name="getemlpre2" depends="prepare" if="eml.required"
|
376 |
1939
|
brooke
|
description="Checks EML-beta6 out of cvs and copies dtds and xsl to your metacat cvs sandbox">
|
377 |
1612
|
tao
|
<echo>Enter CVS password: </echo>
|
378 |
|
|
<cvs cvsRoot="${cvsroot}"
|
379 |
|
|
package="${eml-module}"
|
380 |
|
|
tag="${eml-tag}"
|
381 |
1939
|
brooke
|
dest="${build.tmp}/eml_${eml-tag}" />
|
382 |
1612
|
tao
|
<mkdir dir="lib/dtd" />
|
383 |
|
|
<copy todir="lib/dtd" filtering="yes">
|
384 |
1939
|
brooke
|
<fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}">
|
385 |
1612
|
tao
|
<include name="*.dtd"/>
|
386 |
|
|
</fileset>
|
387 |
|
|
<mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
|
388 |
|
|
</copy>
|
389 |
2228
|
sgarg
|
|
390 |
|
|
<copy todir="${style-common-cvsrelpath}" filtering="yes">
|
391 |
|
|
<fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}/style">
|
392 |
|
|
<include name="**/*.xsl"/>
|
393 |
|
|
</fileset>
|
394 |
|
|
</copy>
|
395 |
1939
|
brooke
|
</target>
|
396 |
|
|
|
397 |
2318
|
jones
|
<target name="geteml2+" depends="prepare" if="eml.required"
|
398 |
1939
|
brooke
|
description="Checks eml-2 out of cvs and copies schema and xsl to your metacat cvs sandbox">
|
399 |
|
|
<echo>Enter CVS password: </echo>
|
400 |
1612
|
tao
|
<cvs cvsRoot="${cvsroot}"
|
401 |
|
|
package="${eml-module}"
|
402 |
2228
|
sgarg
|
tag="${eml2_0_0-tag}"
|
403 |
|
|
dest="${build.tmp}/eml_${eml2_0_0-tag}" />
|
404 |
|
|
<mkdir dir="lib/schema/eml-2.0.0" />
|
405 |
|
|
<copy todir="lib/schema/eml-2.0.0" filtering="yes">
|
406 |
|
|
<fileset dir="${build.tmp}/eml_${eml2_0_0-tag}/${eml-module}">
|
407 |
1612
|
tao
|
<include name="*.xsd"/>
|
408 |
|
|
</fileset>
|
409 |
2175
|
tao
|
|
410 |
1939
|
brooke
|
<!-- shouldn't we have a mapper here like this??
|
411 |
|
|
<mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" />
|
412 |
2175
|
tao
|
|
413 |
|
|
Jing's code didn't nave one - does it need to be added?
|
414 |
1939
|
brooke
|
NOTE that eml-version is set to beta 6, so this would need changing -->
|
415 |
2175
|
tao
|
|
416 |
1612
|
tao
|
</copy>
|
417 |
3018
|
sgarg
|
<!-- <antcall target="copyxsl">
|
418 |
2228
|
sgarg
|
<param name="cvs.tagname" value="${eml2_0_0-tag}" />
|
419 |
|
|
<param name="dirname" value="eml-2.0.0" />
|
420 |
3018
|
sgarg
|
</antcall> -->
|
421 |
3807
|
tao
|
|
422 |
|
|
<!-- Checkout eml201 for given schema tag-->
|
423 |
2228
|
sgarg
|
<echo>Enter CVS password: </echo>
|
424 |
|
|
<cvs cvsRoot="${cvsroot}"
|
425 |
|
|
package="${eml-module}"
|
426 |
3807
|
tao
|
tag="${eml2_0_1-schema-tag}"
|
427 |
|
|
dest="${build.tmp}/eml_${eml2_0_1-schema-tag}" />
|
428 |
2228
|
sgarg
|
<mkdir dir="lib/schema/eml-2.0.1" />
|
429 |
|
|
<copy todir="lib/schema/eml-2.0.1" filtering="yes">
|
430 |
3807
|
tao
|
<fileset dir="${build.tmp}/eml_${eml2_0_1-schema-tag}/${eml-module}">
|
431 |
2228
|
sgarg
|
<include name="*.xsd"/>
|
432 |
|
|
</fileset>
|
433 |
|
|
</copy>
|
434 |
3807
|
tao
|
|
435 |
|
|
<!-- Checkout eml201 again for given style sheet tag-->
|
436 |
|
|
<echo>Enter CVS password: </echo>
|
437 |
|
|
<cvs cvsRoot="${cvsroot}"
|
438 |
|
|
package="${eml-module}"
|
439 |
|
|
tag="${eml2_0_1-style-tag}"
|
440 |
|
|
dest="${build.tmp}/eml_${eml2_0_1-style-tag}" />
|
441 |
2228
|
sgarg
|
<antcall target="copyxsl">
|
442 |
3807
|
tao
|
<param name="cvs.tagname" value="${eml2_0_1-style-tag}" />
|
443 |
2228
|
sgarg
|
<param name="dirname" value="eml-2.0.1" />
|
444 |
|
|
</antcall>
|
445 |
4328
|
daigle
|
|
446 |
|
|
<!-- Checkout eml210 for given schema tag-->
|
447 |
|
|
<echo>Enter CVS password: </echo>
|
448 |
|
|
<cvs cvsRoot="${cvsroot}"
|
449 |
|
|
package="${eml-module}"
|
450 |
|
|
tag="${eml2_1_0-schema-tag}"
|
451 |
|
|
dest="${build.tmp}/eml_${eml2_1_0-schema-tag}" />
|
452 |
|
|
<mkdir dir="lib/schema/eml-2.1.0" />
|
453 |
|
|
<copy todir="lib/schema/eml-2.1.0" filtering="yes">
|
454 |
|
|
<fileset dir="${build.tmp}/eml_${eml2_1_0-schema-tag}/${eml-module}">
|
455 |
|
|
<include name="*.xsd"/>
|
456 |
|
|
</fileset>
|
457 |
|
|
</copy>
|
458 |
|
|
|
459 |
|
|
<!-- Checkout eml210 for given style sheet tag-->
|
460 |
|
|
<echo>Enter CVS password: </echo>
|
461 |
|
|
<cvs cvsRoot="${cvsroot}"
|
462 |
|
|
package="${eml-module}"
|
463 |
|
|
tag="${eml2_1_0-style-tag}"
|
464 |
|
|
dest="${build.tmp}/eml_${eml2_1_0-style-tag}" />
|
465 |
|
|
<antcall target="copyxsl">
|
466 |
|
|
<param name="cvs.tagname" value="${eml2_1_0-style-tag}" />
|
467 |
|
|
<param name="dirname" value="eml-2.1.0" />
|
468 |
|
|
</antcall>
|
469 |
1939
|
brooke
|
</target>
|
470 |
|
|
|
471 |
2175
|
tao
|
<target name="copyxsl"
|
472 |
1939
|
brooke
|
description="Copies xsl stylesheets from checkout in build/tmp to your metacat cvs sandbox">
|
473 |
4080
|
daigle
|
|
474 |
1939
|
brooke
|
<delete file="${style-common-cvsrelpath}/${eml-css}"/>
|
475 |
2175
|
tao
|
|
476 |
2228
|
sgarg
|
<copy todir="${style-common-cvsrelpath}/${dirname}" filtering="yes">
|
477 |
|
|
<fileset dir="${build.tmp}/eml_${cvs.tagname}/${eml-module}/style/eml">
|
478 |
1929
|
brooke
|
<include name="**/*.xsl"/>
|
479 |
1612
|
tao
|
</fileset>
|
480 |
|
|
</copy>
|
481 |
1939
|
brooke
|
|
482 |
2175
|
tao
|
|
483 |
|
|
<!-- now copy default css from eml module and put it in style-common-path
|
484 |
1933
|
brooke
|
dir with a new name, so other skin-specific css can import it if reqd -->
|
485 |
1939
|
brooke
|
<copy file="${build.tmp}/eml_${cvs.tagname}/${eml-module}/${eml-module.default.css}"
|
486 |
1938
|
brooke
|
tofile="${style-common-cvsrelpath}/${eml-css}" />
|
487 |
1612
|
tao
|
|
488 |
1463
|
tao
|
</target>
|
489 |
3335
|
tao
|
|
490 |
3817
|
tao
|
<target name="correctEML201Docs" depends="jar"
|
491 |
|
|
description="Uses the ant task to run a JAVA patch class to correct invalide eml201 documents which were generated by wrong schema">
|
492 |
|
|
<copy todir="${build.dir}" file="lib/metacat.properties" filtering="yes"/>
|
493 |
|
|
<java classname="edu.ucsb.nceas.metacat.EML201DocumentCorrector" >
|
494 |
|
|
<classpath>
|
495 |
|
|
<path refid="compile.classpath"/>
|
496 |
|
|
<fileset dir="${build.dir}">
|
497 |
|
|
<include name="${name}.jar"/>
|
498 |
|
|
</fileset>
|
499 |
|
|
</classpath>
|
500 |
|
|
</java>
|
501 |
|
|
</target>
|
502 |
2353
|
sgarg
|
|
503 |
3072
|
perry
|
<target name="install-spatial" depends="jar,clientjar,harvesterjar"
|
504 |
3034
|
perry
|
description="Installs spatial option for metacat">
|
505 |
|
|
|
506 |
|
|
<property name="spatial.dir" value="./lib/spatial"/>
|
507 |
|
|
<property name="spatial.geoserver.dir" value="${spatial.dir}/geoserver"/>
|
508 |
|
|
<property name="spatial.webinf-mods" value="${spatial.dir}/WEB-INF"/>
|
509 |
|
|
|
510 |
|
|
<!-- Copy geoserver libs into ${war.lib} -->
|
511 |
|
|
<copy todir="${war.lib}" filtering="no">
|
512 |
|
|
<fileset dir="${spatial.geoserver.dir}/WEB-INF/lib">
|
513 |
|
|
<include name="**"/>
|
514 |
|
|
</fileset>
|
515 |
|
|
</copy>
|
516 |
|
|
|
517 |
|
|
<!-- Copy everything in geoservers WEB-INF (except the libs) into ${war.webinf} -->
|
518 |
|
|
<copy todir="${war.webinf}" filtering="no">
|
519 |
|
|
<fileset dir="${spatial.geoserver.dir}/WEB-INF">
|
520 |
|
|
<exclude name="lib/**"/>
|
521 |
|
|
<exclude name="web.xml"/>
|
522 |
|
|
</fileset>
|
523 |
|
|
</copy>
|
524 |
|
|
|
525 |
|
|
<!-- Copy the rest of the geoserver codebase into ${war.context} -->
|
526 |
|
|
<copy todir="${war.context}" filtering="no">
|
527 |
|
|
<fileset dir="${spatial.geoserver.dir}">
|
528 |
|
|
<exclude name="WEB-INF/**"/>
|
529 |
|
|
<exclude name="index.jsp"/>
|
530 |
|
|
</fileset>
|
531 |
|
|
</copy>
|
532 |
|
|
|
533 |
|
|
<!-- Copy the geoserver index.jsp but rename it to avoid conflicting w/metcat -->
|
534 |
|
|
<copy file="${spatial.geoserver.dir}/WEB-INF/pages/index.jsp"
|
535 |
|
|
tofile="${war.context}/geoserver.jsp"
|
536 |
|
|
overwrite="true"
|
537 |
|
|
filtering="no"/>
|
538 |
|
|
|
539 |
|
|
<!-- Copy the rest of the modified geoserver web-inf files
|
540 |
|
|
<copy todir="${war.webinf}" filtering="no">
|
541 |
|
|
<fileset dir="${spatial.webinf-mods}">
|
542 |
|
|
<exclude name="web.xml.combined"/>
|
543 |
|
|
</fileset>
|
544 |
|
|
</copy> -->
|
545 |
|
|
|
546 |
|
|
</target>
|
547 |
|
|
|
548 |
4080
|
daigle
|
<target name="dev-install" depends="clean, install-ecogrid" description="* Full Install For Development *">
|
549 |
|
|
<copy file="${dist.dir}/${metacat.context}.war" todir="${dev.deploy.dir}"/>
|
550 |
|
|
<delete dir="${dev.deploy.dir}/${metacat.context}" />
|
551 |
|
|
<tstamp>
|
552 |
|
|
<format property="NOW" pattern="MM/dd/yyyy hh:mm:ss aa"/>
|
553 |
|
|
</tstamp>
|
554 |
|
|
<echo>Dev install completed at ${NOW}</echo>
|
555 |
|
|
</target>
|
556 |
3034
|
perry
|
|
557 |
4080
|
daigle
|
<!--
|
558 |
2957
|
tao
|
<target name="install" depends="install-ecogrid" description="* Full Install *">
|
559 |
1079
|
tao
|
<mkdir dir="${datafilepath}" />
|
560 |
1455
|
tao
|
<mkdir dir="${inlinedatafilepath}" />
|
561 |
1079
|
tao
|
<chmod dir="${datafilepath}" perm="ug+w" />
|
562 |
1929
|
brooke
|
<mkdir dir="${temp-dir}"/>
|
563 |
|
|
<chmod dir="${temp-dir}" perm="ug+w" />
|
564 |
2737
|
jones
|
<copy file="${dist.dir}/${metacat.context}.war" todir="${deploy.dir}"/>
|
565 |
2993
|
tao
|
<echo>If you enable ecogrid installation, please run "ant deploy-ecogrid" when installation or upgrade is done</echo>
|
566 |
1952
|
jones
|
</target>
|
567 |
4080
|
daigle
|
-->
|
568 |
2957
|
tao
|
|
569 |
2965
|
tao
|
<target name="install-ecogrid" depends="war, get-ecogrid" if="enable.ecogrid"
|
570 |
2957
|
tao
|
description="Install Ecogrid Compentent">
|
571 |
2991
|
berkley
|
<ant antfile="build.xml" dir="${ecogrid-dir}" target ="clean" inheritall="false">
|
572 |
2977
|
tao
|
<property name="context" value="${metacat.context}"/>
|
573 |
|
|
<property name="target" value="${ecogrid-target-name}"/>
|
574 |
|
|
<property name="metacat.dir" value="${metacat.dir}"/>
|
575 |
|
|
</ant>
|
576 |
2991
|
berkley
|
<ant antfile="build.xml" dir="${ecogrid-dir}" target ="war" inheritall="false">
|
577 |
2957
|
tao
|
<property name="context" value="${metacat.context}"/>
|
578 |
|
|
<property name="target" value="${ecogrid-target-name}"/>
|
579 |
2965
|
tao
|
<property name="metacat.dir" value="${metacat.dir}"/>
|
580 |
2957
|
tao
|
</ant>
|
581 |
2978
|
tao
|
<war destfile="${ecogrid-dir}/build/${metacat.context}.war" update="true">
|
582 |
|
|
<webinf dir="${ecogrid-dir}/lib">
|
583 |
|
|
<include name="server-config.wsdd"/>
|
584 |
|
|
</webinf>
|
585 |
|
|
</war>
|
586 |
2965
|
tao
|
<copy file="${ecogrid-dir}/build/${metacat.context}.war" todir="${dist.dir}" overwrite="true"/>
|
587 |
2978
|
tao
|
|
588 |
|
|
|
589 |
2957
|
tao
|
</target>
|
590 |
2965
|
tao
|
|
591 |
|
|
<target name="get-ecogrid" depends="init" if="ecogrid.required" description="Check out ecogrid module">
|
592 |
|
|
<echo>Enter CVS password: </echo>
|
593 |
|
|
<cvs cvsRoot="${cvsroot}"
|
594 |
|
|
package="${ecogrid-module}" dest="${ecogrid-module-dest-dir}"/>
|
595 |
4098
|
daigle
|
</target>
|
596 |
2965
|
tao
|
|
597 |
2978
|
tao
|
<target name="deploy-ecogrid" depends="clean-ecogrid-server-config-wsdd" if="enable.ecogrid" description="Automately generate wsdd for ecogrid service">
|
598 |
2991
|
berkley
|
<ant antfile="build.xml" dir="${ecogrid-dir}" target ="deploy" inheritall="false">
|
599 |
2957
|
tao
|
<property name="context" value="${metacat.context}"/>
|
600 |
|
|
<property name="target" value="${ecogrid-target-name}"/>
|
601 |
2965
|
tao
|
<property name="metacat.dir" value="${metacat.dir}"/>
|
602 |
3467
|
tao
|
<property name="hostname" value="localhost"/>
|
603 |
2977
|
tao
|
<property name="port" value="${config.port}"/>
|
604 |
2957
|
tao
|
</ant>
|
605 |
|
|
</target>
|
606 |
2978
|
tao
|
|
607 |
|
|
<target name="clean-ecogrid-server-config-wsdd" depends="init" description="Automately generate wsdd for ecogrid service">
|
608 |
4080
|
daigle
|
<delete file="${dev.deploy.dir}/${metacat.context}/WEB-INF/server-config.wsdd"/>
|
609 |
2978
|
tao
|
</target>
|
610 |
1952
|
jones
|
|
611 |
4240
|
daigle
|
<!-- target name="install-registry" depends="init,getConversionXSL"
|
612 |
1952
|
jones
|
description="Install Registry">
|
613 |
2175
|
tao
|
|
614 |
4080
|
daigle
|
<mkdir dir="${inst.cgi.dir}" />
|
615 |
1952
|
jones
|
<copy file="${srcdir}/perl/register-dataset.cgi"
|
616 |
4080
|
daigle
|
todir="${inst.cgi.dir}"/>
|
617 |
1952
|
jones
|
<chmod file="${inst.cgi.dir}/register-dataset.cgi" perm="ugo+x" />
|
618 |
2175
|
tao
|
|
619 |
4240
|
daigle
|
<! - - TODO SCW: set the permissions on this folder to be writable by the apache user - - >
|
620 |
1952
|
jones
|
<mkdir dir="${temp-dir}" />
|
621 |
4240
|
daigle
|
<! - - TODO SCW: use relative paths to grab these instead of copying to tmp,
|
622 |
|
|
used in readDocumentFromMetacat - - >
|
623 |
2343
|
sgarg
|
<copy todir="${temp-dir}" filtering="yes">
|
624 |
|
|
<fileset dir="lib/style/common/emlb6toeml2">
|
625 |
1952
|
jones
|
<include name="*.xsl"/>
|
626 |
|
|
<include name="*.xml"/>
|
627 |
|
|
</fileset>
|
628 |
2343
|
sgarg
|
</copy>
|
629 |
1952
|
jones
|
|
630 |
|
|
<echo message="Install Registry completed." />
|
631 |
4240
|
daigle
|
</target -->
|
632 |
1952
|
jones
|
|
633 |
4240
|
daigle
|
<!-- target name="install-ldap" depends="init"
|
634 |
4080
|
daigle
|
description="Install Metacat LDAP Access">
|
635 |
|
|
|
636 |
|
|
<mkdir dir="${inst.cgi.dir}" />
|
637 |
2343
|
sgarg
|
<copy file="${srcdir}/perl/ldapweb.cgi"
|
638 |
4080
|
daigle
|
todir="${inst.cgi.dir}" />
|
639 |
2343
|
sgarg
|
<chmod file="${inst.cgi.dir}/ldapweb.cgi" perm="ugo+x" />
|
640 |
|
|
<mkdir dir="${templates.dir}" />
|
641 |
4080
|
daigle
|
<copy todir="${templates.dir}">
|
642 |
2343
|
sgarg
|
<fileset dir="lib/style/common/templates">
|
643 |
4240
|
daigle
|
< ! - - SCW: Copy all files - - >
|
644 |
2343
|
sgarg
|
</fileset>
|
645 |
|
|
</copy>
|
646 |
|
|
<echo message="ldapweb install complete." />
|
647 |
4240
|
daigle
|
</target -->
|
648 |
2343
|
sgarg
|
|
649 |
|
|
|
650 |
2175
|
tao
|
<target name="install-skin" depends="init"
|
651 |
2052
|
sgarg
|
description="Install a Skin">
|
652 |
|
|
|
653 |
3994
|
berkley
|
<input message="Please enter name of the skin"
|
654 |
|
|
addproperty="skin-name"/>
|
655 |
2052
|
sgarg
|
|
656 |
|
|
<mkdir dir="${installdir}/style/skins/${skin-name}" />
|
657 |
|
|
<copy todir="${installdir}/style/skins/${skin-name}" filtering="yes">
|
658 |
|
|
<fileset dir="lib/style/skins/${skin-name}">
|
659 |
3014
|
costa
|
<exclude name="**/*.png"/>
|
660 |
|
|
<exclude name="**/*.gif"/>
|
661 |
|
|
<exclude name="**/*.jpg"/>
|
662 |
2277
|
jones
|
<exclude name="**/CVS*"/>
|
663 |
|
|
<exclude name="**/.#*"/>
|
664 |
2052
|
sgarg
|
</fileset>
|
665 |
|
|
</copy>
|
666 |
2054
|
sgarg
|
<copy todir="${installdir}/style/skins/${skin-name}" filtering="no">
|
667 |
|
|
<fileset dir="lib/style/skins/${skin-name}">
|
668 |
3014
|
costa
|
<include name="**/*.png"/>
|
669 |
3994
|
berkley
|
<include name="**/*.gif"/>
|
670 |
3014
|
costa
|
<include name="**/*.jpg"/>
|
671 |
2277
|
jones
|
<exclude name="**/CVS*"/>
|
672 |
|
|
<exclude name="**/.#*"/>
|
673 |
2054
|
sgarg
|
</fileset>
|
674 |
|
|
</copy>
|
675 |
2974
|
jones
|
<copy todir="${installdir}/style/common" filtering="yes">
|
676 |
|
|
<fileset dir="lib/style/common">
|
677 |
|
|
<include name="*.js"/>
|
678 |
|
|
<include name="*.jsp"/>
|
679 |
|
|
<include name="*.css"/>
|
680 |
|
|
<exclude name="*.png"/>
|
681 |
|
|
<exclude name="*.gif"/>
|
682 |
|
|
<exclude name="*.jpg"/>
|
683 |
|
|
<exclude name="**/CVS*"/>
|
684 |
|
|
<exclude name="**/.#*"/>
|
685 |
|
|
</fileset>
|
686 |
|
|
</copy>
|
687 |
2277
|
jones
|
<!--
|
688 |
2210
|
jones
|
<mkdir dir="${installdir}/style/skins/${skin-name}/images" />
|
689 |
|
|
<copy todir="${installdir}/style/skins/${skin-name}/images" filtering="no">
|
690 |
|
|
<fileset dir="lib/style/skins/${skin-name}/images">
|
691 |
|
|
<include name="*.png"/>
|
692 |
|
|
<include name="*.gif"/>
|
693 |
|
|
<include name="*.jpg"/>
|
694 |
|
|
</fileset>
|
695 |
|
|
</copy>
|
696 |
2277
|
jones
|
-->
|
697 |
2052
|
sgarg
|
|
698 |
|
|
<echo message="Install Skin completed." />
|
699 |
|
|
</target>
|
700 |
|
|
|
701 |
4098
|
daigle
|
<target name="war" depends="warPrepare,install-spatial"
|
702 |
1952
|
jones
|
description="Create a web archive (WAR) for servlet deployment">
|
703 |
2737
|
jones
|
<mkdir dir="${dist.dir}" />
|
704 |
|
|
<war destfile="${dist.dir}/${metacat.context}.war"
|
705 |
1952
|
jones
|
webxml="${build.war}/web.xml">
|
706 |
|
|
<fileset dir="${war.context}"/>
|
707 |
|
|
<lib dir="${war.lib}"/>
|
708 |
|
|
<webinf dir="${war.webinf}"/>
|
709 |
|
|
</war>
|
710 |
|
|
</target>
|
711 |
2957
|
tao
|
|
712 |
4369
|
daigle
|
<target name="warPrepare" depends="cgiPrepare,jar,clientjar,harvesterjar"
|
713 |
1952
|
jones
|
description="Prepare files for creating a web archive (WAR)">
|
714 |
|
|
|
715 |
|
|
<property name="war.lib" value="${build.war}/lib" />
|
716 |
|
|
<property name="war.webinf" value="${build.war}/WEB-INF" />
|
717 |
2737
|
jones
|
<property name="war.context" value="${build.war}/${metacat.context}" />
|
718 |
4098
|
daigle
|
<property name="war.webinf.sql" value="${war.webinf}/sql" />
|
719 |
4369
|
daigle
|
<property name="war.context.cgi" value="${war.context}/cgi-bin" />
|
720 |
4080
|
daigle
|
<property name="war.context.docs" value="${war.context}/docs" />
|
721 |
4240
|
daigle
|
<property name="war.context.temp" value="${war.context}/temp" />
|
722 |
|
|
<property name="war.context.templates" value="${war.context}${style-common-relpath}/templates" />
|
723 |
1952
|
jones
|
<mkdir dir="${war.lib}" />
|
724 |
|
|
<mkdir dir="${war.webinf}" />
|
725 |
|
|
<mkdir dir="${war.context}" />
|
726 |
4098
|
daigle
|
<mkdir dir="${war.webinf.sql}" />
|
727 |
4369
|
daigle
|
<mkdir dir="${war.context.cgi}" />
|
728 |
4080
|
daigle
|
<mkdir dir="${war.context.docs}" />
|
729 |
4240
|
daigle
|
<mkdir dir="${war.context.temp}" />
|
730 |
|
|
<mkdir dir="${war.context.templates}" />
|
731 |
2610
|
tao
|
|
732 |
4098
|
daigle
|
<!--copy file="${lib.dir}/${jdbc.lib.oracle}" todir="${war.lib}" / -->
|
733 |
|
|
<!--copy file="${lib.dir}/${jdbc.lib.postgres}" todir="${war.lib}" / -->
|
734 |
|
|
<!--copy file="${lib.dir}/${jdbc.lib.sqlserver1}" todir="${war.lib}" / -->
|
735 |
|
|
<!--copy file="${lib.dir}/${jdbc.lib.sqlserver2}" todir="${war.lib}" / -->
|
736 |
|
|
<!--copy file="${lib.dir}/${jdbc.lib.sqlserver3}" todir="${war.lib}" / -->
|
737 |
1952
|
jones
|
<copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
|
738 |
|
|
<copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
|
739 |
2059
|
costa
|
<copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
|
740 |
1952
|
jones
|
<copy todir="${war.lib}" filtering="no">
|
741 |
1823
|
jones
|
<fileset dir="lib">
|
742 |
4098
|
daigle
|
<!--
|
743 |
|
|
<not>
|
744 |
2610
|
tao
|
<filename name="${jdbc-jar-name}"/>
|
745 |
|
|
</not>
|
746 |
4098
|
daigle
|
-->
|
747 |
2610
|
tao
|
<include name="*.jar"/>
|
748 |
1823
|
jones
|
</fileset>
|
749 |
3059
|
berkley
|
<fileset dir="lib">
|
750 |
|
|
<include name="xalan.jar"/>
|
751 |
3194
|
berkley
|
<include name="gwt*.jar"/>
|
752 |
1823
|
jones
|
</fileset>
|
753 |
|
|
</copy>
|
754 |
4080
|
daigle
|
<!-- MCD copy file="lib/web.xml.${tomcatversion}"
|
755 |
|
|
tofile="${build.war}/web.xml" / -->
|
756 |
|
|
<!-- MCD added next - Remove the tomcat5 reference-->
|
757 |
|
|
<copy file="lib/web.xml.tomcat5"
|
758 |
|
|
tofile="${build.war}/web.xml"/>
|
759 |
1952
|
jones
|
<copy file="lib/metacat.properties" todir="${war.webinf}"
|
760 |
1951
|
jones
|
filtering="yes" />
|
761 |
4080
|
daigle
|
<copy file="lib/metacat.properties.metadata.xml" todir="${war.webinf}"
|
762 |
3099
|
jones
|
filtering="no" />
|
763 |
4080
|
daigle
|
<copy file="lib/org.properties.metadata.xml" todir="${war.webinf}"
|
764 |
|
|
filtering="no" />
|
765 |
4162
|
daigle
|
<copy file="lib/ldap.properties.metadata.xml" todir="${war.webinf}"
|
766 |
|
|
filtering="no" />
|
767 |
2900
|
sgarg
|
<copy todir="${war.webinf}" filtering="yes">
|
768 |
|
|
<fileset dir="lib">
|
769 |
|
|
<include name="skin.configs/**"/>
|
770 |
|
|
</fileset>
|
771 |
|
|
</copy>
|
772 |
2583
|
sgarg
|
<copy file="lib/log4j.properties" todir="${war.webinf}"
|
773 |
|
|
filtering="yes" />
|
774 |
1952
|
jones
|
<copy todir="${war.context}" filtering="no">
|
775 |
822
|
jones
|
<fileset dir="lib">
|
776 |
|
|
<include name="**/*.jpg"/>
|
777 |
|
|
<include name="**/*.png"/>
|
778 |
|
|
<include name="**/*.gif"/>
|
779 |
2844
|
costa
|
<include name="LiveMap_30/**"/>
|
780 |
822
|
jones
|
</fileset>
|
781 |
|
|
</copy>
|
782 |
1952
|
jones
|
<copy todir="${war.context}" filtering="yes">
|
783 |
822
|
jones
|
<fileset dir="lib">
|
784 |
|
|
<exclude name="*.jar"/>
|
785 |
|
|
<exclude name="*.properties"/>
|
786 |
4080
|
daigle
|
<exclude name="*.metadata.xml"/>
|
787 |
822
|
jones
|
<exclude name="web.xml"/>
|
788 |
1437
|
berkley
|
<exclude name="**/*.jpg"/>
|
789 |
|
|
<exclude name="**/*.png"/>
|
790 |
|
|
<exclude name="**/*.gif"/>
|
791 |
2778
|
jones
|
<exclude name="lsid_lib/**"/>
|
792 |
|
|
<exclude name="lsid_conf/**"/>
|
793 |
2844
|
costa
|
<exclude name="LiveMap_30/**"/>
|
794 |
2900
|
sgarg
|
<exclude name="skin.configs/**"/>
|
795 |
3034
|
perry
|
<exclude name="spatial/geoserver/**"/>
|
796 |
|
|
<exclude name="spatial/WEB-INF/**"/>
|
797 |
822
|
jones
|
</fileset>
|
798 |
|
|
</copy>
|
799 |
4193
|
daigle
|
<copy todir="${war.context.docs}" filtering="yes">
|
800 |
|
|
<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
|
801 |
|
|
</copy>
|
802 |
|
|
<copy todir="${war.context.docs}" filtering="no">
|
803 |
|
|
<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
|
804 |
|
|
</copy>
|
805 |
4098
|
daigle
|
<copy todir="${war.webinf.sql}" filtering="yes">
|
806 |
4080
|
daigle
|
<fileset dir="src">
|
807 |
|
|
<include name="**/*.sql"/>
|
808 |
|
|
</fileset>
|
809 |
|
|
</copy>
|
810 |
4369
|
daigle
|
|
811 |
|
|
<copy file="src/perl/register-dataset.cgi" todir="${war.context.cgi}"/>
|
812 |
|
|
<copy file="src/perl/ldapweb.cgi" todir="${war.context.cgi}" />
|
813 |
|
|
<copy file="src/perl/Metacat/blib/lib/Metacat.pm" todir="${war.lib}" />
|
814 |
|
|
|
815 |
|
|
<!-- registry cgi section -->
|
816 |
|
|
<!-- TODO SCW: use relative paths to grab these instead of copying to tmp,
|
817 |
4240
|
daigle
|
used in readDocumentFromMetacat -->
|
818 |
4369
|
daigle
|
<!-- TODO MCD copy temp files to actual location using config util?? -->
|
819 |
|
|
<copy todir="${war.context.temp}" filtering="yes">
|
820 |
|
|
<fileset dir="lib/style/common/emlb6toeml2">
|
821 |
|
|
<include name="*.xsl"/>
|
822 |
|
|
<include name="*.xml"/>
|
823 |
|
|
</fileset>
|
824 |
|
|
</copy>
|
825 |
|
|
<available file="lib/style/common/emlb6toeml2" type="dir"
|
826 |
|
|
property="styles.not.needed"/>
|
827 |
|
|
|
828 |
|
|
<!-- ldap cgi section -->
|
829 |
|
|
<copy todir="${war.context.templates}">
|
830 |
|
|
<fileset dir="lib/style/common/templates">
|
831 |
|
|
<!-- SCW: Copy all files -->
|
832 |
|
|
</fileset>
|
833 |
|
|
</copy>
|
834 |
|
|
</target>
|
835 |
|
|
|
836 |
|
|
<target name="cgiPrepare">
|
837 |
|
|
<exec dir="src/perl/Metacat/" command="perl" >
|
838 |
|
|
<arg value="Makefile.PL" />
|
839 |
|
|
</exec>
|
840 |
|
|
<exec dir="src/perl/Metacat/" command="make" />
|
841 |
|
|
</target>
|
842 |
1929
|
brooke
|
|
843 |
2175
|
tao
|
<target name="getConversionXSL" depends="prepare"
|
844 |
1954
|
jones
|
unless="styles.not.needed"
|
845 |
1939
|
brooke
|
description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
|
846 |
2497
|
sgarg
|
|
847 |
1929
|
brooke
|
<echo>Enter CVS password: </echo>
|
848 |
2497
|
sgarg
|
<cvs cvsRoot="${cvsroot}"
|
849 |
|
|
package="${eml-module}"
|
850 |
3909
|
tao
|
tag="${eml2_0_1-style-tag}"
|
851 |
|
|
dest="${build.tmp}/eml_${eml2_0_1-style-tag}" />
|
852 |
2343
|
sgarg
|
|
853 |
|
|
<mkdir dir="lib/style/common/emlb6toeml2" />
|
854 |
|
|
<copy todir="lib/style/common/emlb6toeml2" filtering="yes">
|
855 |
3909
|
tao
|
<fileset dir="${build.tmp}/eml_${eml2_0_1-style-tag}/${eml-module}/lib/beta6toeml2/xsl">
|
856 |
2343
|
sgarg
|
<include name="*.xsl"/>
|
857 |
|
|
<include name="*.xml"/>
|
858 |
|
|
</fileset>
|
859 |
|
|
</copy>
|
860 |
1929
|
brooke
|
</target>
|
861 |
|
|
|
862 |
2135
|
costa
|
<target name="testprep" depends="jar,clientjar,harvesterjar">
|
863 |
1783
|
jones
|
<mkdir dir="${build.tests}"/>
|
864 |
|
|
<copy todir="${build.tests}" filtering="yes">
|
865 |
|
|
<fileset dir="${testdir}">
|
866 |
|
|
<include name="edu/**"/>
|
867 |
|
|
</fileset>
|
868 |
|
|
</copy>
|
869 |
4382
|
daigle
|
<copy todir="${build.tests}" file="${testdir}/test.properties" filtering="yes"/>
|
870 |
4121
|
daigle
|
|
871 |
971
|
tao
|
<!-- copy and compile the tests into a jar file -->
|
872 |
1783
|
jones
|
<javac srcdir="${build.tests}"
|
873 |
|
|
destdir="${build.tests}"
|
874 |
1612
|
tao
|
debug="on"
|
875 |
2982
|
jones
|
includes="**/*.java">
|
876 |
2599
|
jones
|
<classpath>
|
877 |
|
|
<path refid="compile.classpath"/>
|
878 |
|
|
<fileset dir="${build.dir}">
|
879 |
2982
|
jones
|
<include name="${name}.jar"/>
|
880 |
|
|
<include name="${name}-client.jar"/>
|
881 |
|
|
<include name="harvester.jar"/>
|
882 |
2599
|
jones
|
</fileset>
|
883 |
|
|
</classpath>
|
884 |
|
|
</javac>
|
885 |
204
|
jones
|
|
886 |
1311
|
berkley
|
<jar jarfile="${build.dir}/${name}-junittests.jar"
|
887 |
1783
|
jones
|
basedir="${build.tests}"
|
888 |
1311
|
berkley
|
includes="**/*.class" />
|
889 |
1822
|
jones
|
</target>
|
890 |
971
|
tao
|
|
891 |
1939
|
brooke
|
<target name="test" depends="testprep"
|
892 |
|
|
description="Uses the ant junit task to run all JUnit tests">
|
893 |
1822
|
jones
|
|
894 |
971
|
tao
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
895 |
1783
|
jones
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
896 |
971
|
tao
|
haltonerror="no">
|
897 |
1783
|
jones
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
|
898 |
971
|
tao
|
<classpath>
|
899 |
2599
|
jones
|
<path refid="compile.classpath"/>
|
900 |
|
|
<fileset dir="${build.dir}">
|
901 |
2982
|
jones
|
<include name="${name}.jar"/>
|
902 |
|
|
<include name="${name}-client.jar"/>
|
903 |
|
|
<include name="harvester.jar"/>
|
904 |
|
|
<include name="${name}-junittests.jar"/>
|
905 |
2599
|
jones
|
</fileset>
|
906 |
971
|
tao
|
</classpath>
|
907 |
|
|
|
908 |
|
|
<formatter type="plain" />
|
909 |
|
|
|
910 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
911 |
1783
|
jones
|
<fileset dir="${build.tests}">
|
912 |
4304
|
daigle
|
<include name="**/*.class"/>
|
913 |
4147
|
daigle
|
<exclude name="**/MCTestCase.class" />
|
914 |
4304
|
daigle
|
<exclude name="**/ClientViewHelperTest.class" />
|
915 |
971
|
tao
|
</fileset>
|
916 |
|
|
</batchtest>
|
917 |
|
|
</junit>
|
918 |
|
|
</target>
|
919 |
1103
|
tao
|
|
920 |
1939
|
brooke
|
<target name="runonetest" depends="testprep"
|
921 |
|
|
description="Uses the ant junit task to run a single JUnit test, defined by the ${testtorun} property">
|
922 |
1500
|
tao
|
|
923 |
1939
|
brooke
|
<echo>testtorun: ${testtorun}</echo>
|
924 |
|
|
|
925 |
1500
|
tao
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
926 |
1783
|
jones
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
927 |
3747
|
tao
|
haltonerror="no" showoutput="yes">
|
928 |
2044
|
tao
|
<!--<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>-->
|
929 |
1500
|
tao
|
<classpath>
|
930 |
2599
|
jones
|
<path refid="compile.classpath"/>
|
931 |
|
|
<fileset dir="${build.dir}">
|
932 |
2982
|
jones
|
<include name="${name}.jar"/>
|
933 |
|
|
<include name="${name}-client.jar"/>
|
934 |
|
|
<include name="harvester.jar"/>
|
935 |
|
|
<include name="${name}-junittests.jar"/>
|
936 |
2599
|
jones
|
</fileset>
|
937 |
1500
|
tao
|
</classpath>
|
938 |
|
|
|
939 |
|
|
<formatter type="plain" />
|
940 |
|
|
|
941 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
942 |
1783
|
jones
|
<fileset dir="${build.tests}">
|
943 |
1500
|
tao
|
<include name="**/${testtorun}.class" />
|
944 |
|
|
</fileset>
|
945 |
|
|
</batchtest>
|
946 |
|
|
</junit>
|
947 |
|
|
</target>
|
948 |
|
|
|
949 |
2175
|
tao
|
<target name="testharvester"
|
950 |
2135
|
costa
|
depends="testprep"
|
951 |
|
|
description="Uses the ant junit task to test only the Harvester code">
|
952 |
2175
|
tao
|
<junit printsummary="yes"
|
953 |
|
|
haltonfailure="off"
|
954 |
2135
|
costa
|
fork="yes"
|
955 |
|
|
haltonerror="off">
|
956 |
2599
|
jones
|
<classpath>
|
957 |
|
|
<path refid="compile.classpath"/>
|
958 |
|
|
<fileset dir="${build.dir}">
|
959 |
2982
|
jones
|
<include name="${name}.jar"/>
|
960 |
|
|
<include name="${name}-client.jar"/>
|
961 |
|
|
<include name="harvester.jar"/>
|
962 |
|
|
<include name="${name}-junittests.jar"/>
|
963 |
2599
|
jones
|
</fileset>
|
964 |
|
|
</classpath>
|
965 |
2135
|
costa
|
<formatter type="plain" />
|
966 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
967 |
|
|
<fileset dir="${build.tests}">
|
968 |
|
|
<include name="**/harvesterClient/*.class" />
|
969 |
|
|
</fileset>
|
970 |
|
|
</batchtest>
|
971 |
|
|
</junit>
|
972 |
|
|
</target>
|
973 |
|
|
|
974 |
1939
|
brooke
|
<target name="gethttpclient" depends="prepare"
|
975 |
|
|
description="checks out and compiles morpho httpclient code">
|
976 |
1311
|
berkley
|
<!--mkdir dir="${morphosourcedir}" -->
|
977 |
1487
|
tao
|
<cvs cvsRoot="${cvsroot}"
|
978 |
1103
|
tao
|
package="morpho"
|
979 |
|
|
dest="." />
|
980 |
1107
|
tao
|
<ant dir="${morphosourcedir}" inheritAll="false" target="jar" />
|
981 |
1103
|
tao
|
</target>
|
982 |
|
|
|
983 |
|
|
<!-- run this target, we need to check out a another morpho souce dir was checked out. -->
|
984 |
4080
|
daigle
|
<target name="nettest" depends="dev-install"
|
985 |
1939
|
brooke
|
description="compiles and runs the metacatnettest code">
|
986 |
2175
|
tao
|
|
987 |
1103
|
tao
|
<echo>***********************************
|
988 |
1311
|
berkley
|
Please run ant gethttpclient first!
|
989 |
|
|
***********************************
|
990 |
1103
|
tao
|
</echo>
|
991 |
|
|
<!-- copy and compile the tests into a jar file -->
|
992 |
1116
|
tao
|
<mkdir dir="${build.metacatnettest}"/>
|
993 |
1103
|
tao
|
<javac srcdir="${junitnettestsdir}"
|
994 |
1116
|
tao
|
destdir="${build.metacatnettest}"
|
995 |
2599
|
jones
|
includes="**/*.java">
|
996 |
|
|
<classpath>
|
997 |
|
|
<path refid="compile.classpath"/>
|
998 |
|
|
<fileset dir="${build.dir}">
|
999 |
2982
|
jones
|
<include name="${name}.jar"/>
|
1000 |
2599
|
jones
|
</fileset>
|
1001 |
|
|
</classpath>
|
1002 |
|
|
</javac>
|
1003 |
1103
|
tao
|
|
1004 |
|
|
<jar jarfile="${build.dir}/${name}-junitnettests.jar"
|
1005 |
1116
|
tao
|
basedir="${build.metacatnettest}"
|
1006 |
1103
|
tao
|
includes="**/*.class" />
|
1007 |
|
|
|
1008 |
|
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
1009 |
1107
|
tao
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
1010 |
1103
|
tao
|
haltonerror="no">
|
1011 |
1107
|
tao
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
|
1012 |
1103
|
tao
|
<classpath>
|
1013 |
2599
|
jones
|
<path refid="compile.classpath"/>
|
1014 |
|
|
<fileset dir="${build.dir}">
|
1015 |
2982
|
jones
|
<include name="${name}.jar"/>
|
1016 |
|
|
<include name="${name}-junitnettests.jar"/>
|
1017 |
2599
|
jones
|
</fileset>
|
1018 |
1103
|
tao
|
</classpath>
|
1019 |
|
|
|
1020 |
|
|
<formatter type="plain" />
|
1021 |
|
|
|
1022 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
1023 |
1116
|
tao
|
<fileset dir="${build.metacatnettest}">
|
1024 |
|
|
<include name="**/*.class" />
|
1025 |
1103
|
tao
|
</fileset>
|
1026 |
|
|
</batchtest>
|
1027 |
|
|
</junit>
|
1028 |
1311
|
berkley
|
</target>
|
1029 |
1103
|
tao
|
|
1030 |
1939
|
brooke
|
<target name="cleanweb" depends="clean"
|
1031 |
|
|
description="deletes tomcat web context dir and all its contents">
|
1032 |
1522
|
berkley
|
<delete dir="${installdir}" />
|
1033 |
|
|
</target>
|
1034 |
|
|
|
1035 |
|
|
|
1036 |
1939
|
brooke
|
<target name="clean" depends="init"
|
1037 |
2320
|
jones
|
description="deletes build dir and files that can be regenerated form the release">
|
1038 |
822
|
jones
|
<delete dir="${build.dir}" />
|
1039 |
2737
|
jones
|
<delete dir="${dist.dir}" />
|
1040 |
2320
|
jones
|
</target>
|
1041 |
|
|
|
1042 |
4098
|
daigle
|
<target name="localclean" depends="clean"
|
1043 |
|
|
description="deletes even jars that depend on external sources such as stylesheets and jars">
|
1044 |
|
|
<delete file="lib/httpclient.jar" />
|
1045 |
|
|
<delete file="lib/utilities.jar" />
|
1046 |
|
|
</target>
|
1047 |
|
|
|
1048 |
|
|
<target name="fullclean" depends="localclean"
|
1049 |
|
|
description="deletes code and eml">
|
1050 |
1939
|
brooke
|
<delete includeEmptyDirs="true" failonerror="false">
|
1051 |
|
|
<fileset dir="${style-common-cvsrelpath}">
|
1052 |
|
|
<include name="${eml-css}" />
|
1053 |
|
|
<include name="eml-*/*.xsl" />
|
1054 |
|
|
<include name="eml-*" />
|
1055 |
|
|
</fileset>
|
1056 |
4080
|
daigle
|
<fileset dir="${schema-cvsrelpath}">
|
1057 |
|
|
<include name="eml-*/*.xsd" />
|
1058 |
|
|
</fileset>
|
1059 |
4369
|
daigle
|
<fileset dir="${ecogrid-dir}">
|
1060 |
|
|
<include name="build.properties" />
|
1061 |
|
|
<include name="buildfiles/metacatImpl.xml" />
|
1062 |
|
|
</fileset>
|
1063 |
2320
|
jones
|
</delete>
|
1064 |
113
|
jones
|
</target>
|
1065 |
|
|
|
1066 |
1939
|
brooke
|
<target name="jdoc" depends="prepare"
|
1067 |
|
|
description="generates javadoc documentation">
|
1068 |
822
|
jones
|
<javadoc packagenames="edu.ucsb.nceas.*"
|
1069 |
516
|
jones
|
sourcepath="${build.src}"
|
1070 |
|
|
destdir="${build.javadocs}"
|
1071 |
113
|
jones
|
author="true"
|
1072 |
|
|
version="true"
|
1073 |
|
|
use="true"
|
1074 |
348
|
jones
|
windowtitle="${Name} API"
|
1075 |
|
|
doctitle="<h1>${Name}</h1>"
|
1076 |
2599
|
jones
|
bottom="<i>Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>">
|
1077 |
|
|
<classpath>
|
1078 |
|
|
<path refid="compile.classpath"/>
|
1079 |
|
|
</classpath>
|
1080 |
|
|
</javadoc>
|
1081 |
113
|
jones
|
</target>
|
1082 |
|
|
|
1083 |
2461
|
sgarg
|
<target name="dist"
|
1084 |
2965
|
tao
|
depends="geteml,get-ecogrid,jar,protocol,jdoc,getConversionXSL,getutilities"
|
1085 |
1939
|
brooke
|
description="prepares a full release distribution">
|
1086 |
806
|
jones
|
<mkdir dir="${dist.dir}"/>
|
1087 |
|
|
<delete dir="${ver.dir}" />
|
1088 |
|
|
<mkdir dir="${ver.dir}"/>
|
1089 |
|
|
<copy todir="${ver.dir}">
|
1090 |
1311
|
berkley
|
<fileset dir="."
|
1091 |
2401
|
costa
|
excludes="**/CVS* **/.#* src/** test/** build/** docs/** ${dist.dir}/** ${dist.dir.hle}/**"/>
|
1092 |
806
|
jones
|
</copy>
|
1093 |
|
|
<copy todir="${ver.dir}" file="build.xml"/>
|
1094 |
2317
|
jones
|
<copy todir="${ver.dir}" file="build.properties"/>
|
1095 |
882
|
jones
|
|
1096 |
|
|
<copy todir="${ver.dir}/docs" filtering="yes">
|
1097 |
|
|
<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
|
1098 |
|
|
</copy>
|
1099 |
|
|
<copy todir="${ver.dir}/docs" filtering="no">
|
1100 |
|
|
<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
|
1101 |
|
|
</copy>
|
1102 |
806
|
jones
|
<copy todir="${ver.dir}/docs/dev">
|
1103 |
|
|
<fileset dir="${build.dir}/docs"/>
|
1104 |
|
|
</copy>
|
1105 |
917
|
berkley
|
<copy todir="${ver.dir}/src">
|
1106 |
|
|
<fileset dir="${build.dir}/src"/>
|
1107 |
|
|
</copy>
|
1108 |
2391
|
tao
|
<!-- copy loaddtdschemal.sql form src dir(which has the server token to ver.dir/src-->
|
1109 |
4118
|
daigle
|
<!-- copy todir="${ver.dir}/src" file="${srcdir}/loaddtdschema.sql" overwrite="yes" filtering="no"/ -->
|
1110 |
|
|
<!-- copy todir="${ver.dir}/src" file="${srcdir}/upgrade-db-to-1.5.sql" overwrite="yes" filtering="no"/ -->
|
1111 |
2323
|
jones
|
<!--
|
1112 |
992
|
berkley
|
<delete dir="./${ver.dir}/${build.dir}"/>
|
1113 |
|
|
<delete dir="./${ver.dir}/dist"/>
|
1114 |
2323
|
jones
|
-->
|
1115 |
882
|
jones
|
<delete file="./${name}-${release}.zip"/>
|
1116 |
1312
|
tao
|
<zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
1117 |
882
|
jones
|
<delete file="./${name}-${release}.tar.gz" />
|
1118 |
1312
|
tao
|
<tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
1119 |
1311
|
berkley
|
<gzip zipfile="./${name}-${release}.tar.gz"
|
1120 |
882
|
jones
|
src="./${name}-${release}.tar"/>
|
1121 |
|
|
<delete file="./${name}-${release}.tar" />
|
1122 |
1311
|
berkley
|
</target>
|
1123 |
806
|
jones
|
|
1124 |
4372
|
daigle
|
<target name="distbin" depends="war" description="prepares a binary distribution">
|
1125 |
|
|
<copy todir="${dist.dir}">
|
1126 |
|
|
<fileset dir="./bin/install" />
|
1127 |
|
|
</copy>
|
1128 |
|
|
<delete file="./${name}-bin-${release}.zip" />
|
1129 |
|
|
<zip zipfile="./${name}-bin-${release}.zip"
|
1130 |
|
|
basedir="${dist.dir}"
|
1131 |
|
|
excludes="metacat-*/**"/>
|
1132 |
|
|
<delete file="./${name}-bin-${release}.tar.gz" />
|
1133 |
|
|
<tar tarfile="./${name}-bin-${release}.tar"
|
1134 |
|
|
basedir="${dist.dir}"
|
1135 |
|
|
excludes="metacat-*/**"/>
|
1136 |
|
|
<gzip zipfile="./${name}-bin-${release}.tar.gz" src="./${name}-bin-${release}.tar" />
|
1137 |
|
|
<delete file="./${name}-bin-${release}.tar" />
|
1138 |
|
|
<delete dir="${dist.dir}" />
|
1139 |
|
|
</target>
|
1140 |
|
|
|
1141 |
1939
|
brooke
|
<target name="distsrc" depends="dist"
|
1142 |
|
|
description="prepares a source distribution">
|
1143 |
806
|
jones
|
<mkdir dir="${ver.src}"/>
|
1144 |
|
|
<copy todir="${ver.src}">
|
1145 |
|
|
<fileset dir="./src"/>
|
1146 |
|
|
</copy>
|
1147 |
2461
|
sgarg
|
<mkdir dir="${util.dir}"/>
|
1148 |
|
|
<copy todir="${util.dir}">
|
1149 |
|
|
<fileset dir="${build.tmp}/utilities" excludes="**/CVS*" />
|
1150 |
|
|
</copy>
|
1151 |
2965
|
tao
|
|
1152 |
|
|
<mkdir dir="${ecogrid-dist-dir}"/>
|
1153 |
|
|
<copy todir="${ecogrid-dist-dir}">
|
1154 |
|
|
<fileset dir="${ecogrid-dir}" excludes="**/CVS*" />
|
1155 |
|
|
</copy>
|
1156 |
806
|
jones
|
|
1157 |
3131
|
perry
|
<delete file="${ver.dir}/lib/utilities.jar"/>
|
1158 |
|
|
|
1159 |
882
|
jones
|
<delete file="./${name}-src-${release}.zip"/>
|
1160 |
|
|
<zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
|
1161 |
|
|
<delete file="./${name}-src-${release}.tar.gz" />
|
1162 |
|
|
<tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
|
1163 |
1311
|
berkley
|
<gzip zipfile="./${name}-src-${release}.tar.gz"
|
1164 |
882
|
jones
|
src="./${name}-src-${release}.tar"/>
|
1165 |
|
|
<delete file="./${name}-src-${release}.tar" />
|
1166 |
3131
|
perry
|
<delete dir="${dist.dir}"/>
|
1167 |
1311
|
berkley
|
</target>
|
1168 |
806
|
jones
|
|
1169 |
1702
|
tao
|
<target name="stylesheettest">
|
1170 |
1939
|
brooke
|
<xslt in="${input}" out="eml.html" style="${style-common-cvsrelpath}/eml-2.0.0/eml-2.0.0.xsl">
|
1171 |
1702
|
tao
|
<param name="displaymodule" expression="${displaymodule}"/>
|
1172 |
|
|
<param name="docid" expression="${input}"/>
|
1173 |
|
|
<param name="entitytype" expression="${entitytype}"/>
|
1174 |
|
|
<param name="entityindex" expression="${entityindex}"/>
|
1175 |
|
|
<outputproperty name="method" value="html"/>
|
1176 |
|
|
<outputproperty name="standalone" value="yes"/>
|
1177 |
|
|
<outputproperty name="encoding" value="iso8859_1"/>
|
1178 |
|
|
<outputproperty name="indent" value="yes"/>
|
1179 |
|
|
</xslt>
|
1180 |
|
|
</target>
|
1181 |
2175
|
tao
|
|
1182 |
3210
|
tao
|
|
1183 |
1814
|
tao
|
<target name="compilewebclient" depends="prepare">
|
1184 |
|
|
<javac srcdir="${build.src}" destdir="${build.dest}" includes="**/application/*.java" classpathref="webservicepath" />
|
1185 |
|
|
</target>
|
1186 |
2175
|
tao
|
|
1187 |
1814
|
tao
|
<target name="runwebclient" depends="compilewebclient">
|
1188 |
2175
|
tao
|
<java classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
|
1189 |
1814
|
tao
|
dir="${build.dest}" fork="yes"
|
1190 |
|
|
classpathref="webservicepath" classpath="./lib/utilities.jar" failonerror="true">
|
1191 |
|
|
<arg value="${serviceUrl}"/>
|
1192 |
|
|
<arg value="${docid}"/>
|
1193 |
|
|
</java>
|
1194 |
|
|
</target>
|
1195 |
2598
|
harris
|
|
1196 |
2639
|
harris
|
<target name="spatial_option" depends="prepare" description=" -- compiles code for the spatial option">
|
1197 |
2598
|
harris
|
|
1198 |
|
|
<echo message="Compiling the metatcat shapefile creator"/>
|
1199 |
|
|
<echo message="using the shapelib at: ${shapelib.dir}"/>
|
1200 |
|
|
<exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
|
1201 |
|
|
<arg line="./src/spatial/cpp/metacat_shapefile.cpp -I ${shapelib.dir} -c -o build/metacat_shapefile.o" />
|
1202 |
|
|
</exec>
|
1203 |
|
|
|
1204 |
|
|
<exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
|
1205 |
2639
|
harris
|
<arg line="build/metacat_shapefile.o ${shapelib.dir}/.libs/libshp.a -o bin/metacat_shapefile" />
|
1206 |
2598
|
harris
|
</exec>
|
1207 |
|
|
</target>
|
1208 |
|
|
|
1209 |
2737
|
jones
|
<!-- LSID Authority support -->
|
1210 |
|
|
<patternset id="lsid.jars">
|
1211 |
|
|
<include name="axis.jar" />
|
1212 |
2772
|
jones
|
<include name="commons-discovery-0.2.jar" />
|
1213 |
2737
|
jones
|
<include name="jaxrpc.jar" />
|
1214 |
|
|
<include name="lsid-client-1.1.1.jar" />
|
1215 |
|
|
<include name="lsid-server-1.1.1.jar" />
|
1216 |
|
|
<include name="saaj.jar" />
|
1217 |
2772
|
jones
|
<include name="wsdl4j-1.5.1.jar" />
|
1218 |
2737
|
jones
|
<include name="activation.jar" />
|
1219 |
|
|
<include name="castor-0.9.5.jar" />
|
1220 |
|
|
<include name="dnsjava-1.3.2.jar" />
|
1221 |
|
|
<include name="mail.jar" />
|
1222 |
2778
|
jones
|
<include name="commons-logging-1.0.4.jar" />
|
1223 |
|
|
<!-- These jars may be needed but seem to not actually be,
|
1224 |
|
|
so leaving them out for now
|
1225 |
|
|
<include name="axis-ant.jar" />
|
1226 |
2737
|
jones
|
-->
|
1227 |
|
|
<!--<include name="GenCastor.class" />-->
|
1228 |
|
|
</patternset>
|
1229 |
|
|
<patternset id="lib.jars">
|
1230 |
|
|
<include name="httpclient.jar" />
|
1231 |
|
|
<include name="log4j-1.2.12.jar" />
|
1232 |
|
|
<include name="utilities.jar" />
|
1233 |
|
|
<include name="xercesImpl.jar" />
|
1234 |
|
|
<include name="xalan.jar" />
|
1235 |
|
|
<include name="xml-apis.jar" />
|
1236 |
|
|
</patternset>
|
1237 |
|
|
|
1238 |
|
|
<path id="lsid.classpath">
|
1239 |
|
|
<fileset dir="${lsid.lib.dir}">
|
1240 |
|
|
<patternset refid="lsid.jars"/>
|
1241 |
|
|
</fileset>
|
1242 |
|
|
<fileset dir="${lib.dir}">
|
1243 |
|
|
<patternset refid="lsid.jars"/>
|
1244 |
|
|
</fileset>
|
1245 |
3059
|
berkley
|
<fileset dir="${lib.dir}">
|
1246 |
2737
|
jones
|
<include name="xalan.jar" />
|
1247 |
|
|
<include name="xml-apis.jar" />
|
1248 |
|
|
</fileset>
|
1249 |
|
|
<fileset dir="${build.dir}">
|
1250 |
|
|
<include name="metacat-client.jar" />
|
1251 |
|
|
</fileset>
|
1252 |
|
|
</path>
|
1253 |
|
|
|
1254 |
|
|
<filterset id="configFilters">
|
1255 |
4080
|
daigle
|
<!-- MCD BYE filter token="LSID_AUTHORITY_HOSTNAME"
|
1256 |
|
|
value="${config.hostname}" / -->
|
1257 |
|
|
<!-- MCD BYE filter token="LSID_AUTHORITY_PORT"
|
1258 |
|
|
value="${config.port}" / -->
|
1259 |
|
|
<!-- MCD BYE filter token="METADATA_LABELS"
|
1260 |
|
|
value="${config.metadataLabelLsid}" / -->
|
1261 |
|
|
<!-- MCD BYE filter token="METACAT_SERVER"
|
1262 |
|
|
value="${config.metacatserver}" / -->
|
1263 |
|
|
<!-- MCD BYE filter token="LSID_AUTHORITY_STRING"
|
1264 |
|
|
value="${config.lsidauthority}" / -->
|
1265 |
2737
|
jones
|
</filterset>
|
1266 |
|
|
|
1267 |
|
|
<target name="prepare-lsid"
|
1268 |
|
|
depends="prepare,utilities,clientjar"
|
1269 |
|
|
description="Configure files prior to compilation">
|
1270 |
|
|
<mkdir dir="${lsid.build.dir}" />
|
1271 |
|
|
<!-- Copy the properties file into the build -->
|
1272 |
|
|
<copy file="${conf.dir}/metacat-lsid.properties"
|
1273 |
|
|
tofile="${lsid.build.dir}/WEB-INF/classes/metacat-lsid.properties"
|
1274 |
|
|
overwrite="true">
|
1275 |
|
|
<filterset refid="configFilters" />
|
1276 |
|
|
</copy>
|
1277 |
2817
|
jones
|
<copy file="${conf.dir}/log4j.properties"
|
1278 |
|
|
tofile="${lsid.build.dir}/WEB-INF/classes/log4j.properties"
|
1279 |
|
|
overwrite="true">
|
1280 |
|
|
<filterset refid="configFilters" />
|
1281 |
|
|
</copy>
|
1282 |
2737
|
jones
|
<!-- Copy config files into the build -->
|
1283 |
|
|
<copy todir="${lsid.build.dir}/WEB-INF">
|
1284 |
|
|
<fileset dir="${webinf.dir}"
|
1285 |
|
|
includes="**/*.wsdd" />
|
1286 |
|
|
</copy>
|
1287 |
|
|
<!-- Copy the metadata configuration files into the build -->
|
1288 |
|
|
<mkdir dir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}" />
|
1289 |
|
|
<copy todir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}">
|
1290 |
|
|
<fileset dir="${conf.dir}"
|
1291 |
|
|
includes="**/*.xml" />
|
1292 |
|
|
<fileset dir="${conf.dir}"
|
1293 |
|
|
includes="**/*.xslt" />
|
1294 |
|
|
<filterset refid="configFilters" />
|
1295 |
|
|
</copy>
|
1296 |
|
|
<!-- Copy services files into the build -->
|
1297 |
|
|
<mkdir dir="${lsid.build.dir}/services" />
|
1298 |
|
|
<copy todir="${lsid.build.dir}/services">
|
1299 |
|
|
<fileset dir="${services.dir}" />
|
1300 |
|
|
<filterset refid="configFilters" />
|
1301 |
|
|
</copy>
|
1302 |
2778
|
jones
|
<!-- Copy axis files into the build -->
|
1303 |
|
|
<mkdir dir="${lsid.build.dir}" />
|
1304 |
|
|
<copy todir="${lsid.build.dir}">
|
1305 |
|
|
<fileset dir="${conf.dir}/axis"
|
1306 |
|
|
excludes="*.properties"/>
|
1307 |
|
|
</copy>
|
1308 |
|
|
<mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
|
1309 |
|
|
<copy todir="${lsid.build.dir}/WEB-INF/classes">
|
1310 |
|
|
<fileset dir="${conf.dir}/axis"
|
1311 |
|
|
includes="*.properties"/>
|
1312 |
|
|
</copy>
|
1313 |
2737
|
jones
|
</target>
|
1314 |
|
|
|
1315 |
|
|
<target name="compile-lsid"
|
1316 |
|
|
depends="prepare-lsid"
|
1317 |
|
|
description="Compile Java sources">
|
1318 |
|
|
<mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
|
1319 |
|
|
<javac srcdir="src/edu/ucsb/nceas/metacat/lsid"
|
1320 |
|
|
destdir="${lsid.build.dir}/WEB-INF/classes"
|
1321 |
|
|
debug="${compile.debug}"
|
1322 |
|
|
deprecation="${compile.deprecation}"
|
1323 |
|
|
optimize="${compile.optimize}">
|
1324 |
|
|
<classpath refid="lsid.classpath" />
|
1325 |
|
|
</javac>
|
1326 |
|
|
</target>
|
1327 |
|
|
|
1328 |
|
|
<target name="war-lsid"
|
1329 |
|
|
depends="compile-lsid"
|
1330 |
|
|
description="Create a war file for the application">
|
1331 |
|
|
<mkdir dir="${dist.dir}" />
|
1332 |
|
|
<war destfile="${dist.dir}/${authority.context}.war"
|
1333 |
|
|
webxml="${webinf.dir}/web.xml">
|
1334 |
|
|
<fileset dir="${lsid.build.dir}" />
|
1335 |
|
|
<lib dir="${lsid.lib.dir}">
|
1336 |
|
|
<patternset refid="lsid.jars"/>
|
1337 |
|
|
</lib>
|
1338 |
|
|
<lib dir="${lib.dir}">
|
1339 |
|
|
<patternset refid="lib.jars"/>
|
1340 |
|
|
</lib>
|
1341 |
3059
|
berkley
|
<lib dir="${lib.dir}">
|
1342 |
2737
|
jones
|
<include name="xalan.jar" />
|
1343 |
|
|
<include name="xml-apis.jar" />
|
1344 |
|
|
</lib>
|
1345 |
|
|
<lib dir="${build.dir}">
|
1346 |
|
|
<include name="metacat-client.jar" />
|
1347 |
|
|
</lib>
|
1348 |
|
|
</war>
|
1349 |
|
|
</target>
|
1350 |
|
|
|
1351 |
|
|
<target name="deploy-lsid"
|
1352 |
|
|
depends="war-lsid"
|
1353 |
|
|
description="Deploy LSID war to servlet container">
|
1354 |
4080
|
daigle
|
<delete dir="${dev.deploy.dir}/${authority.context}" />
|
1355 |
|
|
<delete file="${dev.deploy.dir}/${authority.context}.war" />
|
1356 |
|
|
<mkdir dir="${dev.deploy.dir}" />
|
1357 |
|
|
<copy todir="${dev.deploy.dir}">
|
1358 |
2737
|
jones
|
<fileset dir="${dist.dir}" />
|
1359 |
|
|
</copy>
|
1360 |
|
|
</target>
|
1361 |
113
|
jones
|
</project>
|