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