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