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 |
2175
|
tao
|
<property name="install-sql"
|
57 |
2103
|
jones
|
value="xmltables.sql" />
|
58 |
2175
|
tao
|
<property name="upgrade-1.2-sql"
|
59 |
2103
|
jones
|
value="upgrade-db-to-1.2.sql" />
|
60 |
2175
|
tao
|
<property name="upgrade-1.3-sql"
|
61 |
2103
|
jones
|
value="upgrade-db-to-1.3.sql" />
|
62 |
2175
|
tao
|
<property name="upgrade-1.4-sql"
|
63 |
2103
|
jones
|
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 |
2175
|
tao
|
<property name="install-sql"
|
76 |
2103
|
jones
|
value="xmltables_postgres.sql" />
|
77 |
2175
|
tao
|
<property name="upgrade-1.2-sql"
|
78 |
2103
|
jones
|
value="upgrade-db-to-1.2_postgres.sql" />
|
79 |
2175
|
tao
|
<property name="upgrade-1.3-sql"
|
80 |
2103
|
jones
|
value="upgrade-db-to-1.3_postgres.sql" />
|
81 |
2175
|
tao
|
<property name="upgrade-1.4-sql"
|
82 |
2103
|
jones
|
value="upgrade-db-to-1.4_postgres.sql" />
|
83 |
1744
|
tao
|
</target>
|
84 |
2175
|
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 |
2175
|
tao
|
<property name="install-sql"
|
97 |
2118
|
costa
|
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 |
2175
|
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 |
2175
|
tao
|
|
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 |
2180
|
tao
|
<property name="systemidserver" value="http://${httpserver}"/>
|
165 |
2175
|
tao
|
<property name="style-common-relpath"
|
166 |
1933
|
brooke
|
value="/style/common"/>
|
167 |
2175
|
tao
|
<property name="style-common-cvsrelpath"
|
168 |
1938
|
brooke
|
value="lib${style-common-relpath}"/>
|
169 |
2175
|
tao
|
<property name="style-common-fullpath"
|
170 |
1933
|
brooke
|
value="/${installdir}${style-common-relpath}"/>
|
171 |
2175
|
tao
|
<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 |
2218
|
sgarg
|
<property name="eml2-tag" value="EML_2_0_0_FOR_METACAT_WITH_BUGFIX" />
|
182 |
2175
|
tao
|
<property name="eml2_0_0namespace" value="eml://ecoinformatics.org/eml-2.0.0" />
|
183 |
|
|
<property name="eml2_1_0namespace" value="eml://ecoinformatics.org/eml-2.1.0" />
|
184 |
1929
|
brooke
|
<property name="stmmlnamespace" value="http://www.xml-cml.org/schema/stmml" />
|
185 |
1933
|
brooke
|
<property name="eml-css" value="eml_xsl.css"/>
|
186 |
|
|
<property name="eml-module.default.css"
|
187 |
|
|
value="default.css"/>
|
188 |
1929
|
brooke
|
<property name="conversion-module" value="webmdentry" />
|
189 |
348
|
jones
|
|
190 |
1929
|
brooke
|
<!-- Config for registry variables -->
|
191 |
1933
|
brooke
|
<property name="scope" value="obfs"/>
|
192 |
|
|
<property name="responseForm" value="genericResponse.tmpl"/>
|
193 |
|
|
<property name="entryForm" value="entryForm.tmpl"/>
|
194 |
|
|
<property name="guide" value="genericGuide.tmpl"/>
|
195 |
1929
|
brooke
|
<property name="confirmData" value="confirmData.tmpl"/>
|
196 |
|
|
<property name="deleteData" value="deleteData.tmpl"/>
|
197 |
|
|
<property name="genericHeader" value="genericHeader.tmpl"/>
|
198 |
|
|
<property name="genericFooter" value="genericFooter.tmpl"/>
|
199 |
|
|
<property name="adminname" value="KNB Support"/>
|
200 |
|
|
<property name="recipient" value="knb-software\@nceas.ucsb.edu"/>
|
201 |
|
|
<filter token="scope" value="${scope}"/>
|
202 |
|
|
<filter token="responseForm" value="${responseForm}"/>
|
203 |
|
|
<filter token="entryForm" value="${entryForm}"/>
|
204 |
2175
|
tao
|
<filter token="guide" value="${guide}"/>
|
205 |
1929
|
brooke
|
<filter token="confirmData" value="${confirmData}"/>
|
206 |
|
|
<filter token="deleteData" value="${deleteData}"/>
|
207 |
|
|
<filter token="genericHeader" value="${genericHeader}"/>
|
208 |
|
|
<filter token="genericFooter" value="${genericFooter}"/>
|
209 |
|
|
<filter token="adminname" value="${adminname}"/>
|
210 |
|
|
<filter token="recipient" value="${recipient}"/>
|
211 |
|
|
|
212 |
1311
|
berkley
|
<property name="cpath"
|
213 |
1986
|
jones
|
value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${cos}:${morpho}:${emlparser}:${jdbc-add1}:${jdbc-add2}:${util}:${httpclient}"/>
|
214 |
882
|
jones
|
|
215 |
|
|
<filter token="docrooturl" value="./" />
|
216 |
588
|
berkley
|
<filter token="jdbc-connect" value="${jdbc-connect}"/>
|
217 |
882
|
jones
|
<filter token="dbDriver" value="${dbDriver}"/>
|
218 |
915
|
berkley
|
<filter token="dbAdapter" value="${dbAdapter}"/>
|
219 |
614
|
bojilova
|
<filter token="install-dir" value="${installdir}"/>
|
220 |
1929
|
brooke
|
<filter token="temp-dir" value="${temp-dir}"/>
|
221 |
586
|
berkley
|
<filter token="server" value="${server}"/>
|
222 |
977
|
tao
|
<filter token="systemidserver" value="${systemidserver}"/>
|
223 |
1929
|
brooke
|
<filter token="cgi-prefix" value="${cgi-prefix}"/>
|
224 |
|
|
<filter token="ldapUrl" value="${ldapUrl}"/>
|
225 |
586
|
berkley
|
<filter token="replication-log" value="${replication-log}"/>
|
226 |
1579
|
tao
|
<filter token="replicationerrorlog" value="${replicationerrorlog}"/>
|
227 |
348
|
jones
|
<filter token="release" value="${release}"/>
|
228 |
|
|
<filter token="servlet-path" value="${servlet-path}"/>
|
229 |
359
|
bojilova
|
<filter token="html-path" value="${html-path}"/>
|
230 |
362
|
jones
|
<filter token="user" value="${user}"/>
|
231 |
|
|
<filter token="password" value="${password}"/>
|
232 |
1783
|
jones
|
<filter token="mcuser" value="${mcuser}"/>
|
233 |
|
|
<filter token="mcpassword" value="${mcpassword}"/>
|
234 |
1801
|
tao
|
<filter token="mcanotheruser" value="${mcanotheruser}"/>
|
235 |
|
|
<filter token="mcanotherpassword" value="${mcanotherpassword}"/>
|
236 |
1929
|
brooke
|
<filter token="knb-site-url" value="${knb-site-url}"/>
|
237 |
1933
|
brooke
|
<filter token="eml-css" value="${eml-css}"/>
|
238 |
1929
|
brooke
|
<filter token="style-skins-relpath" value="${style-skins-relpath}"/>
|
239 |
|
|
<filter token="style-skins-path" value="${style-skins-path}"/>
|
240 |
|
|
<filter token="style-common-relpath" value="${style-common-relpath}"/>
|
241 |
|
|
<filter token="style-common-fullpath" value="${style-common-fullpath}"/>
|
242 |
|
|
<filter token="style-common-path" value="${style-common-path}"/>
|
243 |
|
|
<!-- The "style-path" filter is used by the eml xsl stylesheets!! -->
|
244 |
|
|
<filter token="style-path" value="${style-skins-path}"/>
|
245 |
525
|
berkley
|
<filter token="replication-path" value="${replication-path}"/>
|
246 |
832
|
jones
|
<filter token="config-dir" value="${config-dir}"/>
|
247 |
|
|
<filter token="default-style" value="${default-style}"/>
|
248 |
877
|
jones
|
<filter token="eml-version" value="${eml-version}"/>
|
249 |
2175
|
tao
|
<filter token="eml2_0_0namespace" value="${eml2_0_0namespace}"/>
|
250 |
|
|
<filter token="eml2_1_0namespace" value="${eml2_1_0namespace}"/>
|
251 |
1718
|
tao
|
<filter token="stmmlnamespace" value="${stmmlnamespace}"/>
|
252 |
1009
|
tao
|
<filter token="context" value="${context}"/>
|
253 |
1292
|
tao
|
<filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" />
|
254 |
1051
|
tao
|
<filter token="debuglevel" value="${debuglevel}" />
|
255 |
1079
|
tao
|
<filter token="datafilepath" value="${datafilepath}" />
|
256 |
1455
|
tao
|
<filter token="inlinedatafilepath" value="${inlinedatafilepath}" />
|
257 |
1522
|
berkley
|
<filter token="defaultcontenttype" value="${defaultcontenttype}" />
|
258 |
1538
|
berkley
|
<filter token="debugprefix" value="${debugprefix}"/>
|
259 |
1487
|
tao
|
|
260 |
254
|
jones
|
<property name="srcdir" value="./src" />
|
261 |
1783
|
jones
|
<property name="testdir" value="./test" />
|
262 |
|
|
<property name="testtorun" value="MetacatClientTest" />
|
263 |
1116
|
tao
|
<property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
|
264 |
|
|
<property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
|
265 |
348
|
jones
|
<property name="build.dir" value="./build"/>
|
266 |
|
|
<property name="build.src" value="${build.dir}/src"/>
|
267 |
|
|
<property name="build.dest" value="${build.dir}/classes"/>
|
268 |
516
|
jones
|
<property name="build.docs" value="${build.dir}/docs"/>
|
269 |
348
|
jones
|
<property name="build.samples" value="${build.dir}/samples"/>
|
270 |
|
|
<property name="build.tests" value="${build.dir}/tests"/>
|
271 |
1778
|
tao
|
<property name="build.tmp" value="${build.dir}/tmp"/>
|
272 |
1116
|
tao
|
<property name="build.metacattest" value="${build.tests}/metacattest"/>
|
273 |
|
|
<property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
|
274 |
348
|
jones
|
<property name="build.data" value="${build.dir}/data"/>
|
275 |
806
|
jones
|
<property name="build.javadocs" value="${build.dir}/docs/api"/>
|
276 |
1952
|
jones
|
<property name="build.war" value="${build.dir}/war"/>
|
277 |
348
|
jones
|
|
278 |
882
|
jones
|
<property name="dist.dir" value="dist"/>
|
279 |
806
|
jones
|
<property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
|
280 |
|
|
<property name="ver.src" value="${ver.dir}/src"/>
|
281 |
|
|
|
282 |
254
|
jones
|
<property name="package.home" value="edu/ucsb/nceas/metacat" />
|
283 |
113
|
jones
|
</target>
|
284 |
1311
|
berkley
|
|
285 |
348
|
jones
|
<target name="prepare" depends="init">
|
286 |
|
|
<mkdir dir="${build.dir}"/>
|
287 |
|
|
<mkdir dir="${build.src}"/>
|
288 |
|
|
<mkdir dir="${build.dest}"/>
|
289 |
516
|
jones
|
<mkdir dir="${build.javadocs}"/>
|
290 |
1778
|
tao
|
<mkdir dir="${build.tmp}"/>
|
291 |
348
|
jones
|
|
292 |
822
|
jones
|
<copy todir="${build.src}" filtering="yes">
|
293 |
|
|
<fileset dir="${srcdir}">
|
294 |
|
|
<include name="edu/**"/>
|
295 |
|
|
<include name="com/**"/>
|
296 |
877
|
jones
|
<include name="**/*.sql"/>
|
297 |
822
|
jones
|
<exclude name="**/CVS*"/>
|
298 |
|
|
<exclude name="**/.#*"/>
|
299 |
|
|
</fileset>
|
300 |
|
|
</copy>
|
301 |
2175
|
tao
|
<available file="build/tmp/${conversion-module}" type="dir"
|
302 |
1954
|
jones
|
property="styles.not.needed"/>
|
303 |
348
|
jones
|
</target>
|
304 |
|
|
|
305 |
1939
|
brooke
|
<target name="compile" depends="prepare,utilities"
|
306 |
1986
|
jones
|
description="Compiles java code to build dir, and copies metacat props files there">
|
307 |
1939
|
brooke
|
|
308 |
1311
|
berkley
|
<javac srcdir="${build.src}"
|
309 |
|
|
destdir="${build.dest}"
|
310 |
|
|
classpath="${cpath}"
|
311 |
1827
|
jones
|
debug="${debug}"
|
312 |
2135
|
costa
|
excludes="**/*.sql **/stringclient/** **/client/*.java **/harvesterClient/*.java"/>
|
313 |
1311
|
berkley
|
</target>
|
314 |
113
|
jones
|
|
315 |
1939
|
brooke
|
<target name="jar" depends="compile"
|
316 |
|
|
description="Compiles and jars metacat java code to metacat.jar in build dir">
|
317 |
|
|
|
318 |
353
|
jones
|
<delete file="${build.dir}/${name}.jar" />
|
319 |
635
|
jones
|
<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
|
320 |
2135
|
costa
|
excludes="**/protocols/ **/harvesterClient/" />
|
321 |
1311
|
berkley
|
</target>
|
322 |
|
|
|
323 |
1939
|
brooke
|
<target name="protocol" depends="compile"
|
324 |
|
|
description="Compiles and jars protocol java code to protocol.jar in build dir">
|
325 |
635
|
jones
|
<delete file="${build.dir}/protocol.jar" />
|
326 |
|
|
<jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
|
327 |
|
|
includes="**/protocols/" />
|
328 |
1311
|
berkley
|
</target>
|
329 |
113
|
jones
|
|
330 |
1780
|
jones
|
<target name="utilities" depends="config">
|
331 |
1796
|
jones
|
<ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
|
332 |
|
|
<ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
|
333 |
1780
|
jones
|
<copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
|
334 |
|
|
<copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
|
335 |
|
|
</target>
|
336 |
|
|
|
337 |
1939
|
brooke
|
<target name="client" depends="utilities, prepare"
|
338 |
|
|
description="Compiles metacat-client java code to build dir">
|
339 |
1780
|
jones
|
<javac srcdir="${build.src}"
|
340 |
|
|
destdir="${build.dest}"
|
341 |
|
|
classpath="${cpath}"
|
342 |
|
|
includes="edu/ucsb/nceas/metacat/client/*" />
|
343 |
|
|
</target>
|
344 |
|
|
|
345 |
1939
|
brooke
|
<target name="clientjar" depends="client"
|
346 |
|
|
description="Compiles and jars metacat-client java code to metacat-client.jar in build dir">
|
347 |
1780
|
jones
|
<delete file="${build.dir}/${name}-client.jar" />
|
348 |
|
|
<jar jarfile="${build.dir}/${name}-client.jar" basedir="${build.dest}"
|
349 |
|
|
includes="**/metacat/client/" />
|
350 |
|
|
</target>
|
351 |
|
|
|
352 |
2059
|
costa
|
<target name="harvester" depends="client"
|
353 |
1950
|
costa
|
description="Compiles harvester java code to build dir">
|
354 |
|
|
<echo message="classpath is: ${cpath}"/>
|
355 |
|
|
<javac srcdir="${build.src}"
|
356 |
|
|
destdir="${build.dest}"
|
357 |
|
|
classpath="${cpath}"
|
358 |
|
|
includes="edu/ucsb/nceas/metacat/harvesterClient/*" />
|
359 |
|
|
</target>
|
360 |
|
|
|
361 |
|
|
<target name="harvesterjar" depends="harvester"
|
362 |
2059
|
costa
|
description="Compiles and jars harvester java code to harvester.jar in build dir">
|
363 |
|
|
<delete file="${build.dir}/harvester.jar" />
|
364 |
|
|
<jar jarfile="${build.dir}/harvester.jar" basedir="${build.dest}"
|
365 |
1950
|
costa
|
includes="**/metacat/harvesterClient/" />
|
366 |
|
|
</target>
|
367 |
|
|
|
368 |
2175
|
tao
|
<target name="geteml" depends="getemlpre2,geteml2+"
|
369 |
1939
|
brooke
|
description="Calls getemlpre2 and geteml2+ targets" />
|
370 |
|
|
|
371 |
|
|
<target name="getemlpre2" depends="prepare"
|
372 |
|
|
description="Checks EML-beta6 out of cvs and copies dtds and xsl to your metacat cvs sandbox">
|
373 |
1612
|
tao
|
<echo>Enter CVS password: </echo>
|
374 |
|
|
<cvs cvsRoot="${cvsroot}"
|
375 |
|
|
package="${eml-module}"
|
376 |
|
|
tag="${eml-tag}"
|
377 |
1939
|
brooke
|
dest="${build.tmp}/eml_${eml-tag}" />
|
378 |
1612
|
tao
|
<mkdir dir="lib/dtd" />
|
379 |
|
|
<copy todir="lib/dtd" filtering="yes">
|
380 |
1939
|
brooke
|
<fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}">
|
381 |
1612
|
tao
|
<include name="*.dtd"/>
|
382 |
|
|
</fileset>
|
383 |
|
|
<mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
|
384 |
|
|
</copy>
|
385 |
1939
|
brooke
|
<antcall target="copyxsl">
|
386 |
|
|
<param name="cvs.tagname" value="${eml-tag}" />
|
387 |
|
|
</antcall>
|
388 |
|
|
</target>
|
389 |
|
|
|
390 |
|
|
<target name="geteml2+" depends="prepare"
|
391 |
|
|
description="Checks eml-2 out of cvs and copies schema and xsl to your metacat cvs sandbox">
|
392 |
|
|
<echo>Enter CVS password: </echo>
|
393 |
1612
|
tao
|
<cvs cvsRoot="${cvsroot}"
|
394 |
|
|
package="${eml-module}"
|
395 |
|
|
tag="${eml2-tag}"
|
396 |
1939
|
brooke
|
dest="${build.tmp}/eml_${eml2-tag}" />
|
397 |
1612
|
tao
|
<mkdir dir="lib/schema" />
|
398 |
|
|
<copy todir="lib/schema" filtering="yes">
|
399 |
1939
|
brooke
|
<fileset dir="${build.tmp}/eml_${eml2-tag}/${eml-module}">
|
400 |
1612
|
tao
|
<include name="*.xsd"/>
|
401 |
|
|
</fileset>
|
402 |
2175
|
tao
|
|
403 |
1939
|
brooke
|
<!-- shouldn't we have a mapper here like this??
|
404 |
|
|
<mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" />
|
405 |
2175
|
tao
|
|
406 |
|
|
Jing's code didn't nave one - does it need to be added?
|
407 |
1939
|
brooke
|
NOTE that eml-version is set to beta 6, so this would need changing -->
|
408 |
2175
|
tao
|
|
409 |
1612
|
tao
|
</copy>
|
410 |
1939
|
brooke
|
<antcall target="copyxsl">
|
411 |
|
|
<param name="cvs.tagname" value="${eml2-tag}" />
|
412 |
|
|
</antcall>
|
413 |
|
|
</target>
|
414 |
|
|
|
415 |
2175
|
tao
|
|
416 |
|
|
|
417 |
|
|
<target name="copyxsl"
|
418 |
1939
|
brooke
|
description="Copies xsl stylesheets from checkout in build/tmp to your metacat cvs sandbox">
|
419 |
|
|
|
420 |
|
|
<delete file="${style-common-cvsrelpath}/${eml-css}"/>
|
421 |
2175
|
tao
|
|
422 |
1938
|
brooke
|
<copy todir="${style-common-cvsrelpath}" filtering="yes">
|
423 |
1939
|
brooke
|
<fileset dir="${build.tmp}/eml_${cvs.tagname}/${eml-module}/style">
|
424 |
1929
|
brooke
|
<include name="**/*.xsl"/>
|
425 |
1612
|
tao
|
</fileset>
|
426 |
|
|
</copy>
|
427 |
1939
|
brooke
|
|
428 |
2175
|
tao
|
|
429 |
|
|
<!-- now copy default css from eml module and put it in style-common-path
|
430 |
1933
|
brooke
|
dir with a new name, so other skin-specific css can import it if reqd -->
|
431 |
1939
|
brooke
|
<copy file="${build.tmp}/eml_${cvs.tagname}/${eml-module}/${eml-module.default.css}"
|
432 |
1938
|
brooke
|
tofile="${style-common-cvsrelpath}/${eml-css}" />
|
433 |
1612
|
tao
|
|
434 |
1463
|
tao
|
</target>
|
435 |
2175
|
tao
|
|
436 |
|
|
|
437 |
|
|
|
438 |
1939
|
brooke
|
<target name="dtdschemasql" depends="prepare"
|
439 |
|
|
description="Registers the DTDs with the new Metacat instance">
|
440 |
877
|
jones
|
<echo/>
|
441 |
|
|
<echo>Registering the DTDs with the new Metacat instance...</echo>
|
442 |
|
|
<sql driver="${dbDriver}"
|
443 |
1744
|
tao
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
444 |
877
|
jones
|
url="${jdbc-connect}"
|
445 |
|
|
userid="${user}"
|
446 |
|
|
password="${password}"
|
447 |
1593
|
tao
|
src="${build.src}/loaddtdschema.sql" />
|
448 |
877
|
jones
|
</target>
|
449 |
1716
|
berkley
|
|
450 |
1939
|
brooke
|
<target name="schemasql" depends="prepare"
|
451 |
|
|
description="Registers the Schema with the new Metacat instance">
|
452 |
1570
|
tao
|
<echo/>
|
453 |
1939
|
brooke
|
<echo>Registering the Schema with the new Metacat instance...</echo>
|
454 |
1570
|
tao
|
<sql driver="${dbDriver}"
|
455 |
1744
|
tao
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
456 |
1570
|
tao
|
url="${jdbc-connect}"
|
457 |
|
|
userid="${user}"
|
458 |
|
|
password="${password}"
|
459 |
|
|
src="${build.src}/loadschema.sql" />
|
460 |
|
|
</target>
|
461 |
2175
|
tao
|
|
462 |
1939
|
brooke
|
<target name="installdb" depends="prepare"
|
463 |
|
|
description="Installs the database tables">
|
464 |
1827
|
jones
|
<echo/>
|
465 |
|
|
<echo>Installing the database tables...</echo>
|
466 |
|
|
<sql driver="${dbDriver}"
|
467 |
|
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
468 |
|
|
url="${jdbc-connect}"
|
469 |
|
|
userid="${user}"
|
470 |
|
|
password="${password}"
|
471 |
2103
|
jones
|
src="${build.src}/${install-sql}" />
|
472 |
1827
|
jones
|
</target>
|
473 |
|
|
|
474 |
1939
|
brooke
|
<target name="upgrade12" depends="prepare"
|
475 |
|
|
description="Updates the database tables to upgrade to version 1.2">
|
476 |
1827
|
jones
|
<echo/>
|
477 |
|
|
<echo>Updating the database tables to upgrade to version 1.2...</echo>
|
478 |
|
|
<sql driver="${dbDriver}"
|
479 |
|
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
480 |
|
|
url="${jdbc-connect}"
|
481 |
|
|
userid="${user}"
|
482 |
|
|
password="${password}"
|
483 |
2103
|
jones
|
src="${build.src}/${upgrade-1.2-sql}" />
|
484 |
1827
|
jones
|
</target>
|
485 |
|
|
|
486 |
1939
|
brooke
|
<target name="upgrade13" depends="prepare"
|
487 |
|
|
description="Updates the database tables to upgrade to version 1.3">
|
488 |
1827
|
jones
|
<echo/>
|
489 |
|
|
<echo>Updating the database tables to upgrade to version 1.3...</echo>
|
490 |
|
|
<sql driver="${dbDriver}"
|
491 |
|
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
492 |
|
|
url="${jdbc-connect}"
|
493 |
|
|
userid="${user}"
|
494 |
|
|
password="${password}"
|
495 |
2103
|
jones
|
src="${build.src}/${upgrade-1.3-sql}" />
|
496 |
1827
|
jones
|
</target>
|
497 |
|
|
|
498 |
2103
|
jones
|
<target name="upgrade14" depends="prepare"
|
499 |
|
|
description="Updates the database tables to upgrade to version 1.4">
|
500 |
|
|
<echo/>
|
501 |
|
|
<echo>Updating the database tables to upgrade to version 1.4...</echo>
|
502 |
|
|
<sql driver="${dbDriver}"
|
503 |
|
|
classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
|
504 |
|
|
url="${jdbc-connect}"
|
505 |
|
|
userid="${user}"
|
506 |
|
|
password="${password}"
|
507 |
|
|
src="${build.src}/${upgrade-1.4-sql}" />
|
508 |
|
|
</target>
|
509 |
|
|
|
510 |
1952
|
jones
|
<target name="install" depends="war" description="* Full Install *">
|
511 |
1079
|
tao
|
<mkdir dir="${datafilepath}" />
|
512 |
1455
|
tao
|
<mkdir dir="${inlinedatafilepath}" />
|
513 |
1079
|
tao
|
<chmod dir="${datafilepath}" perm="ug+w" />
|
514 |
1929
|
brooke
|
<mkdir dir="${temp-dir}"/>
|
515 |
|
|
<chmod dir="${temp-dir}" perm="ug+w" />
|
516 |
1952
|
jones
|
<copy file="${build.dir}/${context}.war" todir="${webapps}"/>
|
517 |
|
|
</target>
|
518 |
2175
|
tao
|
|
519 |
|
|
<target name="upgrade" depends="install"
|
520 |
1952
|
jones
|
description="* Upgrade an existing metacat installation with a new version *">
|
521 |
|
|
<unwar src="${webapps}/${context}.war" dest="${webapps}/${context}" />
|
522 |
|
|
</target>
|
523 |
|
|
|
524 |
2175
|
tao
|
<target name="install-registry" depends="init,getConversionXSL"
|
525 |
1952
|
jones
|
description="Install Registry">
|
526 |
2175
|
tao
|
|
527 |
1952
|
jones
|
<copy file="${srcdir}/perl/register-dataset.cgi"
|
528 |
|
|
todir="${inst.cgi.dir}" filtering="yes"/>
|
529 |
|
|
<chmod file="${inst.cgi.dir}/register-dataset.cgi" perm="ugo+x" />
|
530 |
2175
|
tao
|
|
531 |
1952
|
jones
|
<mkdir dir="${temp-dir}" />
|
532 |
|
|
<copy todir="${temp-dir}" filtering="yes">
|
533 |
|
|
<fileset dir="${build.tmp}/${conversion-module}/lib/style">
|
534 |
|
|
<include name="*.xsl"/>
|
535 |
|
|
<include name="*.xml"/>
|
536 |
|
|
</fileset>
|
537 |
|
|
</copy>
|
538 |
|
|
|
539 |
|
|
<echo message="Install Registry completed." />
|
540 |
|
|
</target>
|
541 |
|
|
|
542 |
2175
|
tao
|
<target name="install-skin" depends="init"
|
543 |
2052
|
sgarg
|
description="Install a Skin">
|
544 |
|
|
|
545 |
2175
|
tao
|
<input message="Please enter name of the skin"
|
546 |
2052
|
sgarg
|
addproperty="skin-name"/>
|
547 |
|
|
|
548 |
|
|
<mkdir dir="${installdir}/style/skins/${skin-name}" />
|
549 |
|
|
<copy todir="${installdir}/style/skins/${skin-name}" filtering="yes">
|
550 |
|
|
<fileset dir="lib/style/skins/${skin-name}">
|
551 |
2054
|
sgarg
|
<include name="*.*"/>
|
552 |
|
|
<exclude name="*.png"/>
|
553 |
|
|
<exclude name="*.gif"/>
|
554 |
2210
|
jones
|
<exclude name="*.jpg"/>
|
555 |
2052
|
sgarg
|
</fileset>
|
556 |
|
|
</copy>
|
557 |
2054
|
sgarg
|
<copy todir="${installdir}/style/skins/${skin-name}" filtering="no">
|
558 |
|
|
<fileset dir="lib/style/skins/${skin-name}">
|
559 |
|
|
<include name="*.png"/>
|
560 |
|
|
<include name="*.gif"/>
|
561 |
2210
|
jones
|
<include name="*.jpg"/>
|
562 |
2054
|
sgarg
|
</fileset>
|
563 |
|
|
</copy>
|
564 |
2210
|
jones
|
<mkdir dir="${installdir}/style/skins/${skin-name}/images" />
|
565 |
|
|
<copy todir="${installdir}/style/skins/${skin-name}/images" filtering="no">
|
566 |
|
|
<fileset dir="lib/style/skins/${skin-name}/images">
|
567 |
|
|
<include name="*.png"/>
|
568 |
|
|
<include name="*.gif"/>
|
569 |
|
|
<include name="*.jpg"/>
|
570 |
|
|
</fileset>
|
571 |
|
|
</copy>
|
572 |
2052
|
sgarg
|
|
573 |
|
|
<echo message="Install Skin completed." />
|
574 |
|
|
</target>
|
575 |
|
|
|
576 |
1952
|
jones
|
<target name="war" depends="warPrepare,warMSSQL"
|
577 |
|
|
description="Create a web archive (WAR) for servlet deployment">
|
578 |
2175
|
tao
|
<war destfile="${build.dir}/${context}.war"
|
579 |
1952
|
jones
|
webxml="${build.war}/web.xml">
|
580 |
|
|
<fileset dir="${war.context}"/>
|
581 |
|
|
<lib dir="${war.lib}"/>
|
582 |
|
|
<webinf dir="${war.webinf}"/>
|
583 |
|
|
</war>
|
584 |
|
|
</target>
|
585 |
|
|
|
586 |
2059
|
costa
|
<target name="warPrepare" depends="jar,clientjar,harvesterjar"
|
587 |
1952
|
jones
|
description="Prepare files for creating a web archive (WAR)">
|
588 |
|
|
|
589 |
|
|
<property name="war.lib" value="${build.war}/lib" />
|
590 |
|
|
<property name="war.webinf" value="${build.war}/WEB-INF" />
|
591 |
|
|
<property name="war.context" value="${build.war}/${context}" />
|
592 |
|
|
<mkdir dir="${war.lib}" />
|
593 |
|
|
<mkdir dir="${war.webinf}" />
|
594 |
|
|
<mkdir dir="${war.context}" />
|
595 |
|
|
|
596 |
|
|
<copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
|
597 |
|
|
<copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
|
598 |
2059
|
costa
|
<copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
|
599 |
1952
|
jones
|
<copy todir="${war.lib}" filtering="no">
|
600 |
1823
|
jones
|
<fileset dir="lib">
|
601 |
|
|
<include name="*.jar"/>
|
602 |
|
|
</fileset>
|
603 |
|
|
<fileset dir="lib/xalan">
|
604 |
|
|
<include name="*.jar"/>
|
605 |
|
|
</fileset>
|
606 |
|
|
</copy>
|
607 |
1952
|
jones
|
<copy file="${jdbc}" tofile="${war.lib}/jdbc.jar" />
|
608 |
1729
|
tao
|
<copy file="lib/web.xml.${tomcatversion}"
|
609 |
1952
|
jones
|
tofile="${build.war}/web.xml" />
|
610 |
|
|
<copy file="lib/metacat.properties" todir="${war.webinf}"
|
611 |
1951
|
jones
|
filtering="yes" />
|
612 |
1952
|
jones
|
<copy todir="${war.context}" filtering="no">
|
613 |
822
|
jones
|
<fileset dir="lib">
|
614 |
|
|
<include name="**/*.jpg"/>
|
615 |
|
|
<include name="**/*.png"/>
|
616 |
|
|
<include name="**/*.gif"/>
|
617 |
|
|
</fileset>
|
618 |
|
|
</copy>
|
619 |
1952
|
jones
|
<copy todir="${war.context}" filtering="yes">
|
620 |
822
|
jones
|
<fileset dir="lib">
|
621 |
|
|
<exclude name="*.jar"/>
|
622 |
|
|
<exclude name="*.properties"/>
|
623 |
|
|
<exclude name="web.xml"/>
|
624 |
1437
|
berkley
|
<exclude name="**/*.jpg"/>
|
625 |
|
|
<exclude name="**/*.png"/>
|
626 |
|
|
<exclude name="**/*.gif"/>
|
627 |
822
|
jones
|
</fileset>
|
628 |
|
|
</copy>
|
629 |
1952
|
jones
|
<copy todir="${war.context}" filtering="no">
|
630 |
1929
|
brooke
|
<fileset dir="lib">
|
631 |
|
|
<include name="**/*.jpg"/>
|
632 |
|
|
<include name="**/*.png"/>
|
633 |
|
|
<include name="**/*.gif"/>
|
634 |
|
|
</fileset>
|
635 |
|
|
</copy>
|
636 |
1311
|
berkley
|
</target>
|
637 |
1929
|
brooke
|
|
638 |
1952
|
jones
|
<target name="warMSSQL" if="MSSQL" depends="warPrepare">
|
639 |
|
|
<copy file="${jdbc-add1}" tofile="${war.lib}/msutil.jar" />
|
640 |
|
|
<copy file="${jdbc-add2}" tofile="${war.lib}/mssqlserver.jar" />
|
641 |
1929
|
brooke
|
</target>
|
642 |
|
|
|
643 |
2175
|
tao
|
<target name="getConversionXSL" depends="prepare"
|
644 |
1954
|
jones
|
unless="styles.not.needed"
|
645 |
1939
|
brooke
|
description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
|
646 |
1929
|
brooke
|
<echo>Enter CVS password: </echo>
|
647 |
|
|
<cvs cvsRoot="${cvsroot-alternate}"
|
648 |
|
|
package="${conversion-module}"
|
649 |
|
|
dest="${build.tmp}" />
|
650 |
|
|
</target>
|
651 |
|
|
|
652 |
2135
|
costa
|
<target name="testprep" depends="jar,clientjar,harvesterjar">
|
653 |
1783
|
jones
|
<mkdir dir="${build.tests}"/>
|
654 |
|
|
<copy todir="${build.tests}" filtering="yes">
|
655 |
|
|
<fileset dir="${testdir}">
|
656 |
|
|
<include name="edu/**"/>
|
657 |
|
|
</fileset>
|
658 |
|
|
</copy>
|
659 |
971
|
tao
|
<!-- copy and compile the tests into a jar file -->
|
660 |
1783
|
jones
|
<javac srcdir="${build.tests}"
|
661 |
|
|
destdir="${build.tests}"
|
662 |
2135
|
costa
|
classpath="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/harvester.jar"
|
663 |
1612
|
tao
|
debug="on"
|
664 |
1311
|
berkley
|
includes="**/*.java" />
|
665 |
204
|
jones
|
|
666 |
1311
|
berkley
|
<jar jarfile="${build.dir}/${name}-junittests.jar"
|
667 |
1783
|
jones
|
basedir="${build.tests}"
|
668 |
1311
|
berkley
|
includes="**/*.class" />
|
669 |
1822
|
jones
|
</target>
|
670 |
971
|
tao
|
|
671 |
1939
|
brooke
|
<target name="test" depends="testprep"
|
672 |
|
|
description="Uses the ant junit task to run all JUnit tests">
|
673 |
1822
|
jones
|
|
674 |
971
|
tao
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
675 |
1783
|
jones
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
676 |
971
|
tao
|
haltonerror="no">
|
677 |
1783
|
jones
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
|
678 |
971
|
tao
|
<classpath>
|
679 |
1783
|
jones
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/${name}-junittests.jar" />
|
680 |
971
|
tao
|
</classpath>
|
681 |
|
|
|
682 |
|
|
<formatter type="plain" />
|
683 |
|
|
|
684 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
685 |
1783
|
jones
|
<fileset dir="${build.tests}">
|
686 |
1116
|
tao
|
<include name="**/*.class" />
|
687 |
971
|
tao
|
</fileset>
|
688 |
|
|
</batchtest>
|
689 |
|
|
</junit>
|
690 |
|
|
</target>
|
691 |
1103
|
tao
|
|
692 |
1939
|
brooke
|
<target name="runonetest" depends="testprep"
|
693 |
|
|
description="Uses the ant junit task to run a single JUnit test, defined by the ${testtorun} property">
|
694 |
1500
|
tao
|
|
695 |
1939
|
brooke
|
<echo>testtorun: ${testtorun}</echo>
|
696 |
|
|
|
697 |
1500
|
tao
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
698 |
1783
|
jones
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
699 |
1500
|
tao
|
haltonerror="no">
|
700 |
2044
|
tao
|
<!--<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>-->
|
701 |
1500
|
tao
|
<classpath>
|
702 |
1783
|
jones
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/${name}-junittests.jar" />
|
703 |
1500
|
tao
|
</classpath>
|
704 |
|
|
|
705 |
|
|
<formatter type="plain" />
|
706 |
|
|
|
707 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
708 |
1783
|
jones
|
<fileset dir="${build.tests}">
|
709 |
1500
|
tao
|
<include name="**/${testtorun}.class" />
|
710 |
|
|
</fileset>
|
711 |
|
|
</batchtest>
|
712 |
|
|
</junit>
|
713 |
|
|
</target>
|
714 |
|
|
|
715 |
2175
|
tao
|
<target name="testharvester"
|
716 |
2135
|
costa
|
depends="testprep"
|
717 |
|
|
description="Uses the ant junit task to test only the Harvester code">
|
718 |
2175
|
tao
|
<junit printsummary="yes"
|
719 |
|
|
haltonfailure="off"
|
720 |
2135
|
costa
|
fork="yes"
|
721 |
|
|
haltonerror="off">
|
722 |
|
|
<classpath>
|
723 |
|
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/harvester.jar:${build.dir}/${name}-junittests.jar" />
|
724 |
|
|
</classpath>
|
725 |
|
|
<formatter type="plain" />
|
726 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
727 |
|
|
<fileset dir="${build.tests}">
|
728 |
|
|
<include name="**/harvesterClient/*.class" />
|
729 |
|
|
</fileset>
|
730 |
|
|
</batchtest>
|
731 |
|
|
</junit>
|
732 |
|
|
</target>
|
733 |
|
|
|
734 |
1939
|
brooke
|
<target name="gethttpclient" depends="prepare"
|
735 |
|
|
description="checks out and compiles morpho httpclient code">
|
736 |
1311
|
berkley
|
<!--mkdir dir="${morphosourcedir}" -->
|
737 |
1487
|
tao
|
<cvs cvsRoot="${cvsroot}"
|
738 |
1103
|
tao
|
package="morpho"
|
739 |
|
|
dest="." />
|
740 |
1107
|
tao
|
<ant dir="${morphosourcedir}" inheritAll="false" target="jar" />
|
741 |
1103
|
tao
|
</target>
|
742 |
|
|
|
743 |
|
|
<!-- run this target, we need to check out a another morpho souce dir was checked out. -->
|
744 |
1939
|
brooke
|
<target name="nettest" depends="install"
|
745 |
|
|
description="compiles and runs the metacatnettest code">
|
746 |
2175
|
tao
|
|
747 |
1103
|
tao
|
<echo>***********************************
|
748 |
1311
|
berkley
|
Please run ant gethttpclient first!
|
749 |
|
|
***********************************
|
750 |
1103
|
tao
|
</echo>
|
751 |
|
|
<!-- copy and compile the tests into a jar file -->
|
752 |
1116
|
tao
|
<mkdir dir="${build.metacatnettest}"/>
|
753 |
1103
|
tao
|
<javac srcdir="${junitnettestsdir}"
|
754 |
1116
|
tao
|
destdir="${build.metacatnettest}"
|
755 |
1103
|
tao
|
classpath="${cpath}:${build.dir}/${name}.jar:${httpclient}"
|
756 |
|
|
includes="**/*.java" />
|
757 |
|
|
|
758 |
|
|
<jar jarfile="${build.dir}/${name}-junitnettests.jar"
|
759 |
1116
|
tao
|
basedir="${build.metacatnettest}"
|
760 |
1103
|
tao
|
includes="**/*.class" />
|
761 |
|
|
|
762 |
|
|
<!-- use the ant "junit" task to run JUnit tests. -->
|
763 |
1107
|
tao
|
<junit printsummary="yes" haltonfailure="no" fork="yes"
|
764 |
1103
|
tao
|
haltonerror="no">
|
765 |
1107
|
tao
|
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
|
766 |
1103
|
tao
|
<classpath>
|
767 |
1807
|
tao
|
<pathelement path="${cpath}:${build.dir}/${name}.jar:${httpclient}:${build.dir}/${name}-junitnettests.jar:${itislib}" />
|
768 |
1103
|
tao
|
</classpath>
|
769 |
|
|
|
770 |
|
|
<formatter type="plain" />
|
771 |
|
|
|
772 |
|
|
<batchtest fork="yes" todir="${build.dir}">
|
773 |
1116
|
tao
|
<fileset dir="${build.metacatnettest}">
|
774 |
|
|
<include name="**/*.class" />
|
775 |
1103
|
tao
|
</fileset>
|
776 |
|
|
</batchtest>
|
777 |
|
|
</junit>
|
778 |
1311
|
berkley
|
</target>
|
779 |
1103
|
tao
|
|
780 |
1939
|
brooke
|
<target name="cleanweb" depends="clean"
|
781 |
|
|
description="deletes tomcat web context dir and all its contents">
|
782 |
1522
|
berkley
|
<delete dir="${installdir}" />
|
783 |
|
|
</target>
|
784 |
|
|
|
785 |
|
|
|
786 |
1939
|
brooke
|
<target name="clean" depends="init"
|
787 |
|
|
description="deletes build dir and any files copied to cvs sandbox by build process (jars, xsl) Currently *not* schema/DTDs">
|
788 |
822
|
jones
|
<delete dir="${build.dir}" />
|
789 |
1822
|
jones
|
<delete file="lib/httpclient.jar" />
|
790 |
|
|
<delete file="lib/utilities.jar" />
|
791 |
1939
|
brooke
|
<delete includeEmptyDirs="true" failonerror="false">
|
792 |
|
|
<fileset dir="${style-common-cvsrelpath}">
|
793 |
|
|
<include name="${eml-css}" />
|
794 |
|
|
<include name="eml-*/*.xsl" />
|
795 |
|
|
<include name="eml-*" />
|
796 |
|
|
</fileset>
|
797 |
|
|
</delete>
|
798 |
113
|
jones
|
</target>
|
799 |
|
|
|
800 |
1939
|
brooke
|
<target name="jdoc" depends="prepare"
|
801 |
|
|
description="generates javadoc documentation">
|
802 |
822
|
jones
|
<javadoc packagenames="edu.ucsb.nceas.*"
|
803 |
516
|
jones
|
sourcepath="${build.src}"
|
804 |
|
|
destdir="${build.javadocs}"
|
805 |
113
|
jones
|
author="true"
|
806 |
|
|
version="true"
|
807 |
|
|
use="true"
|
808 |
348
|
jones
|
windowtitle="${Name} API"
|
809 |
|
|
doctitle="<h1>${Name}</h1>"
|
810 |
113
|
jones
|
bottom="<i>Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>"
|
811 |
|
|
/>
|
812 |
|
|
</target>
|
813 |
|
|
|
814 |
1939
|
brooke
|
<target name="dist" depends="jar,protocol,jdoc,geteml"
|
815 |
|
|
description="prepares a full release distribution">
|
816 |
806
|
jones
|
<mkdir dir="${dist.dir}"/>
|
817 |
|
|
<delete dir="${ver.dir}" />
|
818 |
|
|
<mkdir dir="${ver.dir}"/>
|
819 |
|
|
<copy todir="${ver.dir}">
|
820 |
1311
|
berkley
|
<fileset dir="."
|
821 |
882
|
jones
|
excludes="**/CVS* **/.#* **/src* **/test* **/build* **/docs* ${dist.dir}"/>
|
822 |
806
|
jones
|
</copy>
|
823 |
|
|
<copy todir="${ver.dir}" file="build.xml"/>
|
824 |
|
|
<copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
|
825 |
|
|
<copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
|
826 |
882
|
jones
|
|
827 |
|
|
<copy todir="${ver.dir}/docs" filtering="yes">
|
828 |
|
|
<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
|
829 |
|
|
</copy>
|
830 |
|
|
<copy todir="${ver.dir}/docs" filtering="no">
|
831 |
|
|
<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
|
832 |
|
|
</copy>
|
833 |
806
|
jones
|
<copy todir="${ver.dir}/docs/dev">
|
834 |
|
|
<fileset dir="${build.dir}/docs"/>
|
835 |
|
|
</copy>
|
836 |
917
|
berkley
|
<copy todir="${ver.dir}/src">
|
837 |
|
|
<fileset dir="${build.dir}/src"/>
|
838 |
|
|
</copy>
|
839 |
|
|
|
840 |
992
|
berkley
|
<delete dir="./${ver.dir}/${build.dir}"/>
|
841 |
|
|
<delete dir="./${ver.dir}/dist"/>
|
842 |
882
|
jones
|
<delete file="./${name}-${release}.zip"/>
|
843 |
1312
|
tao
|
<zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
844 |
882
|
jones
|
<delete file="./${name}-${release}.tar.gz" />
|
845 |
1312
|
tao
|
<tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
|
846 |
1311
|
berkley
|
<gzip zipfile="./${name}-${release}.tar.gz"
|
847 |
882
|
jones
|
src="./${name}-${release}.tar"/>
|
848 |
|
|
<delete file="./${name}-${release}.tar" />
|
849 |
1311
|
berkley
|
</target>
|
850 |
806
|
jones
|
|
851 |
1939
|
brooke
|
<target name="distsrc" depends="dist"
|
852 |
|
|
description="prepares a source distribution">
|
853 |
806
|
jones
|
<mkdir dir="${ver.src}"/>
|
854 |
|
|
<copy todir="${ver.src}">
|
855 |
|
|
<fileset dir="./src"/>
|
856 |
|
|
</copy>
|
857 |
|
|
|
858 |
882
|
jones
|
<delete file="./${name}-src-${release}.zip"/>
|
859 |
|
|
<zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
|
860 |
|
|
<delete file="./${name}-src-${release}.tar.gz" />
|
861 |
|
|
<tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
|
862 |
1311
|
berkley
|
<gzip zipfile="./${name}-src-${release}.tar.gz"
|
863 |
882
|
jones
|
src="./${name}-src-${release}.tar"/>
|
864 |
|
|
<delete file="./${name}-src-${release}.tar" />
|
865 |
807
|
jones
|
<delete dir="${dist.dir}"/>
|
866 |
1311
|
berkley
|
</target>
|
867 |
806
|
jones
|
|
868 |
1702
|
tao
|
<target name="stylesheettest">
|
869 |
1939
|
brooke
|
<xslt in="${input}" out="eml.html" style="${style-common-cvsrelpath}/eml-2.0.0/eml-2.0.0.xsl">
|
870 |
1702
|
tao
|
<param name="displaymodule" expression="${displaymodule}"/>
|
871 |
|
|
<param name="docid" expression="${input}"/>
|
872 |
|
|
<param name="entitytype" expression="${entitytype}"/>
|
873 |
|
|
<param name="entityindex" expression="${entityindex}"/>
|
874 |
|
|
<outputproperty name="method" value="html"/>
|
875 |
|
|
<outputproperty name="standalone" value="yes"/>
|
876 |
|
|
<outputproperty name="encoding" value="iso8859_1"/>
|
877 |
|
|
<outputproperty name="indent" value="yes"/>
|
878 |
|
|
</xslt>
|
879 |
|
|
</target>
|
880 |
2175
|
tao
|
|
881 |
1819
|
tao
|
<target name="gridinit" depends="init">
|
882 |
|
|
<property name="java2wsdl.tool" value="org.apache.axis.wsdl.Java2WSDL" />
|
883 |
|
|
<property name="wsdldecorator.tool" value="org.globus.ogsa.tools.wsdl.DecorateWSDL" />
|
884 |
|
|
<property name="wsdl.tool" value="org.globus.ogsa.tools.wsdl.GSDL2Java"/>
|
885 |
|
|
<property environment="env"/>
|
886 |
|
|
<property name="binding.file" value="${env.GLOBUS_LOCATION}/schema/ogsi/ogsi_bindings.wsdl"/>
|
887 |
1820
|
tao
|
<path id="webservicepath">
|
888 |
|
|
<pathelement location="."/>
|
889 |
|
|
<pathelement location="${env.JAVA_HOME}/../lib/tools.jar"/>
|
890 |
|
|
<pathelement location="${build.dest}"/>
|
891 |
|
|
<fileset dir="${env.GLOBUS_LOCATION}/lib">
|
892 |
|
|
<include name="*.jar"/>
|
893 |
|
|
</fileset>
|
894 |
|
|
</path>
|
895 |
1819
|
tao
|
</target>
|
896 |
|
|
|
897 |
1821
|
tao
|
<target name="gridprepare" depends="gridinit, prepare">
|
898 |
2175
|
tao
|
</target>
|
899 |
|
|
|
900 |
1821
|
tao
|
<target name="compileinterface" depends="clean, gridprepare">
|
901 |
1817
|
tao
|
<javac srcdir="${build.src}" destdir="${build.dest}" includes="**/${interface.name}.java" />
|
902 |
1811
|
tao
|
</target>
|
903 |
2175
|
tao
|
|
904 |
1811
|
tao
|
<target name="generateWSDL" depends="compileinterface">
|
905 |
|
|
<echo message="Generating wsdl from ${interface.name} interface"/>
|
906 |
|
|
<java classname="${java2wsdl.tool}"
|
907 |
1814
|
tao
|
dir="${build.src}" fork="yes"
|
908 |
1811
|
tao
|
classpathref="webservicepath" failonerror="true" >
|
909 |
|
|
<arg value="-P"/>
|
910 |
|
|
<arg value="${interface.name}PortType"/>
|
911 |
|
|
<arg value="-S"/>
|
912 |
|
|
<arg value="${interface.name}Service"/>
|
913 |
|
|
<arg value="-y"/>
|
914 |
|
|
<arg value="WRAPPED"/>
|
915 |
|
|
<arg value="-u"/>
|
916 |
|
|
<arg value="LITERAL"/>
|
917 |
|
|
<arg value="-l"/>
|
918 |
|
|
<arg value="http://localhost/ogsa/services/${interface.name}Service"/>
|
919 |
|
|
<arg value="-n"/>
|
920 |
|
|
<arg value="http://${services.namespace}/${interface.name}"/>
|
921 |
|
|
<arg value="${interface.package}.${interface.name}"/>
|
922 |
|
|
</java>
|
923 |
|
|
</target>
|
924 |
2175
|
tao
|
|
925 |
1811
|
tao
|
<target name="decorateWSDL" depends="generateWSDL">
|
926 |
|
|
<property name="wsdl.file" value="${interface.name}Service.wsdl"/>
|
927 |
1814
|
tao
|
<java classname="${wsdldecorator.tool}" dir="${build.src}"
|
928 |
1811
|
tao
|
fork="yes"
|
929 |
|
|
classpathref="webservicepath" failonerror="true" >
|
930 |
|
|
<arg value="${binding.file}"/>
|
931 |
|
|
<arg value="${wsdl.file}"/>
|
932 |
|
|
</java>
|
933 |
|
|
</target>
|
934 |
2175
|
tao
|
|
935 |
1811
|
tao
|
<target name="generatestubs" depends="decorateWSDL">
|
936 |
|
|
<echo message=" Generating stubs " />
|
937 |
1814
|
tao
|
<echo message="wsdl file is ${wsdl.file}"/>
|
938 |
|
|
<echo message="build.src is ${build.src}"/>
|
939 |
1811
|
tao
|
<java classname="${wsdl.tool}" dir="${build.src}" fork="yes"
|
940 |
|
|
classpathref="webservicepath" failonerror="true" >
|
941 |
1814
|
tao
|
<arg value="${wsdl.file}"/>
|
942 |
1811
|
tao
|
</java>
|
943 |
|
|
</target>
|
944 |
2175
|
tao
|
|
945 |
1811
|
tao
|
<target name="compileStubsAndImpl" depends="generatestubs, utilities">
|
946 |
|
|
<echo message=" Compiling stubs " />
|
947 |
|
|
<javac srcdir="${build.src}" destdir="${build.dest}" classpathref="webservicepath" includes="**/${interface.name}/*.java" />
|
948 |
|
|
<echo message=" Compiling impl " />
|
949 |
|
|
<javac srcdir="${build.src}" destdir="${build.dest}" classpathref="webservicepath" classpath="./lib/utilities.jar" includes="**/impl/*.java" />
|
950 |
|
|
</target>
|
951 |
2175
|
tao
|
|
952 |
1811
|
tao
|
<target name="jarStubsAndImpl" depends="compileStubsAndImpl">
|
953 |
|
|
<echo message=" jar stubs classes " />
|
954 |
|
|
<jar destfile="${build.dir}/${interface.name}-stubs.jar" basedir="${build.dest}" includes="**/${interface.name}/*.class" />
|
955 |
|
|
<echo message=" jar impl classes " />
|
956 |
|
|
<jar destfile="${build.dir}/${interface.name}.jar" basedir="${build.dest}" includes="**/impl/*.class" />
|
957 |
|
|
</target>
|
958 |
2175
|
tao
|
|
959 |
1811
|
tao
|
<target name="gar" depends="jarStubsAndImpl">
|
960 |
|
|
<echo message=" jar the gar file"/>
|
961 |
|
|
<mkdir dir="${build.dir}/gar"/>
|
962 |
|
|
<mkdir dir="${build.dir}/gar/schema/edu"/>
|
963 |
|
|
<copy file="${build.dir}/${interface.name}.jar" todir="${build.dir}/gar" />
|
964 |
|
|
<copy file="${build.dir}/${interface.name}-stubs.jar" todir="${build.dir}/gar" />
|
965 |
1814
|
tao
|
<copy file="lib/utilities.jar" todir="${build.dir}/gar" />
|
966 |
|
|
<copy file="lib/server-deploy.wsdd" todir="${build.dir}/gar" />
|
967 |
|
|
<copy file="${build.src}/${interface.name}Service.wsdl" todir="${build.dir}/gar/schema/edu" />
|
968 |
|
|
<jar destfile="lib/${interface.name}.gar" basedir="${build.dir}/gar"/>
|
969 |
1811
|
tao
|
</target>
|
970 |
2175
|
tao
|
|
971 |
1814
|
tao
|
<target name="compilewebclient" depends="prepare">
|
972 |
|
|
<javac srcdir="${build.src}" destdir="${build.dest}" includes="**/application/*.java" classpathref="webservicepath" />
|
973 |
|
|
</target>
|
974 |
2175
|
tao
|
|
975 |
1814
|
tao
|
<target name="runwebclient" depends="compilewebclient">
|
976 |
2175
|
tao
|
<java classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
|
977 |
1814
|
tao
|
dir="${build.dest}" fork="yes"
|
978 |
|
|
classpathref="webservicepath" classpath="./lib/utilities.jar" failonerror="true">
|
979 |
|
|
<arg value="${serviceUrl}"/>
|
980 |
|
|
<arg value="${docid}"/>
|
981 |
|
|
</java>
|
982 |
|
|
</target>
|
983 |
113
|
jones
|
</project>
|