1 |
113
|
jones
|
<?xml version="1.0"?>
|
2 |
1311
|
berkley
|
<!--
|
3 |
670
|
jones
|
* '$RCSfile$'
|
4 |
|
|
* Authors: Matt Jones, Chad Berkley, Jivka Bojilova
|
5 |
|
|
* Copyright: 2000 Regents of the University of California and the
|
6 |
|
|
* National Center for Ecological Analysis and Synthesis
|
7 |
|
|
* For Details: http://www.nceas.ucsb.edu/
|
8 |
113
|
jones
|
*
|
9 |
670
|
jones
|
* '$Author$'
|
10 |
1292
|
tao
|
* '$Date$'
|
11 |
|
|
* '$Revision$'
|
12 |
666
|
jones
|
*
|
13 |
670
|
jones
|
* Build file for the Ant cross-platform build system for metacat
|
14 |
|
|
* See http://jakarta.apache.org for details on Ant
|
15 |
113
|
jones
|
*
|
16 |
303
|
jones
|
* usage: ant [compile|jar|install|jdoc]
|
17 |
666
|
jones
|
*
|
18 |
|
|
* This program is free software; you can redistribute it and/or modify
|
19 |
|
|
* it under the terms of the GNU General Public License as published by
|
20 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
21 |
|
|
* (at your option) any later version.
|
22 |
|
|
*
|
23 |
|
|
* This program is distributed in the hope that it will be useful,
|
24 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
|
|
* GNU General Public License for more details.
|
27 |
|
|
*
|
28 |
|
|
* You should have received a copy of the GNU General Public License
|
29 |
|
|
* along with this program; if not, write to the Free Software
|
30 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
31 |
1311
|
berkley
|
-->
|
32 |
329
|
jones
|
<project name="metacat" default="jar" basedir=".">
|
33 |
1929
|
brooke
|
|
34 |
|
|
<property file="build.properties"/> <!-- USER SPECIFIC PROPS -->
|
35 |
|
|
|
36 |
|
|
<target name="check-db">
|
37 |
|
|
<condition property="use-oracle">
|
38 |
|
|
<equals arg1="${database}" arg2="oracle" />
|
39 |
|
|
</condition>
|
40 |
|
|
<condition property="use-postgresql">
|
41 |
|
|
<equals arg1="${database}" arg2="postgresql" />
|
42 |
|
|
</condition>
|
43 |
|
|
<condition property="use-sqlserver">
|
44 |
|
|
<equals arg1="${database}" arg2="sqlserver" />
|
45 |
|
|
</condition>
|
46 |
|
|
</target>
|
47 |
|
|
|
48 |
|
|
<target name="oracle" if="use-oracle">
|
49 |
931
|
jones
|
<!-- Customize these properties if you are using oracle -->
|
50 |
1929
|
brooke
|
<echo message="Using oracle..."/>
|
51 |
925
|
berkley
|
<property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
|
52 |
|
|
<property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
|
53 |
1929
|
brooke
|
<property name="jdbc" value="${jdbc_base}/classes111.zip" />
|
54 |
1744
|
tao
|
<!-- Property to indicate is not MSSQL installation-->
|
55 |
|
|
<property name="other" value="yes"/>
|
56 |
2103
|
jones
|
<property name="install-sql"
|
57 |
|
|
value="xmltables.sql" />
|
58 |
|
|
<property name="upgrade-1.2-sql"
|
59 |
|
|
value="upgrade-db-to-1.2.sql" />
|
60 |
|
|
<property name="upgrade-1.3-sql"
|
61 |
|
|
value="upgrade-db-to-1.3.sql" />
|
62 |
|
|
<property name="upgrade-1.4-sql"
|
63 |
|
|
value="upgrade-db-to-1.4.sql" />
|
64 |
925
|
berkley
|
</target>
|
65 |
1311
|
berkley
|
|
66 |
1929
|
brooke
|
<target name="postgresql" if="use-postgresql">
|
67 |
931
|
jones
|
<!-- Customize these properties if you are using postgres -->
|
68 |
1929
|
brooke
|
<echo message="Using PostgreSQL..."/>
|
69 |
925
|
berkley
|
<property name="dbDriver" value="org.postgresql.Driver"/>
|
70 |
1311
|
berkley
|
<property name="dbAdapter"
|
71 |
931
|
jones
|
value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
|
72 |
1716
|
berkley
|
<property name="jdbc" value="lib/jdbc7.1-1.2.jar" />
|
73 |
1744
|
tao
|
<!-- Property to indicate is not MSSQL installation-->
|
74 |
|
|
<property name="other" value="yes"/>
|
75 |
2103
|
jones
|
<property name="install-sql"
|
76 |
|
|
value="xmltables_postgres.sql" />
|
77 |
|
|
<property name="upgrade-1.2-sql"
|
78 |
|
|
value="upgrade-db-to-1.2_postgres.sql" />
|
79 |
|
|
<property name="upgrade-1.3-sql"
|
80 |
|
|
value="upgrade-db-to-1.3_postgres.sql" />
|
81 |
|
|
<property name="upgrade-1.4-sql"
|
82 |
|
|
value="upgrade-db-to-1.4_postgres.sql" />
|
83 |
1744
|
tao
|
</target>
|
84 |
1739
|
tao
|
|
85 |
1929
|
brooke
|
<target name="sqlserver" if="use-sqlserver">
|
86 |
1739
|
tao
|
<!-- Customize these properties if you are using SQL server -->
|
87 |
1929
|
brooke
|
<echo message="Using SQL Server..."/>
|
88 |
1739
|
tao
|
<property name="dbDriver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
|
89 |
|
|
<property name="dbAdapter"
|
90 |
|
|
value="edu.ucsb.nceas.dbadapter.SqlserverAdapter"/>
|
91 |
1742
|
tao
|
<property name="jdbc" value="${jdbc-base}/msbase.jar" />
|
92 |
1744
|
tao
|
<property name="jdbc-add1" value="${jdbc-base}/msutil.jar" />
|
93 |
|
|
<property name="jdbc-add2" value="${jdbc-base}/mssqlserver.jar" />
|
94 |
|
|
<!-- Property to indicate is a MSSQL installation-->
|
95 |
|
|
<property name="MSSQL" value="yes"/>
|
96 |
2118
|
costa
|
<property name="install-sql"
|
97 |
|
|
value="xmltables-sqlserver.sql" />
|
98 |
1739
|
tao
|
</target>
|
99 |
1311
|
berkley
|
|
100 |
1929
|
brooke
|
<target name="config" depends="check-db,oracle,postgresql,sqlserver">
|
101 |
1814
|
tao
|
<!-- usr for client testing, generally you don't need change-->
|
102 |
1801
|
tao
|
<property name="mcuser" value="uid=tao,o=NCEAS,dc=ecoinformatics,dc=org"/>
|
103 |
1783
|
jones
|
<property name="mcpassword" value=""/>
|
104 |
1801
|
tao
|
<property name="mcanotheruser" value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org"/>
|
105 |
|
|
<property name="mcanotherpassword" value=""/>
|
106 |
|
|
|
107 |
1827
|
jones
|
<property name="debug" value="on" />
|
108 |
2053
|
sgarg
|
<property name="debuglevel" value="55" />
|
109 |
1716
|
berkley
|
|
110 |
1522
|
berkley
|
<property name="morphosourcedir" value="../morpho" />
|
111 |
1570
|
tao
|
<property name="defaultcontenttype" value="application/octet-stream" />
|
112 |
1780
|
jones
|
<property name="utilitiesdir" value="../utilities" />
|
113 |
1811
|
tao
|
|
114 |
931
|
jones
|
<!-- Make sure these paths match the location of the jar files
|
115 |
|
|
on your system, the defaults should usually work -->
|
116 |
1941
|
brooke
|
<condition property="jsdk" value="${tomcat}/lib/common/servlet.jar">
|
117 |
|
|
<equals arg1="${tomcatversion}" arg2="tomcat3" />
|
118 |
|
|
</condition>
|
119 |
|
|
<condition property="jsdk" value="${tomcat}/common/lib/servlet.jar">
|
120 |
|
|
<equals arg1="${tomcatversion}" arg2="tomcat4" />
|
121 |
|
|
</condition>
|
122 |
2011
|
cjones
|
<condition property="jsdk" value="${tomcat}/common/lib/servlet-api.jar">
|
123 |
|
|
<equals arg1="${tomcatversion}" arg2="tomcat5" />
|
124 |
|
|
</condition>
|
125 |
1941
|
brooke
|
<echo>*********** tomcatversion = ${tomcatversion}</echo>
|
126 |
|
|
<echo>*********** set jsdk to ${jsdk}</echo>
|
127 |
1311
|
berkley
|
<property name="xmlp"
|
128 |
1376
|
tao
|
value="lib/xercesImpl.jar" />
|
129 |
1311
|
berkley
|
<property name="cos"
|
130 |
931
|
jones
|
value="lib/cos.jar" />
|
131 |
939
|
tao
|
<property name="morpho"
|
132 |
|
|
value="lib/morpho.jar" />
|
133 |
931
|
jones
|
<property name="xalan"
|
134 |
|
|
value="lib/xalan/xalan.jar" />
|
135 |
|
|
<property name="apis"
|
136 |
|
|
value="lib/xalan/xml-apis.jar" />
|
137 |
1103
|
tao
|
<property name="httpclient"
|
138 |
1780
|
jones
|
value="lib/httpclient.jar" />
|
139 |
1470
|
tao
|
<property name="emlparser"
|
140 |
|
|
value="lib/eml.jar" />
|
141 |
|
|
<property name="configxml"
|
142 |
|
|
value="lib/configxml.jar" />
|
143 |
1578
|
tao
|
<property name="itislib"
|
144 |
|
|
value="lib/itislib.jar" />
|
145 |
1487
|
tao
|
<property name="emlparser"
|
146 |
1941
|
brooke
|
|
147 |
1487
|
tao
|
value="lib/eml.jar" />
|
148 |
1780
|
jones
|
<property name="util"
|
149 |
|
|
value="lib/utilities.jar" />
|
150 |
1103
|
tao
|
</target>
|
151 |
|
|
|
152 |
931
|
jones
|
<target name="init" depends="config">
|
153 |
|
|
<!-- It is less likely you'll need to make any changes from here down,
|
154 |
|
|
but customization is possible -->
|
155 |
1929
|
brooke
|
<property name="installdir" value="${webapps}/${context}" />
|
156 |
|
|
<property name="temp-dir" value="/tmp/${context}" />
|
157 |
|
|
<property name="name" value="metacat"/>
|
158 |
|
|
<property name="Name" value="MetaCat"/>
|
159 |
|
|
<property name="debugprefix" value="${Name}:"/>
|
160 |
1990
|
jones
|
<property name="release" value="1.4.0"/>
|
161 |
1929
|
brooke
|
<property name="replication-path" value="/${context}/servlet/replication"/>
|
162 |
1952
|
jones
|
<property name="servlet-path" value="/${context}/metacat"/>
|
163 |
1929
|
brooke
|
<property name="html-path" value="/${context}"/>
|
164 |
|
|
<property name="systemidserver" value="http://${server}"/>
|
165 |
1933
|
brooke
|
<property name="style-common-relpath"
|
166 |
|
|
value="/style/common"/>
|
167 |
1938
|
brooke
|
<property name="style-common-cvsrelpath"
|
168 |
|
|
value="lib${style-common-relpath}"/>
|
169 |
1929
|
brooke
|
<property name="style-common-fullpath"
|
170 |
1933
|
brooke
|
value="/${installdir}${style-common-relpath}"/>
|
171 |
1929
|
brooke
|
<property name="style-common-path"
|
172 |
1933
|
brooke
|
value="/${context}${style-common-relpath}"/>
|
173 |
1929
|
brooke
|
<property name="style-skins-relpath" value="/style/skins"/>
|
174 |
|
|
<property name="style-skins-path" value="/${context}${style-skins-relpath}"/>
|
175 |
|
|
<property name="replication-log" value="/tmp/metacatreplication.log"/>
|
176 |
1579
|
tao
|
<property name="replicationerrorlog" value="/tmp/metacatreplication.err"/>
|
177 |
1929
|
brooke
|
<property name="config-dir" value="${webapps}/${style-skins-path}" />
|
178 |
|
|
<property name="eml-module" value="eml" />
|
179 |
|
|
<property name="eml-version" value="2.0.0beta6" />
|
180 |
|
|
<property name="eml-tag" value="EML_2_0_0_BETA_6_FOR_METACAT" />
|
181 |
|
|
<property name="eml2-tag" value="EML_2_0_0_FOR_METACAT" />
|
182 |
|
|
<property name="eml2namespace" value="eml://ecoinformatics.org/eml-2.0.0" />
|
183 |
|
|
<property name="stmmlnamespace" value="http://www.xml-cml.org/schema/stmml" />
|
184 |
1933
|
brooke
|
<property name="eml-css" value="eml_xsl.css"/>
|
185 |
|
|
<property name="eml-module.default.css"
|
186 |
|
|
value="default.css"/>
|
187 |
1929
|
brooke
|
<property name="conversion-module" value="webmdentry" />
|
188 |
348
|
jones
|
|
189 |
1929
|
brooke
|
<!-- Config for registry variables -->
|
190 |
1933
|
brooke
|
<property name="scope" value="obfs"/>
|
191 |
|
|
<property name="responseForm" value="genericResponse.tmpl"/>
|
192 |
|
|
<property name="entryForm" value="entryForm.tmpl"/>
|
193 |
|
|
<property name="guide" value="genericGuide.tmpl"/>
|
194 |
1929
|
brooke
|
<property name="confirmData" value="confirmData.tmpl"/>
|
195 |
|
|
<property name="deleteData" value="deleteData.tmpl"/>
|
196 |
|
|
<property name="genericHeader" value="genericHeader.tmpl"/>
|
197 |
|
|
<property name="genericFooter" value="genericFooter.tmpl"/>
|
198 |
|
|
<property name="adminname" value="KNB Support"/>
|
199 |
|
|
<property name="recipient" value="knb-software\@nceas.ucsb.edu"/>
|
200 |
|
|
<filter token="scope" value="${scope}"/>
|
201 |
|
|
<filter token="responseForm" value="${responseForm}"/>
|
202 |
|
|
<filter token="entryForm" value="${entryForm}"/>
|
203 |
|
|
<filter token="guide" value="${guide}"/>
|
204 |
|
|
<filter token="confirmData" value="${confirmData}"/>
|
205 |
|
|
<filter token="deleteData" value="${deleteData}"/>
|
206 |
|
|
<filter token="genericHeader" value="${genericHeader}"/>
|
207 |
|
|
<filter token="genericFooter" value="${genericFooter}"/>
|
208 |
|
|
<filter token="adminname" value="${adminname}"/>
|
209 |
|
|
<filter token="recipient" value="${recipient}"/>
|
210 |
|
|
|
211 |
1311
|
berkley
|
<property name="cpath"
|
212 |
1986
|
jones
|
value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${cos}:${morpho}:${emlparser}:${jdbc-add1}:${jdbc-add2}:${util}:${httpclient}"/>
|
213 |
882
|
jones
|
|
214 |
|
|
<filter token="docrooturl" value="./" />
|
215 |
588
|
berkley
|
<filter token="jdbc-connect" value="${jdbc-connect}"/>
|
216 |
882
|
jones
|
<filter token="dbDriver" value="${dbDriver}"/>
|
217 |
915
|
berkley
|
<filter token="dbAdapter" value="${dbAdapter}"/>
|
218 |
614
|
bojilova
|
<filter token="install-dir" value="${installdir}"/>
|
219 |
1929
|
brooke
|
<filter token="temp-dir" value="${temp-dir}"/>
|
220 |
586
|
berkley
|
<filter token="server" value="${server}"/>
|
221 |
977
|
tao
|
<filter token="systemidserver" value="${systemidserver}"/>
|
222 |
1929
|
brooke
|
<filter token="cgi-prefix" value="${cgi-prefix}"/>
|
223 |
|
|
<filter token="ldapUrl" value="${ldapUrl}"/>
|
224 |
586
|
berkley
|
<filter token="replication-log" value="${replication-log}"/>
|
225 |
1579
|
tao
|
<filter token="replicationerrorlog" value="${replicationerrorlog}"/>
|
226 |
348
|
jones
|
<filter token="release" value="${release}"/>
|
227 |
|
|
<filter token="servlet-path" value="${servlet-path}"/>
|
228 |
359
|
bojilova
|
<filter token="html-path" value="${html-path}"/>
|
229 |
362
|
jones
|
<filter token="user" value="${user}"/>
|
230 |
|
|
<filter token="password" value="${password}"/>
|
231 |
1783
|
jones
|
<filter token="mcuser" value="${mcuser}"/>
|
232 |
|
|
<filter token="mcpassword" value="${mcpassword}"/>
|
233 |
1801
|
tao
|
<filter token="mcanotheruser" value="${mcanotheruser}"/>
|
234 |
|
|
<filter token="mcanotherpassword" value="${mcanotherpassword}"/>
|
235 |
1929
|
brooke
|
<filter token="knb-site-url" value="${knb-site-url}"/>
|
236 |
1933
|
brooke
|
<filter token="eml-css" value="${eml-css}"/>
|
237 |
1929
|
brooke
|
<filter token="style-skins-relpath" value="${style-skins-relpath}"/>
|
238 |
|
|
<filter token="style-skins-path" value="${style-skins-path}"/>
|
239 |
|
|
<filter token="style-common-relpath" value="${style-common-relpath}"/>
|
240 |
|
|
<filter token="style-common-fullpath" value="${style-common-fullpath}"/>
|
241 |
|
|
<filter token="style-common-path" value="${style-common-path}"/>
|
242 |
|
|
<!-- The "style-path" filter is used by the eml xsl stylesheets!! -->
|
243 |
|
|
<filter token="style-path" value="${style-skins-path}"/>
|
244 |
525
|
berkley
|
<filter token="replication-path" value="${replication-path}"/>
|
245 |
832
|
jones
|
<filter token="config-dir" value="${config-dir}"/>
|
246 |
|
|
<filter token="default-style" value="${default-style}"/>
|
247 |
877
|
jones
|
<filter token="eml-version" value="${eml-version}"/>
|
248 |
1570
|
tao
|
<filter token="eml2namespace" value="${eml2namespace}"/>
|
249 |
1718
|
tao
|
<filter token="stmmlnamespace" value="${stmmlnamespace}"/>
|
250 |
1009
|
tao
|
<filter token="context" value="${context}"/>
|
251 |
1292
|
tao
|
<filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" />
|
252 |
1051
|
tao
|
<filter token="debuglevel" value="${debuglevel}" />
|
253 |
1079
|
tao
|
<filter token="datafilepath" value="${datafilepath}" />
|
254 |
1455
|
tao
|
<filter token="inlinedatafilepath" value="${inlinedatafilepath}" />
|
255 |
1522
|
berkley
|
<filter token="defaultcontenttype" value="${defaultcontenttype}" />
|
256 |
1538
|
berkley
|
<filter token="debugprefix" value="${debugprefix}"/>
|
257 |
1487
|
tao
|
|
258 |
254
|
jones
|
<property name="srcdir" value="./src" />
|
259 |
1783
|
jones
|
<property name="testdir" value="./test" />
|
260 |
|
|
<property name="testtorun" value="MetacatClientTest" />
|
261 |
1116
|
tao
|
<property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
|
262 |
|
|
<property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
|
263 |
348
|
jones
|
<property name="build.dir" value="./build"/>
|
264 |
|
|
<property name="build.src" value="${build.dir}/src"/>
|
265 |
|
|
<property name="build.dest" value="${build.dir}/classes"/>
|
266 |
516
|
jones
|
<property name="build.docs" value="${build.dir}/docs"/>
|
267 |
348
|
jones
|
<property name="build.samples" value="${build.dir}/samples"/>
|
268 |
|
|
<property name="build.tests" value="${build.dir}/tests"/>
|
269 |
1778
|
tao
|
<property name="build.tmp" value="${build.dir}/tmp"/>
|
270 |
1116
|
tao
|
<property name="build.metacattest" value="${build.tests}/metacattest"/>
|
271 |
|
|
<property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
|
272 |
348
|
jones
|
<property name="build.data" value="${build.dir}/data"/>
|
273 |
806
|
jones
|
<property name="build.javadocs" value="${build.dir}/docs/api"/>
|
274 |
1952
|
jones
|
<property name="build.war" value="${build.dir}/war"/>
|
275 |
348
|
jones
|
|
276 |
882
|
jones
|
<property name="dist.dir" value="dist"/>
|
277 |
806
|
jones
|
<property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
|
278 |
|
|
<property name="ver.src" value="${ver.dir}/src"/>
|
279 |
|
|
|
280 |
254
|
jones
|
<property name="package.home" value="edu/ucsb/nceas/metacat" />
|
281 |
113
|
jones
|
</target>
|
282 |
1311
|
berkley
|
|
283 |
348
|
jones
|
<target name="prepare" depends="init">
|
284 |
|
|
<mkdir dir="${build.dir}"/>
|
285 |
|
|
<mkdir dir="${build.src}"/>
|
286 |
|
|
<mkdir dir="${build.dest}"/>
|
287 |
516
|
jones
|
<mkdir dir="${build.javadocs}"/>
|
288 |
1778
|
tao
|
<mkdir dir="${build.tmp}"/>
|
289 |
348
|
jones
|
|
290 |
822
|
jones
|
<copy todir="${build.src}" filtering="yes">
|
291 |
|
|
<fileset dir="${srcdir}">
|
292 |
|
|
<include name="edu/**"/>
|
293 |
|
|
<include name="com/**"/>
|
294 |
877
|
jones
|
<include name="**/*.sql"/>
|
295 |
822
|
jones
|
<exclude name="**/CVS*"/>
|
296 |
|
|
<exclude name="**/.#*"/>
|
297 |
|
|
</fileset>
|
298 |
|
|
</copy>
|
299 |
1954
|
jones
|
<available file="build/tmp/${conversion-module}" type="dir"
|
300 |
|
|
property="styles.not.needed"/>
|
301 |
348
|
jones
|
</target>
|
302 |
|
|
|
303 |
1939
|
brooke
|
<target name="compile" depends="prepare,utilities"
|
304 |
1986
|
jones
|
description="Compiles java code to build dir, and copies metacat props files there">
|
305 |
1939
|
brooke
|
|
306 |
1311
|
berkley
|
<javac srcdir="${build.src}"
|
307 |
|
|
destdir="${build.dest}"
|
308 |
|
|
classpath="${cpath}"
|
309 |
1827
|
jones
|
debug="${debug}"
|
310 |
1819
|
tao
|
excludes="**/*.sql **/stringclient/** **/client/*.java"/>
|
311 |
1311
|
berkley
|
</target>
|
312 |
113
|
jones
|
|
313 |
1939
|
brooke
|
<target name="jar" depends="compile"
|
314 |
|
|
description="Compiles and jars metacat java code to metacat.jar in build dir">
|
315 |
|
|
|
316 |
353
|
jones
|
<delete file="${build.dir}/${name}.jar" />
|
317 |
635
|
jones
|
<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
|
318 |
|
|
excludes="**/protocols/" />
|
319 |
1311
|
berkley
|
</target>
|
320 |
|
|
|
321 |
1939
|
brooke
|
<target name="protocol" depends="compile"
|
322 |
|
|
description="Compiles and jars protocol java code to protocol.jar in build dir">
|
323 |
635
|
jones
|
<delete file="${build.dir}/protocol.jar" />
|
324 |
|
|
<jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
|
325 |
|
|
includes="**/protocols/" />
|
326 |
1311
|
berkley
|
</target>
|
327 |
113
|
jones
|
|
328 |
1780
|
jones
|
<target name="utilities" depends="config">
|
329 |
1796
|
jones
|
<ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
|
330 |
|
|
<ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
|
331 |
1780
|
jones
|
<copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
|
332 |
|
|
<copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
|
333 |
|
|
</target>
|
334 |
|
|
|
335 |
1939
|
brooke
|
<target name="client" depends="utilities, prepare"
|
336 |
|
|
description="Compiles metacat-client java code to build dir">
|
337 |
1780
|
jones
|
<javac srcdir="${build.src}"
|
338 |
|
|
destdir="${build.dest}"
|
339 |
|
|
classpath="${cpath}"
|
340 |
|
|
includes="edu/ucsb/nceas/metacat/client/*" />
|
341 |
|
|
</target>
|
342 |
|
|
|
343 |
1939
|
brooke
|
<target name="clientjar" depends="client"
|
344 |
|
|
description="Compiles and jars metacat-client java code to metacat-client.jar in build dir">
|
345 |
1780
|
jones
|
<delete file="${build.dir}/${name}-client.jar" />
|
346 |
|
|
<jar jarfile="${build.dir}/${name}-client.jar" basedir="${build.dest}"
|
347 |
|
|
includes="**/metacat/client/" />
|
348 |
|
|
</target>
|
349 |
|
|
|
350 |
2059
|
costa
|
<target name="harvester" depends="client"
|
351 |
1950
|
costa
|
description="Compiles harvester java code to build dir">
|
352 |
|
|
<echo message="classpath is: ${cpath}"/>
|
353 |
|
|
<javac srcdir="${build.src}"
|
354 |
|
|
destdir="${build.dest}"
|
355 |
|
|
classpath="${cpath}"
|
356 |
|
|
includes="edu/ucsb/nceas/metacat/harvesterClient/*" />
|
357 |
|
|
</target>
|
358 |
|
|
|
359 |
|
|
<target name="harvesterjar" depends="harvester"
|
360 |
2059
|
costa
|
description="Compiles and jars harvester java code to harvester.jar in build dir">
|
361 |
|
|
<delete file="${build.dir}/harvester.jar" />
|
362 |
|
|
<jar jarfile="${build.dir}/harvester.jar" basedir="${build.dest}"
|
363 |
1950
|
costa
|
includes="**/metacat/harvesterClient/" />
|
364 |
|
|
</target>
|
365 |
|
|
|
366 |
1939
|
brooke
|
<target name="geteml" depends="getemlpre2,geteml2+"
|
367 |
|
|
description="Calls getemlpre2 and geteml2+ targets" />
|
368 |
|
|
|
369 |
|
|
<target name="getemlpre2" depends="prepare"
|
370 |
|
|
description="Checks EML-beta6 out of cvs and copies dtds and xsl to your metacat cvs sandbox">
|
371 |
1612
|
tao
|
<echo>Enter CVS password: </echo>
|
372 |
|
|
<cvs cvsRoot="${cvsroot}"
|
373 |
|
|
package="${eml-module}"
|
374 |
|
|
tag="${eml-tag}"
|
375 |
1939
|
brooke
|
dest="${build.tmp}/eml_${eml-tag}" />
|
376 |
1612
|
tao
|
<mkdir dir="lib/dtd" />
|
377 |
|
|
<copy todir="lib/dtd" filtering="yes">
|
378 |
1939
|
brooke
|
<fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}">
|
379 |
1612
|
tao
|
<include name="*.dtd"/>
|
380 |
|
|
</fileset>
|
381 |
|
|
<mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
|
382 |
|
|
</copy>
|
383 |
1939
|
brooke
|
<antcall target="copyxsl">
|
384 |
|
|
<param name="cvs.tagname" value="${eml-tag}" />
|
385 |
|
|
</antcall>
|
386 |
|
|
</target>
|
387 |
|
|
|
388 |
|
|
<target name="geteml2+" depends="prepare"
|
389 |
|
|
description="Checks eml-2 out of cvs and copies schema and xsl to your metacat cvs sandbox">
|
390 |
|
|
<echo>Enter CVS password: </echo>
|
391 |
1612
|
tao
|
<cvs cvsRoot="${cvsroot}"
|
392 |
|
|
package="${eml-module}"
|
393 |
|
|
tag="${eml2-tag}"
|
394 |
1939
|
brooke
|
dest="${build.tmp}/eml_${eml2-tag}" />
|
395 |
1612
|
tao
|
<mkdir dir="lib/schema" />
|
396 |
|
|
<copy todir="lib/schema" filtering="yes">
|
397 |
1939
|
brooke
|
<fileset dir="${build.tmp}/eml_${eml2-tag}/${eml-module}">
|
398 |
1612
|
tao
|
<include name="*.xsd"/>
|
399 |
|
|
</fileset>
|
400 |
1939
|
brooke
|
|
401 |
|
|
<!-- shouldn't we have a mapper here like this??
|
402 |
|
|
<mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" />
|
403 |
|
|
|
404 |
|
|
Jing's code didn't nave one - does it need to be added?
|
405 |
|
|
NOTE that eml-version is set to beta 6, so this would need changing -->
|
406 |
|
|
|
407 |
1612
|
tao
|
</copy>
|
408 |
1939
|
brooke
|
<antcall target="copyxsl">
|
409 |
|
|
<param name="cvs.tagname" value="${eml2-tag}" />
|
410 |
|
|
</antcall>
|
411 |
|
|
</target>
|
412 |
|
|
|
413 |
|
|
|
414 |
|
|
|
415 |
|
|
<target name="copyxsl"
|
416 |
|
|
description="Copies xsl stylesheets from checkout in build/tmp to your metacat cvs sandbox">
|
417 |
|
|
|
418 |
|
|
<delete file="${style-common-cvsrelpath}/${eml-css}"/>
|
419 |
|
|
|
420 |
1938
|
brooke
|
<copy todir="${style-common-cvsrelpath}" filtering="yes">
|
421 |
1939
|
brooke
|
<fileset dir="${build.tmp}/eml_${cvs.tagname}/${eml-module}/style">
|
422 |
1929
|
brooke
|
<include name="**/*.xsl"/>
|
423 |
1612
|
tao
|
</fileset>
|
424 |
|
|
</copy>
|
425 |
1933
|
brooke
|
|
426 |
1939
|
brooke
|
|
427 |
1933
|
brooke
|
<!-- now copy default css from eml module and put it in style-common-path
|
428 |
|
|
dir with a new name, so other skin-specific css can import it if reqd -->
|
429 |
1939
|
brooke
|
<copy file="${build.tmp}/eml_${cvs.tagname}/${eml-module}/${eml-module.default.css}"
|
430 |
1938
|
brooke
|
tofile="${style-common-cvsrelpath}/${eml-css}" />
|
431 |
1612
|
tao
|
|
432 |
1463
|
tao
|
</target>
|
433 |
1939
|
brooke
|
|
434 |
|
|
|
435 |
|
|
|
436 |
|
|
<target name="dtdschemasql" depends="prepare"
|
437 |
|
|
description="Registers the DTDs with the new Metacat instance">
|
438 |
877
|
jones
|
<echo/>
|
439 |
|
|
<echo>Registering the DTDs with the new Metacat instance...</echo>
|
440 |
|
|
<sql driver="${dbDriver}"
|
441 |
1744
|
tao
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
442 |
877
|
jones
|
url="${jdbc-connect}"
|
443 |
|
|
userid="${user}"
|
444 |
|
|
password="${password}"
|
445 |
1593
|
tao
|
src="${build.src}/loaddtdschema.sql" />
|
446 |
877
|
jones
|
</target>
|
447 |
1716
|
berkley
|
|
448 |
1939
|
brooke
|
<target name="schemasql" depends="prepare"
|
449 |
|
|
description="Registers the Schema with the new Metacat instance">
|
450 |
1570
|
tao
|
<echo/>
|
451 |
1939
|
brooke
|
<echo>Registering the Schema with the new Metacat instance...</echo>
|
452 |
1570
|
tao
|
<sql driver="${dbDriver}"
|
453 |
1744
|
tao
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
454 |
1570
|
tao
|
url="${jdbc-connect}"
|
455 |
|
|
userid="${user}"
|
456 |
|
|
password="${password}"
|
457 |
|
|
src="${build.src}/loadschema.sql" />
|
458 |
|
|
</target>
|
459 |
1801
|
tao
|
|
460 |
1939
|
brooke
|
<target name="installdb" depends="prepare"
|
461 |
|
|
description="Installs the database tables">
|
462 |
1827
|
jones
|
<echo/>
|
463 |
|
|
<echo>Installing the database tables...</echo>
|
464 |
|
|
<sql driver="${dbDriver}"
|
465 |
|
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
466 |
|
|
url="${jdbc-connect}"
|
467 |
|
|
userid="${user}"
|
468 |
|
|
password="${password}"
|
469 |
2103
|
jones
|
src="${build.src}/${install-sql}" />
|
470 |
1827
|
jones
|
</target>
|
471 |
|
|
|
472 |
1939
|
brooke
|
<target name="upgrade12" depends="prepare"
|
473 |
|
|
description="Updates the database tables to upgrade to version 1.2">
|
474 |
1827
|
jones
|
<echo/>
|
475 |
|
|
<echo>Updating the database tables to upgrade to version 1.2...</echo>
|
476 |
|
|
<sql driver="${dbDriver}"
|
477 |
|
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
478 |
|
|
url="${jdbc-connect}"
|
479 |
|
|
userid="${user}"
|
480 |
|
|
password="${password}"
|
481 |
2103
|
jones
|
src="${build.src}/${upgrade-1.2-sql}" />
|
482 |
1827
|
jones
|
</target>
|
483 |
|
|
|
484 |
1939
|
brooke
|
<target name="upgrade13" depends="prepare"
|
485 |
|
|
description="Updates the database tables to upgrade to version 1.3">
|
486 |
1827
|
jones
|
<echo/>
|
487 |
|
|
<echo>Updating the database tables to upgrade to version 1.3...</echo>
|
488 |
|
|
<sql driver="${dbDriver}"
|
489 |
|
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
490 |
|
|
url="${jdbc-connect}"
|
491 |
|
|
userid="${user}"
|
492 |
|
|
password="${password}"
|
493 |
2103
|
jones
|
src="${build.src}/${upgrade-1.3-sql}" />
|
494 |
1827
|
jones
|
</target>
|
495 |
|
|
|
496 |
2103
|
jones
|
<target name="upgrade14" depends="prepare"
|
497 |
|
|
description="Updates the database tables to upgrade to version 1.4">
|
498 |
|
|
<echo/>
|
499 |
|
|
<echo>Updating the database tables to upgrade to version 1.4...</echo>
|
500 |
|
|
<sql driver="${dbDriver}"
|
501 |
|
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
502 |
|
|
url="${jdbc-connect}"
|
503 |
|
|
userid="${user}"
|
504 |
|
|
password="${password}"
|
505 |
|
|
src="${build.src}/${upgrade-1.4-sql}" />
|
506 |
|
|
</target>
|
507 |
|
|
|
508 |
1952
|
jones
|
<target name="install" depends="war" description="* Full Install *">
|
509 |
1079
|
tao
|
<mkdir dir="${datafilepath}" />
|
510 |
1455
|
tao
|
<mkdir dir="${inlinedatafilepath}" />
|
511 |
1079
|
tao
|
<chmod dir="${datafilepath}" perm="ug+w" />
|
512 |
1929
|
brooke
|
<mkdir dir="${temp-dir}"/>
|
513 |
|
|
<chmod dir="${temp-dir}" perm="ug+w" />
|
514 |
1952
|
jones
|
<copy file="${build.dir}/${context}.war" todir="${webapps}"/>
|
515 |
|
|
</target>
|
516 |
|
|
|
517 |
|
|
<target name="upgrade" depends="install"
|
518 |
|
|
description="* Upgrade an existing metacat installation with a new version *">
|
519 |
|
|
<unwar src="${webapps}/${context}.war" dest="${webapps}/${context}" />
|
520 |
|
|
</target>
|
521 |
|
|
|
522 |
1954
|
jones
|
<target name="install-registry" depends="init,getConversionXSL"
|
523 |
1952
|
jones
|
description="Install Registry">
|
524 |
|
|
|
525 |
|
|
<copy file="${srcdir}/perl/register-dataset.cgi"
|
526 |
|
|
todir="${inst.cgi.dir}" filtering="yes"/>
|
527 |
|
|
<chmod file="${inst.cgi.dir}/register-dataset.cgi" perm="ugo+x" />
|
528 |
|
|
|
529 |
|
|
<mkdir dir="${temp-dir}" />
|
530 |
|
|
<copy todir="${temp-dir}" filtering="yes">
|
531 |
|
|
<fileset dir="${build.tmp}/${conversion-module}/lib/style">
|
532 |
|
|
<include name="*.xsl"/>
|
533 |
|
|
<include name="*.xml"/>
|
534 |
|
|
</fileset>
|
535 |
|
|
</copy>
|
536 |
|
|
|
537 |
|
|
<echo message="Install Registry completed." />
|
538 |
|
|
</target>
|
539 |
|
|
|
540 |
2052
|
sgarg
|
<target name="install-skin" depends="init"
|
541 |
|
|
description="Install a Skin">
|
542 |
|
|
|
543 |
|
|
<input message="Please enter name of the skin"
|
544 |
|
|
addproperty="skin-name"/>
|
545 |
|
|
|
546 |
|
|
<mkdir dir="${installdir}/style/skins/${skin-name}" />
|
547 |
|
|
<copy todir="${installdir}/style/skins/${skin-name}" filtering="yes">
|
548 |
|
|
<fileset dir="lib/style/skins/${skin-name}">
|
549 |
2054
|
sgarg
|
<include name="*.*"/>
|
550 |
|
|
<exclude name="*.png"/>
|
551 |
|
|
<exclude name="*.gif"/>
|
552 |
2052
|
sgarg
|
</fileset>
|
553 |
|
|
</copy>
|
554 |
2054
|
sgarg
|
<copy todir="${installdir}/style/skins/${skin-name}" filtering="no">
|
555 |
|
|
<fileset dir="lib/style/skins/${skin-name}">
|
556 |
|
|
<include name="*.png"/>
|
557 |
|
|
<include name="*.gif"/>
|
558 |
|
|
</fileset>
|
559 |
|
|
</copy>
|
560 |
2052
|
sgarg
|
|
561 |
|
|
<echo message="Install Skin completed." />
|
562 |
|
|
</target>
|
563 |
|
|
|
564 |
1952
|
jones
|
<target name="war" depends="warPrepare,warMSSQL"
|
565 |
|
|
description="Create a web archive (WAR) for servlet deployment">
|
566 |
|
|
<war destfile="${build.dir}/${context}.war"
|
567 |
|
|
webxml="${build.war}/web.xml">
|
568 |
|
|
<fileset dir="${war.context}"/>
|
569 |
|
|
<lib dir="${war.lib}"/>
|
570 |
|
|
<webinf dir="${war.webinf}"/>
|
571 |
|
|
</war>
|
572 |
|
|
</target>
|
573 |
|
|
|
574 |
2059
|
costa
|
<target name="warPrepare" depends="jar,clientjar,harvesterjar"
|
575 |
1952
|
jones
|
description="Prepare files for creating a web archive (WAR)">
|
576 |
|
|
|
577 |
|
|
<property name="war.lib" value="${build.war}/lib" />
|
578 |
|
|
<property name="war.webinf" value="${build.war}/WEB-INF" />
|
579 |
|
|
<property name="war.context" value="${build.war}/${context}" />
|
580 |
|
|
<mkdir dir="${war.lib}" />
|
581 |
|
|
<mkdir dir="${war.webinf}" />
|
582 |
|
|
<mkdir dir="${war.context}" />
|
583 |
|
|
|
584 |
|
|
<copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
|
585 |
|
|
<copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
|
586 |
2059
|
costa
|
<copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
|
587 |
1952
|
jones
|
<copy todir="${war.lib}" filtering="no">
|
588 |
1823
|
jones
|
<fileset dir="lib">
|
589 |
|
|
<include name="*.jar"/>
|
590 |
|
|
</fileset>
|
591 |
|
|
<fileset dir="lib/xalan">
|
592 |
|
|
<include name="*.jar"/>
|
593 |
|
|
</fileset>
|
594 |
|
|
</copy>
|
595 |
1952
|
jones
|
<copy file="${jdbc}" tofile="${war.lib}/jdbc.jar" />
|
596 |
1729
|
tao
|
<copy file="lib/web.xml.${tomcatversion}"
|
597 |
1952
|
jones
|
tofile="${build.war}/web.xml" />
|
598 |
|
|
<copy file="lib/metacat.properties" todir="${war.webinf}"
|
599 |
1951
|
jones
|
filtering="yes" />
|
600 |
1952
|
jones
|
<copy todir="${war.context}" filtering="no">
|
601 |
822
|
jones
|
<fileset dir="lib">
|
602 |
|
|
<include name="**/*.jpg"/>
|
603 |
|
|
<include name="**/*.png"/>
|
604 |
|
|
<include name="**/*.gif"/>
|
605 |
|
|
</fileset>
|
606 |
|
|
</copy>
|
607 |
1952
|
jones
|
<copy todir="${war.context}" filtering="yes">
|
608 |
822
|
jones
|
<fileset dir="lib">
|
609 |
|
|
<exclude name="*.jar"/>
|
610 |
|
|
<exclude name="*.properties"/>
|
611 |
|
|
<exclude name="web.xml"/>
|
612 |
1437
|
berkley
|
<exclude name="**/*.jpg"/>
|
613 |
|
|
<exclude name="**/*.png"/>
|
614 |
|
|
<exclude name="**/*.gif"/>
|
615 |
822
|
jones
|
</fileset>
|
616 |
|
|
</copy>
|
617 |
1952
|
jones
|
<copy todir="${war.context}" filtering="no">
|
618 |
1929
|
brooke
|
<fileset dir="lib">
|
619 |
|
|
<include name="**/*.jpg"/>
|
620 |
|
|
<include name="**/*.png"/>
|
621 |
|
|
<include name="**/*.gif"/>
|
622 |
|
|
</fileset>
|
623 |
|
|
</copy>
|
624 |
1311
|
berkley
|
</target>
|
625 |
1929
|
brooke
|
|
626 |
1952
|
jones
|
<target name="warMSSQL" if="MSSQL" depends="warPrepare">
|
627 |
|
|
<copy file="${jdbc-add1}" tofile="${war.lib}/msutil.jar" />
|
628 |
|
|
<copy file="${jdbc-add2}" tofile="${war.lib}/mssqlserver.jar" />
|
629 |
1929
|
brooke
|
</target>
|
630 |
|
|
|
631 |
1954
|
jones
|
<target name="getConversionXSL" depends="prepare"
|
632 |
|
|
unless="styles.not.needed"
|
633 |
1939
|
brooke
|
description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
|
634 |
1929
|
brooke
|
<echo>Enter CVS password: </echo>
|
635 |
|
|
<cvs cvsRoot="${cvsroot-alternate}"
|
636 |
|
|
package="${conversion-module}"
|
637 |
|
|
dest="${build.tmp}" />
|
638 |
|
|
</target>
|
639 |
|
|
|
640 |
1822
|
jones
|
<target name="testprep" depends="jar,clientjar">
|
641 |
1783
|
jones
|
<mkdir dir="${build.tests}"/>
|
642 |
|
|
<copy todir="${build.tests}" filtering="yes">
|
643 |
|
|
<fileset dir="${testdir}">
|
644 |
|
|
<include name="edu/**"/>
|
645 |
|
|
</fileset>
|
646 |
|
|
</copy>
|
647 |
971
|
tao
|
<!-- copy and compile the tests into a jar file -->
|
648 |
1783
|
jones
|
<javac srcdir="${build.tests}"
|
649 |
|
|
destdir="${build.tests}"
|
650 |
1822
|
jones
|
classpath="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar"
|
651 |
1612
|
tao
|
debug="on"
|
652 |
1311
|
berkley
|
includes="**/*.java" />
|
653 |
204
|
jones
|
|
654 |
1311
|
berkley
|
<jar jarfile="${build.dir}/${name}-junittests.jar"
|
655 |
1783
|
jones
|
basedir="${build.tests}"
|
656 |
1311
|
berkley
|
includes="**/*.class" />
|
657 |
1822
|
jones
|
</target>
|
658 |
971
|
tao
|
|
659 |
1939
|
brooke
|
<target name="test" depends="testprep"
|
660 |
|
|
description="Uses the ant junit task to run all JUnit tests">
|
661 |
1822
|
jones
|
|
662 |
971
|
tao
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
663 |
1783
|
jones
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
664 |
971
|
tao
|
haltonerror="no">
|
665 |
1783
|
jones
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
|
666 |
971
|
tao
|
<classpath>
|
667 |
1783
|
jones
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/${name}-junittests.jar" />
|
668 |
971
|
tao
|
</classpath>
|
669 |
|
|
|
670 |
|
|
<formatter type="plain" />
|
671 |
|
|
|
672 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
673 |
1783
|
jones
|
<fileset dir="${build.tests}">
|
674 |
1116
|
tao
|
<include name="**/*.class" />
|
675 |
971
|
tao
|
</fileset>
|
676 |
|
|
</batchtest>
|
677 |
|
|
</junit>
|
678 |
|
|
</target>
|
679 |
1103
|
tao
|
|
680 |
1939
|
brooke
|
<target name="runonetest" depends="testprep"
|
681 |
|
|
description="Uses the ant junit task to run a single JUnit test, defined by the ${testtorun} property">
|
682 |
1500
|
tao
|
|
683 |
1939
|
brooke
|
<echo>testtorun: ${testtorun}</echo>
|
684 |
|
|
|
685 |
1500
|
tao
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
686 |
1783
|
jones
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
687 |
1500
|
tao
|
haltonerror="no">
|
688 |
2044
|
tao
|
<!--<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>-->
|
689 |
1500
|
tao
|
<classpath>
|
690 |
1783
|
jones
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/${name}-junittests.jar" />
|
691 |
1500
|
tao
|
</classpath>
|
692 |
|
|
|
693 |
|
|
<formatter type="plain" />
|
694 |
|
|
|
695 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
696 |
1783
|
jones
|
<fileset dir="${build.tests}">
|
697 |
1500
|
tao
|
<include name="**/${testtorun}.class" />
|
698 |
|
|
</fileset>
|
699 |
|
|
</batchtest>
|
700 |
|
|
</junit>
|
701 |
|
|
</target>
|
702 |
|
|
|
703 |
1939
|
brooke
|
<target name="gethttpclient" depends="prepare"
|
704 |
|
|
description="checks out and compiles morpho httpclient code">
|
705 |
1311
|
berkley
|
<!--mkdir dir="${morphosourcedir}" -->
|
706 |
1487
|
tao
|
<cvs cvsRoot="${cvsroot}"
|
707 |
1103
|
tao
|
package="morpho"
|
708 |
|
|
dest="." />
|
709 |
1107
|
tao
|
<ant dir="${morphosourcedir}" inheritAll="false" target="jar" />
|
710 |
1103
|
tao
|
</target>
|
711 |
|
|
|
712 |
|
|
<!-- run this target, we need to check out a another morpho souce dir was checked out. -->
|
713 |
1939
|
brooke
|
<target name="nettest" depends="install"
|
714 |
|
|
description="compiles and runs the metacatnettest code">
|
715 |
|
|
|
716 |
1103
|
tao
|
<echo>***********************************
|
717 |
1311
|
berkley
|
Please run ant gethttpclient first!
|
718 |
|
|
***********************************
|
719 |
1103
|
tao
|
</echo>
|
720 |
|
|
<!-- copy and compile the tests into a jar file -->
|
721 |
1116
|
tao
|
<mkdir dir="${build.metacatnettest}"/>
|
722 |
1103
|
tao
|
<javac srcdir="${junitnettestsdir}"
|
723 |
1116
|
tao
|
destdir="${build.metacatnettest}"
|
724 |
1103
|
tao
|
classpath="${cpath}:${build.dir}/${name}.jar:${httpclient}"
|
725 |
|
|
includes="**/*.java" />
|
726 |
|
|
|
727 |
|
|
<jar jarfile="${build.dir}/${name}-junitnettests.jar"
|
728 |
1116
|
tao
|
basedir="${build.metacatnettest}"
|
729 |
1103
|
tao
|
includes="**/*.class" />
|
730 |
|
|
|
731 |
|
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
732 |
1107
|
tao
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
733 |
1103
|
tao
|
haltonerror="no">
|
734 |
1107
|
tao
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
|
735 |
1103
|
tao
|
<classpath>
|
736 |
1807
|
tao
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${httpclient}:${build.dir}/${name}-junitnettests.jar:${itislib}" />
|
737 |
1103
|
tao
|
</classpath>
|
738 |
|
|
|
739 |
|
|
<formatter type="plain" />
|
740 |
|
|
|
741 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
742 |
1116
|
tao
|
<fileset dir="${build.metacatnettest}">
|
743 |
|
|
<include name="**/*.class" />
|
744 |
1103
|
tao
|
</fileset>
|
745 |
|
|
</batchtest>
|
746 |
|
|
</junit>
|
747 |
1311
|
berkley
|
</target>
|
748 |
1103
|
tao
|
|
749 |
1939
|
brooke
|
<target name="cleanweb" depends="clean"
|
750 |
|
|
description="deletes tomcat web context dir and all its contents">
|
751 |
1522
|
berkley
|
<delete dir="${installdir}" />
|
752 |
|
|
</target>
|
753 |
|
|
|
754 |
|
|
|
755 |
1939
|
brooke
|
<target name="clean" depends="init"
|
756 |
|
|
description="deletes build dir and any files copied to cvs sandbox by build process (jars, xsl) Currently *not* schema/DTDs">
|
757 |
822
|
jones
|
<delete dir="${build.dir}" />
|
758 |
1822
|
jones
|
<delete file="lib/httpclient.jar" />
|
759 |
|
|
<delete file="lib/utilities.jar" />
|
760 |
1939
|
brooke
|
<delete includeEmptyDirs="true" failonerror="false">
|
761 |
|
|
<fileset dir="${style-common-cvsrelpath}">
|
762 |
|
|
<include name="${eml-css}" />
|
763 |
|
|
<include name="eml-*/*.xsl" />
|
764 |
|
|
<include name="eml-*" />
|
765 |
|
|
</fileset>
|
766 |
|
|
</delete>
|
767 |
113
|
jones
|
</target>
|
768 |
|
|
|
769 |
1939
|
brooke
|
<target name="jdoc" depends="prepare"
|
770 |
|
|
description="generates javadoc documentation">
|
771 |
822
|
jones
|
<javadoc packagenames="edu.ucsb.nceas.*"
|
772 |
516
|
jones
|
sourcepath="${build.src}"
|
773 |
|
|
destdir="${build.javadocs}"
|
774 |
113
|
jones
|
author="true"
|
775 |
|
|
version="true"
|
776 |
|
|
use="true"
|
777 |
348
|
jones
|
windowtitle="${Name} API"
|
778 |
|
|
doctitle="<h1>${Name}</h1>"
|
779 |
113
|
jones
|
bottom="<i>Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>"
|
780 |
|
|
/>
|
781 |
|
|
</target>
|
782 |
|
|
|
783 |
1939
|
brooke
|
<target name="dist" depends="jar,protocol,jdoc,geteml"
|
784 |
|
|
description="prepares a full release distribution">
|
785 |
806
|
jones
|
<mkdir dir="${dist.dir}"/>
|
786 |
|
|
<delete dir="${ver.dir}" />
|
787 |
|
|
<mkdir dir="${ver.dir}"/>
|
788 |
|
|
<copy todir="${ver.dir}">
|
789 |
1311
|
berkley
|
<fileset dir="."
|
790 |
882
|
jones
|
excludes="**/CVS* **/.#* **/src* **/test* **/build* **/docs* ${dist.dir}"/>
|
791 |
806
|
jones
|
</copy>
|
792 |
|
|
<copy todir="${ver.dir}" file="build.xml"/>
|
793 |
|
|
<copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
|
794 |
|
|
<copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
|
795 |
882
|
jones
|
|
796 |
|
|
<copy todir="${ver.dir}/docs" filtering="yes">
|
797 |
|
|
<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
|
798 |
|
|
</copy>
|
799 |
|
|
<copy todir="${ver.dir}/docs" filtering="no">
|
800 |
|
|
<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
|
801 |
|
|
</copy>
|
802 |
806
|
jones
|
<copy todir="${ver.dir}/docs/dev">
|
803 |
|
|
<fileset dir="${build.dir}/docs"/>
|
804 |
|
|
</copy>
|
805 |
917
|
berkley
|
<copy todir="${ver.dir}/src">
|
806 |
|
|
<fileset dir="${build.dir}/src"/>
|
807 |
|
|
</copy>
|
808 |
|
|
|
809 |
992
|
berkley
|
<delete dir="./${ver.dir}/${build.dir}"/>
|
810 |
|
|
<delete dir="./${ver.dir}/dist"/>
|
811 |
882
|
jones
|
<delete file="./${name}-${release}.zip"/>
|
812 |
1312
|
tao
|
<zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
813 |
882
|
jones
|
<delete file="./${name}-${release}.tar.gz" />
|
814 |
1312
|
tao
|
<tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
815 |
1311
|
berkley
|
<gzip zipfile="./${name}-${release}.tar.gz"
|
816 |
882
|
jones
|
src="./${name}-${release}.tar"/>
|
817 |
|
|
<delete file="./${name}-${release}.tar" />
|
818 |
1311
|
berkley
|
</target>
|
819 |
806
|
jones
|
|
820 |
1939
|
brooke
|
<target name="distsrc" depends="dist"
|
821 |
|
|
description="prepares a source distribution">
|
822 |
806
|
jones
|
<mkdir dir="${ver.src}"/>
|
823 |
|
|
<copy todir="${ver.src}">
|
824 |
|
|
<fileset dir="./src"/>
|
825 |
|
|
</copy>
|
826 |
|
|
|
827 |
882
|
jones
|
<delete file="./${name}-src-${release}.zip"/>
|
828 |
|
|
<zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
|
829 |
|
|
<delete file="./${name}-src-${release}.tar.gz" />
|
830 |
|
|
<tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
|
831 |
1311
|
berkley
|
<gzip zipfile="./${name}-src-${release}.tar.gz"
|
832 |
882
|
jones
|
src="./${name}-src-${release}.tar"/>
|
833 |
|
|
<delete file="./${name}-src-${release}.tar" />
|
834 |
807
|
jones
|
<delete dir="${dist.dir}"/>
|
835 |
1311
|
berkley
|
</target>
|
836 |
806
|
jones
|
|
837 |
1702
|
tao
|
<target name="stylesheettest">
|
838 |
1939
|
brooke
|
<xslt in="${input}" out="eml.html" style="${style-common-cvsrelpath}/eml-2.0.0/eml-2.0.0.xsl">
|
839 |
1702
|
tao
|
<param name="displaymodule" expression="${displaymodule}"/>
|
840 |
|
|
<param name="docid" expression="${input}"/>
|
841 |
|
|
<param name="entitytype" expression="${entitytype}"/>
|
842 |
|
|
<param name="entityindex" expression="${entityindex}"/>
|
843 |
|
|
<outputproperty name="method" value="html"/>
|
844 |
|
|
<outputproperty name="standalone" value="yes"/>
|
845 |
|
|
<outputproperty name="encoding" value="iso8859_1"/>
|
846 |
|
|
<outputproperty name="indent" value="yes"/>
|
847 |
|
|
</xslt>
|
848 |
|
|
</target>
|
849 |
1811
|
tao
|
|
850 |
1819
|
tao
|
<target name="gridinit" depends="init">
|
851 |
|
|
<property name="java2wsdl.tool" value="org.apache.axis.wsdl.Java2WSDL" />
|
852 |
|
|
<property name="wsdldecorator.tool" value="org.globus.ogsa.tools.wsdl.DecorateWSDL" />
|
853 |
|
|
<property name="wsdl.tool" value="org.globus.ogsa.tools.wsdl.GSDL2Java"/>
|
854 |
|
|
<property environment="env"/>
|
855 |
|
|
<property name="binding.file" value="${env.GLOBUS_LOCATION}/schema/ogsi/ogsi_bindings.wsdl"/>
|
856 |
1820
|
tao
|
<path id="webservicepath">
|
857 |
|
|
<pathelement location="."/>
|
858 |
|
|
<pathelement location="${env.JAVA_HOME}/../lib/tools.jar"/>
|
859 |
|
|
<pathelement location="${build.dest}"/>
|
860 |
|
|
<fileset dir="${env.GLOBUS_LOCATION}/lib">
|
861 |
|
|
<include name="*.jar"/>
|
862 |
|
|
</fileset>
|
863 |
|
|
</path>
|
864 |
1819
|
tao
|
</target>
|
865 |
|
|
|
866 |
1821
|
tao
|
<target name="gridprepare" depends="gridinit, prepare">
|
867 |
1819
|
tao
|
</target>
|
868 |
1811
|
tao
|
|
869 |
1821
|
tao
|
<target name="compileinterface" depends="clean, gridprepare">
|
870 |
1817
|
tao
|
<javac srcdir="${build.src}" destdir="${build.dest}" includes="**/${interface.name}.java" />
|
871 |
1811
|
tao
|
</target>
|
872 |
|
|
|
873 |
|
|
<target name="generateWSDL" depends="compileinterface">
|
874 |
|
|
<echo message="Generating wsdl from ${interface.name} interface"/>
|
875 |
|
|
<java classname="${java2wsdl.tool}"
|
876 |
1814
|
tao
|
dir="${build.src}" fork="yes"
|
877 |
1811
|
tao
|
classpathref="webservicepath" failonerror="true" >
|
878 |
|
|
<arg value="-P"/>
|
879 |
|
|
<arg value="${interface.name}PortType"/>
|
880 |
|
|
<arg value="-S"/>
|
881 |
|
|
<arg value="${interface.name}Service"/>
|
882 |
|
|
<arg value="-y"/>
|
883 |
|
|
<arg value="WRAPPED"/>
|
884 |
|
|
<arg value="-u"/>
|
885 |
|
|
<arg value="LITERAL"/>
|
886 |
|
|
<arg value="-l"/>
|
887 |
|
|
<arg value="http://localhost/ogsa/services/${interface.name}Service"/>
|
888 |
|
|
<arg value="-n"/>
|
889 |
|
|
<arg value="http://${services.namespace}/${interface.name}"/>
|
890 |
|
|
<arg value="${interface.package}.${interface.name}"/>
|
891 |
|
|
</java>
|
892 |
|
|
</target>
|
893 |
|
|
|
894 |
|
|
<target name="decorateWSDL" depends="generateWSDL">
|
895 |
|
|
<property name="wsdl.file" value="${interface.name}Service.wsdl"/>
|
896 |
1814
|
tao
|
<java classname="${wsdldecorator.tool}" dir="${build.src}"
|
897 |
1811
|
tao
|
fork="yes"
|
898 |
|
|
classpathref="webservicepath" failonerror="true" >
|
899 |
|
|
<arg value="${binding.file}"/>
|
900 |
|
|
<arg value="${wsdl.file}"/>
|
901 |
|
|
</java>
|
902 |
|
|
</target>
|
903 |
|
|
|
904 |
|
|
<target name="generatestubs" depends="decorateWSDL">
|
905 |
|
|
<echo message=" Generating stubs " />
|
906 |
1814
|
tao
|
<echo message="wsdl file is ${wsdl.file}"/>
|
907 |
|
|
<echo message="build.src is ${build.src}"/>
|
908 |
1811
|
tao
|
<java classname="${wsdl.tool}" dir="${build.src}" fork="yes"
|
909 |
|
|
classpathref="webservicepath" failonerror="true" >
|
910 |
1814
|
tao
|
<arg value="${wsdl.file}"/>
|
911 |
1811
|
tao
|
</java>
|
912 |
|
|
</target>
|
913 |
|
|
|
914 |
|
|
<target name="compileStubsAndImpl" depends="generatestubs, utilities">
|
915 |
|
|
<echo message=" Compiling stubs " />
|
916 |
|
|
<javac srcdir="${build.src}" destdir="${build.dest}" classpathref="webservicepath" includes="**/${interface.name}/*.java" />
|
917 |
|
|
<echo message=" Compiling impl " />
|
918 |
|
|
<javac srcdir="${build.src}" destdir="${build.dest}" classpathref="webservicepath" classpath="./lib/utilities.jar" includes="**/impl/*.java" />
|
919 |
|
|
</target>
|
920 |
|
|
|
921 |
|
|
<target name="jarStubsAndImpl" depends="compileStubsAndImpl">
|
922 |
|
|
<echo message=" jar stubs classes " />
|
923 |
|
|
<jar destfile="${build.dir}/${interface.name}-stubs.jar" basedir="${build.dest}" includes="**/${interface.name}/*.class" />
|
924 |
|
|
<echo message=" jar impl classes " />
|
925 |
|
|
<jar destfile="${build.dir}/${interface.name}.jar" basedir="${build.dest}" includes="**/impl/*.class" />
|
926 |
|
|
</target>
|
927 |
|
|
|
928 |
|
|
<target name="gar" depends="jarStubsAndImpl">
|
929 |
|
|
<echo message=" jar the gar file"/>
|
930 |
|
|
<mkdir dir="${build.dir}/gar"/>
|
931 |
|
|
<mkdir dir="${build.dir}/gar/schema/edu"/>
|
932 |
|
|
<copy file="${build.dir}/${interface.name}.jar" todir="${build.dir}/gar" />
|
933 |
|
|
<copy file="${build.dir}/${interface.name}-stubs.jar" todir="${build.dir}/gar" />
|
934 |
1814
|
tao
|
<copy file="lib/utilities.jar" todir="${build.dir}/gar" />
|
935 |
|
|
<copy file="lib/server-deploy.wsdd" todir="${build.dir}/gar" />
|
936 |
|
|
<copy file="${build.src}/${interface.name}Service.wsdl" todir="${build.dir}/gar/schema/edu" />
|
937 |
|
|
<jar destfile="lib/${interface.name}.gar" basedir="${build.dir}/gar"/>
|
938 |
1811
|
tao
|
</target>
|
939 |
1814
|
tao
|
|
940 |
|
|
<target name="compilewebclient" depends="prepare">
|
941 |
|
|
<javac srcdir="${build.src}" destdir="${build.dest}" includes="**/application/*.java" classpathref="webservicepath" />
|
942 |
|
|
</target>
|
943 |
|
|
|
944 |
|
|
<target name="runwebclient" depends="compilewebclient">
|
945 |
|
|
<java classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
|
946 |
|
|
dir="${build.dest}" fork="yes"
|
947 |
|
|
classpathref="webservicepath" classpath="./lib/utilities.jar" failonerror="true">
|
948 |
|
|
<arg value="${serviceUrl}"/>
|
949 |
|
|
<arg value="${docid}"/>
|
950 |
|
|
</java>
|
951 |
|
|
</target>
|
952 |
113
|
jones
|
</project>
|