Project

General

Profile

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