Project

General

Profile

metacat / build.xml @ 2127

1 113 jones
<?xml version="1.0"?>
2 1311 berkley
<!--
3 670 jones
  *   '$RCSfile$'
4
  *     Authors: Matt Jones, Chad Berkley, Jivka Bojilova
5
  *   Copyright: 2000 Regents of the University of California and the
6
  *              National Center for Ecological Analysis and Synthesis
7
  * For Details: http://www.nceas.ucsb.edu/
8 113 jones
  *
9 670 jones
  *    '$Author$'
10 1292 tao
  *    '$Date$'
11
  *    '$Revision$'
12 666 jones
  *
13 670 jones
  * Build file for the Ant cross-platform build system for metacat
14
  * See http://jakarta.apache.org for details on Ant
15 113 jones
  *
16 303 jones
  * usage: ant [compile|jar|install|jdoc]
17 666 jones
  *
18
  * This program is free software; you can redistribute it and/or modify
19
  * it under the terms of the GNU General Public License as published by
20
  * the Free Software Foundation; either version 2 of the License, or
21
  * (at your option) any later version.
22
  *
23
  * This program is distributed in the hope that it will be useful,
24
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
25
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26
  * GNU General Public License for more details.
27
  *
28
  * You should have received a copy of the GNU General Public License
29
  * along with this program; if not, write to the Free Software
30
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
31 1311 berkley
-->
32 329 jones
<project name="metacat" default="jar" basedir=".">
33 1929 brooke
34
  <property file="build.properties"/>  <!-- USER SPECIFIC PROPS -->
35
36
  <target name="check-db">
37
    <condition property="use-oracle">
38
      <equals arg1="${database}" arg2="oracle" />
39
    </condition>
40
    <condition property="use-postgresql">
41
      <equals arg1="${database}" arg2="postgresql" />
42
    </condition>
43
    <condition property="use-sqlserver">
44
      <equals arg1="${database}" arg2="sqlserver" />
45
    </condition>
46
  </target>
47
48
  <target name="oracle" if="use-oracle">
49 931 jones
     <!-- Customize these properties if you are using oracle -->
50 1929 brooke
     <echo message="Using oracle..."/>
51 925 berkley
     <property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
52
     <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
53 1929 brooke
     <property name="jdbc" value="${jdbc_base}/classes111.zip" />
54 1744 tao
     <!-- Property to indicate is not MSSQL installation-->
55
     <property name="other" value="yes"/>
56 2103 jones
     <property name="install-sql"
57
               value="xmltables.sql" />
58
     <property name="upgrade-1.2-sql"
59
               value="upgrade-db-to-1.2.sql" />
60
     <property name="upgrade-1.3-sql"
61
               value="upgrade-db-to-1.3.sql" />
62
     <property name="upgrade-1.4-sql"
63
               value="upgrade-db-to-1.4.sql" />
64 925 berkley
   </target>
65 1311 berkley
66 1929 brooke
   <target name="postgresql" if="use-postgresql">
67 931 jones
     <!-- Customize these properties if you are using postgres -->
68 1929 brooke
     <echo message="Using PostgreSQL..."/>
69 925 berkley
     <property name="dbDriver" value="org.postgresql.Driver"/>
70 1311 berkley
     <property name="dbAdapter"
71 931 jones
               value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
72 1716 berkley
     <property name="jdbc" value="lib/jdbc7.1-1.2.jar" />
73 1744 tao
     <!-- Property to indicate is not MSSQL installation-->
74
     <property name="other" value="yes"/>
75 2103 jones
     <property name="install-sql"
76
               value="xmltables_postgres.sql" />
77
     <property name="upgrade-1.2-sql"
78
               value="upgrade-db-to-1.2_postgres.sql" />
79
     <property name="upgrade-1.3-sql"
80
               value="upgrade-db-to-1.3_postgres.sql" />
81
     <property name="upgrade-1.4-sql"
82
               value="upgrade-db-to-1.4_postgres.sql" />
83 1744 tao
    </target>
84 1739 tao
85 1929 brooke
   <target name="sqlserver" if="use-sqlserver">
86 1739 tao
     <!-- Customize these properties if you are using SQL server -->
87 1929 brooke
     <echo message="Using SQL Server..."/>
88 1739 tao
     <property name="dbDriver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
89
     <property name="dbAdapter"
90
               value="edu.ucsb.nceas.dbadapter.SqlserverAdapter"/>
91 1742 tao
     <property name="jdbc" value="${jdbc-base}/msbase.jar" />
92 1744 tao
     <property name="jdbc-add1" value="${jdbc-base}/msutil.jar" />
93
     <property name="jdbc-add2" value="${jdbc-base}/mssqlserver.jar" />
94
     <!-- Property to indicate is a MSSQL installation-->
95
     <property name="MSSQL" value="yes"/>
96 2118 costa
     <property name="install-sql"
97
               value="xmltables-sqlserver.sql" />
98 1739 tao
   </target>
99 1311 berkley
100 1929 brooke
   <target name="config" depends="check-db,oracle,postgresql,sqlserver">
101 1814 tao
      <!-- usr for client testing, generally you don't need change-->
102 1801 tao
      <property name="mcuser" value="uid=tao,o=NCEAS,dc=ecoinformatics,dc=org"/>
103 1783 jones
      <property name="mcpassword" value=""/>
104 1801 tao
      <property name="mcanotheruser" value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org"/>
105
      <property name="mcanotherpassword" value=""/>
106
107 1827 jones
      <property name="debug" value="on" />
108 2053 sgarg
      <property name="debuglevel" value="55" />
109 1716 berkley
110 1522 berkley
      <property name="morphosourcedir" value="../morpho" />
111 1570 tao
      <property name="defaultcontenttype" value="application/octet-stream" />
112 1780 jones
      <property name="utilitiesdir" value="../utilities" />
113 1811 tao
114 931 jones
      <!-- Make sure these paths match the location of the jar files
115
           on your system, the defaults should usually work -->
116 1941 brooke
      <condition property="jsdk" value="${tomcat}/lib/common/servlet.jar">
117
        <equals arg1="${tomcatversion}" arg2="tomcat3" />
118
      </condition>
119
      <condition property="jsdk" value="${tomcat}/common/lib/servlet.jar">
120
        <equals arg1="${tomcatversion}" arg2="tomcat4" />
121
      </condition>
122 2011 cjones
      <condition property="jsdk" value="${tomcat}/common/lib/servlet-api.jar">
123
        <equals arg1="${tomcatversion}" arg2="tomcat5" />
124
      </condition>
125 1941 brooke
      <echo>*********** tomcatversion = ${tomcatversion}</echo>
126
      <echo>*********** set jsdk to ${jsdk}</echo>
127 1311 berkley
      <property name="xmlp"
128 1376 tao
                value="lib/xercesImpl.jar" />
129 1311 berkley
      <property name="cos"
130 931 jones
                value="lib/cos.jar" />
131 939 tao
      <property name="morpho"
132
                value="lib/morpho.jar" />
133 931 jones
      <property name="xalan"
134
                value="lib/xalan/xalan.jar" />
135
      <property name="apis"
136
                value="lib/xalan/xml-apis.jar" />
137 1103 tao
      <property name="httpclient"
138 1780 jones
                value="lib/httpclient.jar" />
139 1470 tao
      <property name="emlparser"
140
                value="lib/eml.jar" />
141
      <property name="configxml"
142
                value="lib/configxml.jar" />
143 1578 tao
      <property name="itislib"
144
                value="lib/itislib.jar" />
145 1487 tao
      <property name="emlparser"
146 1941 brooke
147 1487 tao
                value="lib/eml.jar" />
148 1780 jones
      <property name="util"
149
                value="lib/utilities.jar" />
150 1103 tao
  </target>
151
152 931 jones
   <target name="init" depends="config">
153
      <!-- It is less likely you'll need to make any changes from here down,
154
           but customization is possible -->
155 1929 brooke
      <property name="installdir"          value="${webapps}/${context}" />
156
      <property name="temp-dir"            value="/tmp/${context}" />
157
      <property name="name"                value="metacat"/>
158
      <property name="Name"                value="MetaCat"/>
159
      <property name="debugprefix"         value="${Name}:"/>
160 1990 jones
      <property name="release"             value="1.4.0"/>
161 1929 brooke
      <property name="replication-path"    value="/${context}/servlet/replication"/>
162 1952 jones
      <property name="servlet-path"        value="/${context}/metacat"/>
163 1929 brooke
      <property name="html-path"           value="/${context}"/>
164
      <property name="systemidserver"      value="http://${server}"/>
165 1933 brooke
      <property name="style-common-relpath"
166
                                           value="/style/common"/>
167 1938 brooke
      <property name="style-common-cvsrelpath"
168
                                           value="lib${style-common-relpath}"/>
169 1929 brooke
      <property name="style-common-fullpath"
170 1933 brooke
                                           value="/${installdir}${style-common-relpath}"/>
171 1929 brooke
      <property name="style-common-path"
172 1933 brooke
                                           value="/${context}${style-common-relpath}"/>
173 1929 brooke
      <property name="style-skins-relpath" value="/style/skins"/>
174
      <property name="style-skins-path"    value="/${context}${style-skins-relpath}"/>
175
      <property name="replication-log"     value="/tmp/metacatreplication.log"/>
176 1579 tao
      <property name="replicationerrorlog" value="/tmp/metacatreplication.err"/>
177 1929 brooke
      <property name="config-dir"          value="${webapps}/${style-skins-path}" />
178
      <property name="eml-module"          value="eml" />
179
      <property name="eml-version"         value="2.0.0beta6" />
180
      <property name="eml-tag"             value="EML_2_0_0_BETA_6_FOR_METACAT" />
181
      <property name="eml2-tag"            value="EML_2_0_0_FOR_METACAT" />
182
      <property name="eml2namespace"       value="eml://ecoinformatics.org/eml-2.0.0" />
183
      <property name="stmmlnamespace"      value="http://www.xml-cml.org/schema/stmml" />
184 1933 brooke
      <property name="eml-css"             value="eml_xsl.css"/>
185
      <property name="eml-module.default.css"
186
                                           value="default.css"/>
187 1929 brooke
      <property name="conversion-module"   value="webmdentry" />
188 348 jones
189 1929 brooke
      <!-- Config for registry variables -->
190 1933 brooke
      <property name="scope"               value="obfs"/>
191
      <property name="responseForm"        value="genericResponse.tmpl"/>
192
      <property name="entryForm"           value="entryForm.tmpl"/>
193
      <property name="guide"               value="genericGuide.tmpl"/>
194 1929 brooke
      <property name="confirmData" value="confirmData.tmpl"/>
195
      <property name="deleteData" value="deleteData.tmpl"/>
196
      <property name="genericHeader" value="genericHeader.tmpl"/>
197
      <property name="genericFooter" value="genericFooter.tmpl"/>
198
      <property name="adminname" value="KNB Support"/>
199
      <property name="recipient" value="knb-software\@nceas.ucsb.edu"/>
200
      <filter token="scope" value="${scope}"/>
201
      <filter token="responseForm" value="${responseForm}"/>
202
      <filter token="entryForm" value="${entryForm}"/>
203
      <filter token="guide" value="${guide}"/>
204
      <filter token="confirmData" value="${confirmData}"/>
205
      <filter token="deleteData" value="${deleteData}"/>
206
      <filter token="genericHeader" value="${genericHeader}"/>
207
      <filter token="genericFooter" value="${genericFooter}"/>
208
      <filter token="adminname" value="${adminname}"/>
209
      <filter token="recipient" value="${recipient}"/>
210
211 1311 berkley
      <property name="cpath"
212 1986 jones
                value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${cos}:${morpho}:${emlparser}:${jdbc-add1}:${jdbc-add2}:${util}:${httpclient}"/>
213 882 jones
214
      <filter token="docrooturl" value="./" />
215 588 berkley
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
216 882 jones
      <filter token="dbDriver" value="${dbDriver}"/>
217 915 berkley
      <filter token="dbAdapter" value="${dbAdapter}"/>
218 614 bojilova
      <filter token="install-dir" value="${installdir}"/>
219 1929 brooke
      <filter token="temp-dir" value="${temp-dir}"/>
220 586 berkley
      <filter token="server" value="${server}"/>
221 977 tao
      <filter token="systemidserver" value="${systemidserver}"/>
222 1929 brooke
      <filter token="cgi-prefix" value="${cgi-prefix}"/>
223
      <filter token="ldapUrl" value="${ldapUrl}"/>
224 586 berkley
      <filter token="replication-log" value="${replication-log}"/>
225 1579 tao
      <filter token="replicationerrorlog" value="${replicationerrorlog}"/>
226 348 jones
      <filter token="release" value="${release}"/>
227
      <filter token="servlet-path" value="${servlet-path}"/>
228 359 bojilova
      <filter token="html-path" value="${html-path}"/>
229 362 jones
      <filter token="user" value="${user}"/>
230
      <filter token="password" value="${password}"/>
231 1783 jones
      <filter token="mcuser" value="${mcuser}"/>
232
      <filter token="mcpassword" value="${mcpassword}"/>
233 1801 tao
      <filter token="mcanotheruser" value="${mcanotheruser}"/>
234
      <filter token="mcanotherpassword" value="${mcanotherpassword}"/>
235 1929 brooke
      <filter token="knb-site-url" value="${knb-site-url}"/>
236 1933 brooke
      <filter token="eml-css" value="${eml-css}"/>
237 1929 brooke
      <filter token="style-skins-relpath" value="${style-skins-relpath}"/>
238
      <filter token="style-skins-path" value="${style-skins-path}"/>
239
      <filter token="style-common-relpath" value="${style-common-relpath}"/>
240
      <filter token="style-common-fullpath" value="${style-common-fullpath}"/>
241
      <filter token="style-common-path" value="${style-common-path}"/>
242
      <!-- The "style-path" filter is used by the eml xsl stylesheets!!  -->
243
      <filter token="style-path" value="${style-skins-path}"/>
244 525 berkley
      <filter token="replication-path" value="${replication-path}"/>
245 832 jones
      <filter token="config-dir" value="${config-dir}"/>
246
      <filter token="default-style" value="${default-style}"/>
247 877 jones
      <filter token="eml-version" value="${eml-version}"/>
248 1570 tao
      <filter token="eml2namespace" value="${eml2namespace}"/>
249 1718 tao
      <filter token="stmmlnamespace" value="${stmmlnamespace}"/>
250 1009 tao
      <filter token="context" value="${context}"/>
251 1292 tao
      <filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" />
252 1051 tao
      <filter token="debuglevel" value="${debuglevel}" />
253 1079 tao
      <filter token="datafilepath" value="${datafilepath}" />
254 1455 tao
      <filter token="inlinedatafilepath" value="${inlinedatafilepath}" />
255 1522 berkley
      <filter token="defaultcontenttype" value="${defaultcontenttype}" />
256 1538 berkley
      <filter token="debugprefix" value="${debugprefix}"/>
257 1487 tao
258 254 jones
      <property name="srcdir" value="./src" />
259 1783 jones
      <property name="testdir" value="./test" />
260
      <property name="testtorun" value="MetacatClientTest" />
261 1116 tao
      <property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
262
      <property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
263 348 jones
      <property name="build.dir" value="./build"/>
264
      <property name="build.src" value="${build.dir}/src"/>
265
      <property name="build.dest" value="${build.dir}/classes"/>
266 516 jones
      <property name="build.docs" value="${build.dir}/docs"/>
267 348 jones
      <property name="build.samples" value="${build.dir}/samples"/>
268
      <property name="build.tests" value="${build.dir}/tests"/>
269 1778 tao
      <property name="build.tmp" value="${build.dir}/tmp"/>
270 1116 tao
      <property name="build.metacattest" value="${build.tests}/metacattest"/>
271
      <property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
272 348 jones
      <property name="build.data" value="${build.dir}/data"/>
273 806 jones
      <property name="build.javadocs" value="${build.dir}/docs/api"/>
274 1952 jones
      <property name="build.war" value="${build.dir}/war"/>
275 348 jones
276 882 jones
      <property name="dist.dir" value="dist"/>
277 806 jones
      <property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
278
      <property name="ver.src" value="${ver.dir}/src"/>
279
280 254 jones
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
281 113 jones
   </target>
282 1311 berkley
283 348 jones
   <target name="prepare" depends="init">
284
      <mkdir dir="${build.dir}"/>
285
      <mkdir dir="${build.src}"/>
286
      <mkdir dir="${build.dest}"/>
287 516 jones
      <mkdir dir="${build.javadocs}"/>
288 1778 tao
      <mkdir dir="${build.tmp}"/>
289 348 jones
290 822 jones
      <copy todir="${build.src}" filtering="yes">
291
        <fileset dir="${srcdir}">
292
          <include name="edu/**"/>
293
          <include name="com/**"/>
294 877 jones
          <include name="**/*.sql"/>
295 822 jones
          <exclude name="**/CVS*"/>
296
          <exclude name="**/.#*"/>
297
        </fileset>
298
      </copy>
299 1954 jones
      <available file="build/tmp/${conversion-module}" type="dir"
300
                 property="styles.not.needed"/>
301 348 jones
   </target>
302
303 1939 brooke
   <target name="compile" depends="prepare,utilities"
304 1986 jones
    description="Compiles java code to build dir, and copies metacat props files there">
305 1939 brooke
306 1311 berkley
       <javac srcdir="${build.src}"
307
              destdir="${build.dest}"
308
              classpath="${cpath}"
309 1827 jones
              debug="${debug}"
310 1819 tao
              excludes="**/*.sql **/stringclient/** **/client/*.java"/>
311 1311 berkley
   </target>
312 113 jones
313 1939 brooke
   <target name="jar" depends="compile"
314
    description="Compiles and jars metacat java code to metacat.jar in build dir">
315
316 353 jones
       <delete file="${build.dir}/${name}.jar" />
317 635 jones
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
318
            excludes="**/protocols/" />
319 1311 berkley
   </target>
320
321 1939 brooke
   <target name="protocol" depends="compile"
322
    description="Compiles and jars protocol java code to protocol.jar in build dir">
323 635 jones
       <delete file="${build.dir}/protocol.jar" />
324
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
325
            includes="**/protocols/" />
326 1311 berkley
   </target>
327 113 jones
328 1780 jones
   <target name="utilities" depends="config">
329 1796 jones
     <ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
330
     <ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
331 1780 jones
     <copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
332
     <copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
333
   </target>
334
335 1939 brooke
   <target name="client" depends="utilities, prepare"
336
    description="Compiles metacat-client java code to build dir">
337 1780 jones
       <javac srcdir="${build.src}"
338
              destdir="${build.dest}"
339
              classpath="${cpath}"
340
              includes="edu/ucsb/nceas/metacat/client/*" />
341
   </target>
342
343 1939 brooke
   <target name="clientjar" depends="client"
344
    description="Compiles and jars metacat-client java code to metacat-client.jar in build dir">
345 1780 jones
       <delete file="${build.dir}/${name}-client.jar" />
346
       <jar jarfile="${build.dir}/${name}-client.jar" basedir="${build.dest}"
347
            includes="**/metacat/client/" />
348
   </target>
349
350 2059 costa
   <target name="harvester" depends="client"
351 1950 costa
           description="Compiles harvester java code to build dir">
352
       <echo message="classpath is:   ${cpath}"/>
353
       <javac srcdir="${build.src}"
354
              destdir="${build.dest}"
355
              classpath="${cpath}"
356
              includes="edu/ucsb/nceas/metacat/harvesterClient/*" />
357 2118 costa
       <copy file="lib/harvester/harvesterDocument.xsd" todir="${build.dest}" />
358 1950 costa
   </target>
359
360
   <target name="harvesterjar" depends="harvester"
361 2059 costa
           description="Compiles and jars harvester java code to harvester.jar in build dir">
362
       <delete file="${build.dir}/harvester.jar" />
363
       <jar jarfile="${build.dir}/harvester.jar" basedir="${build.dest}"
364 1950 costa
            includes="**/metacat/harvesterClient/" />
365
   </target>
366
367 1939 brooke
   <target  name="geteml" depends="getemlpre2,geteml2+"
368
            description="Calls getemlpre2 and geteml2+ targets" />
369
370
   <target name="getemlpre2" depends="prepare"
371
   description="Checks EML-beta6 out of cvs and copies dtds and xsl to your metacat cvs sandbox">
372 1612 tao
     <echo>Enter CVS password: </echo>
373
     <cvs cvsRoot="${cvsroot}"
374
          package="${eml-module}"
375
          tag="${eml-tag}"
376 1939 brooke
          dest="${build.tmp}/eml_${eml-tag}" />
377 1612 tao
     <mkdir dir="lib/dtd" />
378
     <copy todir="lib/dtd" filtering="yes">
379 1939 brooke
       <fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}">
380 1612 tao
         <include name="*.dtd"/>
381
       </fileset>
382
       <mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
383
     </copy>
384 1939 brooke
     <antcall target="copyxsl">
385
        <param name="cvs.tagname" value="${eml-tag}" />
386
     </antcall>
387
   </target>
388
389
   <target name="geteml2+" depends="prepare"
390
   description="Checks eml-2 out of cvs and copies schema and xsl to your metacat cvs sandbox">
391
     <echo>Enter CVS password: </echo>
392 1612 tao
     <cvs cvsRoot="${cvsroot}"
393
          package="${eml-module}"
394
          tag="${eml2-tag}"
395 1939 brooke
          dest="${build.tmp}/eml_${eml2-tag}" />
396 1612 tao
     <mkdir dir="lib/schema" />
397
     <copy todir="lib/schema" filtering="yes">
398 1939 brooke
       <fileset dir="${build.tmp}/eml_${eml2-tag}/${eml-module}">
399 1612 tao
         <include name="*.xsd"/>
400
       </fileset>
401 1939 brooke
402
       <!-- shouldn't we have a mapper here like this??
403
       <mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" />
404

405
       Jing's code didn't nave one - does it need to be added?
406
       NOTE that eml-version is set to beta 6, so this would need changing -->
407
408 1612 tao
     </copy>
409 1939 brooke
     <antcall target="copyxsl">
410
        <param name="cvs.tagname" value="${eml2-tag}" />
411
     </antcall>
412
   </target>
413
414
415
416
   <target  name="copyxsl"
417
   description="Copies xsl stylesheets from checkout in build/tmp to your metacat cvs sandbox">
418
419
     <delete file="${style-common-cvsrelpath}/${eml-css}"/>
420
421 1938 brooke
     <copy todir="${style-common-cvsrelpath}" filtering="yes">
422 1939 brooke
       <fileset dir="${build.tmp}/eml_${cvs.tagname}/${eml-module}/style">
423 1929 brooke
       <include name="**/*.xsl"/>
424 1612 tao
     </fileset>
425
     </copy>
426 1933 brooke
427 1939 brooke
428 1933 brooke
     <!-- now copy default css from eml module and put it in style-common-path
429
          dir with a new name, so other skin-specific css can import it if reqd -->
430 1939 brooke
     <copy file="${build.tmp}/eml_${cvs.tagname}/${eml-module}/${eml-module.default.css}"
431 1938 brooke
           tofile="${style-common-cvsrelpath}/${eml-css}" />
432 1612 tao
433 1463 tao
   </target>
434 1939 brooke
435
436
437
   <target name="dtdschemasql" depends="prepare"
438
   description="Registers the DTDs with the new Metacat instance">
439 877 jones
     <echo/>
440
     <echo>Registering the DTDs with the new Metacat instance...</echo>
441
     <sql driver="${dbDriver}"
442 1744 tao
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
443 877 jones
          url="${jdbc-connect}"
444
          userid="${user}"
445
          password="${password}"
446 1593 tao
          src="${build.src}/loaddtdschema.sql" />
447 877 jones
   </target>
448 1716 berkley
449 1939 brooke
   <target name="schemasql" depends="prepare"
450
            description="Registers the Schema with the new Metacat instance">
451 1570 tao
     <echo/>
452 1939 brooke
     <echo>Registering the Schema with the new Metacat instance...</echo>
453 1570 tao
     <sql driver="${dbDriver}"
454 1744 tao
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
455 1570 tao
          url="${jdbc-connect}"
456
          userid="${user}"
457
          password="${password}"
458
          src="${build.src}/loadschema.sql" />
459
   </target>
460 1801 tao
461 1939 brooke
   <target name="installdb" depends="prepare"
462
            description="Installs the database tables">
463 1827 jones
     <echo/>
464
     <echo>Installing the database tables...</echo>
465
     <sql driver="${dbDriver}"
466
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
467
          url="${jdbc-connect}"
468
          userid="${user}"
469
          password="${password}"
470 2103 jones
          src="${build.src}/${install-sql}" />
471 1827 jones
   </target>
472
473 1939 brooke
   <target name="upgrade12" depends="prepare"
474
            description="Updates the database tables to upgrade to version 1.2">
475 1827 jones
     <echo/>
476
     <echo>Updating the database tables to upgrade to version 1.2...</echo>
477
     <sql driver="${dbDriver}"
478
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
479
          url="${jdbc-connect}"
480
          userid="${user}"
481
          password="${password}"
482 2103 jones
          src="${build.src}/${upgrade-1.2-sql}" />
483 1827 jones
   </target>
484
485 1939 brooke
   <target name="upgrade13" depends="prepare"
486
            description="Updates the database tables to upgrade to version 1.3">
487 1827 jones
     <echo/>
488
     <echo>Updating the database tables to upgrade to version 1.3...</echo>
489
     <sql driver="${dbDriver}"
490
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
491
          url="${jdbc-connect}"
492
          userid="${user}"
493
          password="${password}"
494 2103 jones
          src="${build.src}/${upgrade-1.3-sql}" />
495 1827 jones
   </target>
496
497 2103 jones
   <target name="upgrade14" depends="prepare"
498
            description="Updates the database tables to upgrade to version 1.4">
499
     <echo/>
500
     <echo>Updating the database tables to upgrade to version 1.4...</echo>
501
     <sql driver="${dbDriver}"
502
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
503
          url="${jdbc-connect}"
504
          userid="${user}"
505
          password="${password}"
506
          src="${build.src}/${upgrade-1.4-sql}" />
507
   </target>
508
509 1952 jones
   <target name="install" depends="war" description="* Full Install *">
510 1079 tao
       <mkdir dir="${datafilepath}" />
511 1455 tao
       <mkdir dir="${inlinedatafilepath}" />
512 1079 tao
       <chmod dir="${datafilepath}" perm="ug+w" />
513 1929 brooke
       <mkdir dir="${temp-dir}"/>
514
       <chmod dir="${temp-dir}" perm="ug+w" />
515 1952 jones
       <copy file="${build.dir}/${context}.war" todir="${webapps}"/>
516
   </target>
517
518
   <target name="upgrade" depends="install"
519
          description="* Upgrade an existing metacat installation with a new version *">
520
       <unwar src="${webapps}/${context}.war" dest="${webapps}/${context}" />
521
   </target>
522
523 1954 jones
   <target name="install-registry" depends="init,getConversionXSL"
524 1952 jones
            description="Install Registry">
525
526
      <copy file="${srcdir}/perl/register-dataset.cgi"
527
            todir="${inst.cgi.dir}" filtering="yes"/>
528
      <chmod file="${inst.cgi.dir}/register-dataset.cgi" perm="ugo+x" />
529
530
      <mkdir dir="${temp-dir}" />
531
     <copy todir="${temp-dir}" filtering="yes">
532
       <fileset dir="${build.tmp}/${conversion-module}/lib/style">
533
         <include name="*.xsl"/>
534
         <include name="*.xml"/>
535
       </fileset>
536
     </copy>
537
538
      <echo message="Install Registry completed." />
539
   </target>
540
541 2052 sgarg
   <target name="install-skin" depends="init"
542
            description="Install a Skin">
543
544
      <input message="Please enter name of the skin"
545
             addproperty="skin-name"/>
546
547
      <mkdir dir="${installdir}/style/skins/${skin-name}" />
548
      <copy todir="${installdir}/style/skins/${skin-name}" filtering="yes">
549
       <fileset dir="lib/style/skins/${skin-name}">
550 2054 sgarg
           <include name="*.*"/>
551
           <exclude name="*.png"/>
552
           <exclude name="*.gif"/>
553 2052 sgarg
       </fileset>
554
      </copy>
555 2054 sgarg
     <copy todir="${installdir}/style/skins/${skin-name}" filtering="no">
556
       <fileset dir="lib/style/skins/${skin-name}">
557
           <include name="*.png"/>
558
           <include name="*.gif"/>
559
       </fileset>
560
      </copy>
561 2052 sgarg
562
      <echo message="Install Skin completed." />
563
   </target>
564
565 1952 jones
   <target name="war" depends="warPrepare,warMSSQL"
566
            description="Create a web archive (WAR) for servlet deployment">
567
       <war destfile="${build.dir}/${context}.war"
568
            webxml="${build.war}/web.xml">
569
         <fileset dir="${war.context}"/>
570
         <lib dir="${war.lib}"/>
571
         <webinf dir="${war.webinf}"/>
572
       </war>
573
   </target>
574
575 2059 costa
   <target name="warPrepare" depends="jar,clientjar,harvesterjar"
576 1952 jones
            description="Prepare files for creating a web archive (WAR)">
577
578
       <property name="war.lib" value="${build.war}/lib" />
579
       <property name="war.webinf" value="${build.war}/WEB-INF" />
580
       <property name="war.context" value="${build.war}/${context}" />
581
       <mkdir dir="${war.lib}" />
582
       <mkdir dir="${war.webinf}" />
583
       <mkdir dir="${war.context}" />
584
585
       <copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
586
       <copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
587 2059 costa
       <copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
588 1952 jones
       <copy todir="${war.lib}" filtering="no">
589 1823 jones
         <fileset dir="lib">
590
           <include name="*.jar"/>
591
         </fileset>
592
         <fileset dir="lib/xalan">
593
           <include name="*.jar"/>
594
         </fileset>
595
       </copy>
596 1952 jones
       <copy file="${jdbc}" tofile="${war.lib}/jdbc.jar" />
597 1729 tao
       <copy file="lib/web.xml.${tomcatversion}"
598 1952 jones
             tofile="${build.war}/web.xml" />
599
       <copy file="lib/metacat.properties" todir="${war.webinf}"
600 1951 jones
             filtering="yes" />
601 1952 jones
       <copy todir="${war.context}" filtering="no">
602 822 jones
         <fileset dir="lib">
603
           <include name="**/*.jpg"/>
604
           <include name="**/*.png"/>
605
           <include name="**/*.gif"/>
606
         </fileset>
607
       </copy>
608 1952 jones
       <copy todir="${war.context}" filtering="yes">
609 822 jones
         <fileset dir="lib">
610
           <exclude name="*.jar"/>
611
           <exclude name="*.properties"/>
612
           <exclude name="web.xml"/>
613 1437 berkley
           <exclude name="**/*.jpg"/>
614
           <exclude name="**/*.png"/>
615
           <exclude name="**/*.gif"/>
616 822 jones
         </fileset>
617
       </copy>
618 1952 jones
       <copy todir="${war.context}" filtering="no">
619 1929 brooke
         <fileset dir="lib">
620
           <include name="**/*.jpg"/>
621
           <include name="**/*.png"/>
622
           <include name="**/*.gif"/>
623
         </fileset>
624
       </copy>
625 1311 berkley
   </target>
626 1929 brooke
627 1952 jones
   <target name="warMSSQL" if="MSSQL" depends="warPrepare">
628
      <copy file="${jdbc-add1}" tofile="${war.lib}/msutil.jar" />
629
       <copy file="${jdbc-add2}" tofile="${war.lib}/mssqlserver.jar" />
630 1929 brooke
   </target>
631
632 1954 jones
   <target name="getConversionXSL" depends="prepare"
633
            unless="styles.not.needed"
634 1939 brooke
            description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
635 1929 brooke
     <echo>Enter CVS password: </echo>
636
     <cvs cvsRoot="${cvsroot-alternate}"
637
          package="${conversion-module}"
638
          dest="${build.tmp}" />
639
   </target>
640
641 1822 jones
   <target name="testprep" depends="jar,clientjar">
642 1783 jones
      <mkdir dir="${build.tests}"/>
643
      <copy todir="${build.tests}" filtering="yes">
644
        <fileset dir="${testdir}">
645
          <include name="edu/**"/>
646
        </fileset>
647
      </copy>
648 971 tao
      <!-- copy and compile the tests into a jar file -->
649 1783 jones
      <javac srcdir="${build.tests}"
650
             destdir="${build.tests}"
651 1822 jones
             classpath="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar"
652 1612 tao
             debug="on"
653 1311 berkley
       includes="**/*.java" />
654 204 jones
655 1311 berkley
      <jar jarfile="${build.dir}/${name}-junittests.jar"
656 1783 jones
        basedir="${build.tests}"
657 1311 berkley
                includes="**/*.class" />
658 1822 jones
   </target>
659 971 tao
660 1939 brooke
   <target name="test" depends="testprep"
661
            description="Uses the ant junit task to run all JUnit tests">
662 1822 jones
663 971 tao
      <!-- use the ant "junit" task to run JUnit tests. -->
664 1783 jones
      <junit printsummary="yes" haltonfailure="no" fork="yes"
665 971 tao
             haltonerror="no">
666 1783 jones
        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
667 971 tao
        <classpath>
668 1783 jones
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/${name}-junittests.jar" />
669 971 tao
        </classpath>
670
671
        <formatter type="plain" />
672
673
        <batchtest fork="yes" todir="${build.dir}">
674 1783 jones
          <fileset dir="${build.tests}">
675 1116 tao
            <include name="**/*.class" />
676 971 tao
          </fileset>
677
        </batchtest>
678
     </junit>
679
   </target>
680 1103 tao
681 1939 brooke
    <target name="runonetest" depends="testprep"
682
            description="Uses the ant junit task to run a single JUnit test, defined by the ${testtorun} property">
683 1500 tao
684 1939 brooke
              <echo>testtorun: ${testtorun}</echo>
685
686 1500 tao
      <!-- use the ant "junit" task to run JUnit tests. -->
687 1783 jones
      <junit printsummary="yes" haltonfailure="no" fork="yes"
688 1500 tao
             haltonerror="no">
689 2044 tao
        <!--<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>-->
690 1500 tao
        <classpath>
691 1783 jones
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/${name}-junittests.jar" />
692 1500 tao
        </classpath>
693
694
        <formatter type="plain" />
695
696
        <batchtest fork="yes" todir="${build.dir}">
697 1783 jones
          <fileset dir="${build.tests}">
698 1500 tao
            <include name="**/${testtorun}.class" />
699
          </fileset>
700
        </batchtest>
701
     </junit>
702
   </target>
703
704 1939 brooke
  <target name="gethttpclient" depends="prepare"
705
            description="checks out and compiles morpho httpclient code">
706 1311 berkley
  <!--mkdir dir="${morphosourcedir}" -->
707 1487 tao
        <cvs cvsRoot="${cvsroot}"
708 1103 tao
             package="morpho"
709
             dest="." />
710 1107 tao
        <ant dir="${morphosourcedir}" inheritAll="false"  target="jar" />
711 1103 tao
   </target>
712
713
   <!-- run this target, we need to check out a another morpho souce dir was checked out. -->
714 1939 brooke
   <target name="nettest" depends="install"
715
            description="compiles and runs the metacatnettest code">
716
717 1103 tao
      <echo>***********************************
718 1311 berkley
      Please run ant gethttpclient first!
719
      ***********************************
720 1103 tao
      </echo>
721
      <!-- copy and compile the tests into a jar file -->
722 1116 tao
      <mkdir dir="${build.metacatnettest}"/>
723 1103 tao
      <javac srcdir="${junitnettestsdir}"
724 1116 tao
             destdir="${build.metacatnettest}"
725 1103 tao
             classpath="${cpath}:${build.dir}/${name}.jar:${httpclient}"
726
             includes="**/*.java" />
727
728
      <jar jarfile="${build.dir}/${name}-junitnettests.jar"
729 1116 tao
                    basedir="${build.metacatnettest}"
730 1103 tao
                    includes="**/*.class" />
731
732
      <!-- use the ant "junit" task to run JUnit tests. -->
733 1107 tao
      <junit printsummary="yes" haltonfailure="no" fork="yes"
734 1103 tao
             haltonerror="no">
735 1107 tao
        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
736 1103 tao
        <classpath>
737 1807 tao
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${httpclient}:${build.dir}/${name}-junitnettests.jar:${itislib}" />
738 1103 tao
        </classpath>
739
740
        <formatter type="plain" />
741
742
        <batchtest fork="yes" todir="${build.dir}">
743 1116 tao
          <fileset dir="${build.metacatnettest}">
744
            <include name="**/*.class" />
745 1103 tao
          </fileset>
746
        </batchtest>
747
     </junit>
748 1311 berkley
   </target>
749 1103 tao
750 1939 brooke
   <target name="cleanweb" depends="clean"
751
            description="deletes tomcat web context dir and all its contents">
752 1522 berkley
     <delete dir="${installdir}" />
753
   </target>
754
755
756 1939 brooke
   <target name="clean" depends="init"
757
            description="deletes build dir and any files copied to cvs sandbox by build process (jars, xsl) Currently *not* schema/DTDs">
758 822 jones
       <delete dir="${build.dir}" />
759 1822 jones
       <delete file="lib/httpclient.jar" />
760
       <delete file="lib/utilities.jar" />
761 1939 brooke
       <delete includeEmptyDirs="true" failonerror="false">
762
         <fileset dir="${style-common-cvsrelpath}">
763
           <include name="${eml-css}" />
764
           <include name="eml-*/*.xsl" />
765
           <include name="eml-*" />
766
         </fileset>
767
     </delete>
768 113 jones
   </target>
769
770 1939 brooke
   <target name="jdoc" depends="prepare"
771
            description="generates javadoc documentation">
772 822 jones
       <javadoc packagenames="edu.ucsb.nceas.*"
773 516 jones
           sourcepath="${build.src}"
774
           destdir="${build.javadocs}"
775 113 jones
           author="true"
776
           version="true"
777
           use="true"
778 348 jones
           windowtitle="${Name} API"
779
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
780 113 jones
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
781
       />
782
   </target>
783
784 1939 brooke
   <target name="dist" depends="jar,protocol,jdoc,geteml"
785
            description="prepares a full release distribution">
786 806 jones
      <mkdir dir="${dist.dir}"/>
787
      <delete dir="${ver.dir}" />
788
      <mkdir dir="${ver.dir}"/>
789
      <copy todir="${ver.dir}">
790 1311 berkley
        <fileset dir="."
791 882 jones
            excludes="**/CVS* **/.#* **/src* **/test* **/build* **/docs* ${dist.dir}"/>
792 806 jones
      </copy>
793
      <copy todir="${ver.dir}" file="build.xml"/>
794
      <copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
795
      <copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
796 882 jones
797
      <copy todir="${ver.dir}/docs" filtering="yes">
798
        <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
799
      </copy>
800
      <copy todir="${ver.dir}/docs" filtering="no">
801
        <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
802
      </copy>
803 806 jones
      <copy todir="${ver.dir}/docs/dev">
804
        <fileset dir="${build.dir}/docs"/>
805
      </copy>
806 917 berkley
      <copy todir="${ver.dir}/src">
807
        <fileset dir="${build.dir}/src"/>
808
      </copy>
809
810 992 berkley
      <delete dir="./${ver.dir}/${build.dir}"/>
811
      <delete dir="./${ver.dir}/dist"/>
812 882 jones
      <delete file="./${name}-${release}.zip"/>
813 1312 tao
      <zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
814 882 jones
      <delete file="./${name}-${release}.tar.gz" />
815 1312 tao
      <tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
816 1311 berkley
      <gzip zipfile="./${name}-${release}.tar.gz"
817 882 jones
                src="./${name}-${release}.tar"/>
818
      <delete file="./${name}-${release}.tar" />
819 1311 berkley
  </target>
820 806 jones
821 1939 brooke
  <target name="distsrc" depends="dist"
822
            description="prepares a source distribution">
823 806 jones
      <mkdir dir="${ver.src}"/>
824
      <copy todir="${ver.src}">
825
        <fileset dir="./src"/>
826
      </copy>
827
828 882 jones
      <delete file="./${name}-src-${release}.zip"/>
829
      <zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
830
      <delete file="./${name}-src-${release}.tar.gz" />
831
      <tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
832 1311 berkley
      <gzip zipfile="./${name}-src-${release}.tar.gz"
833 882 jones
                src="./${name}-src-${release}.tar"/>
834
      <delete file="./${name}-src-${release}.tar" />
835 807 jones
      <delete dir="${dist.dir}"/>
836 1311 berkley
  </target>
837 806 jones
838 1702 tao
   <target name="stylesheettest">
839 1939 brooke
     <xslt in="${input}" out="eml.html" style="${style-common-cvsrelpath}/eml-2.0.0/eml-2.0.0.xsl">
840 1702 tao
      <param name="displaymodule" expression="${displaymodule}"/>
841
      <param name="docid" expression="${input}"/>
842
      <param name="entitytype" expression="${entitytype}"/>
843
      <param name="entityindex" expression="${entityindex}"/>
844
      <outputproperty name="method" value="html"/>
845
      <outputproperty name="standalone" value="yes"/>
846
      <outputproperty name="encoding" value="iso8859_1"/>
847
      <outputproperty name="indent" value="yes"/>
848
    </xslt>
849
  </target>
850 1811 tao
851 1819 tao
 <target name="gridinit" depends="init">
852
   <property name="java2wsdl.tool" value="org.apache.axis.wsdl.Java2WSDL" />
853
   <property name="wsdldecorator.tool" value="org.globus.ogsa.tools.wsdl.DecorateWSDL" />
854
   <property name="wsdl.tool" value="org.globus.ogsa.tools.wsdl.GSDL2Java"/>
855
   <property environment="env"/>
856
   <property name="binding.file" value="${env.GLOBUS_LOCATION}/schema/ogsi/ogsi_bindings.wsdl"/>
857 1820 tao
    <path id="webservicepath">
858
        <pathelement location="."/>
859
        <pathelement location="${env.JAVA_HOME}/../lib/tools.jar"/>
860
        <pathelement location="${build.dest}"/>
861
        <fileset dir="${env.GLOBUS_LOCATION}/lib">
862
           <include name="*.jar"/>
863
        </fileset>
864
      </path>
865 1819 tao
</target>
866
867 1821 tao
 <target name="gridprepare" depends="gridinit, prepare">
868 1819 tao
 </target>
869 1811 tao
870 1821 tao
  <target name="compileinterface" depends="clean, gridprepare">
871 1817 tao
    <javac srcdir="${build.src}" destdir="${build.dest}" includes="**/${interface.name}.java" />
872 1811 tao
  </target>
873
874
  <target name="generateWSDL" depends="compileinterface">
875
    <echo message="Generating wsdl from ${interface.name} interface"/>
876
    <java classname="${java2wsdl.tool}"
877 1814 tao
          dir="${build.src}" fork="yes"
878 1811 tao
          classpathref="webservicepath"  failonerror="true" >
879
      <arg value="-P"/>
880
      <arg value="${interface.name}PortType"/>
881
      <arg value="-S"/>
882
      <arg value="${interface.name}Service"/>
883
      <arg value="-y"/>
884
      <arg value="WRAPPED"/>
885
      <arg value="-u"/>
886
      <arg value="LITERAL"/>
887
      <arg value="-l"/>
888
      <arg value="http://localhost/ogsa/services/${interface.name}Service"/>
889
      <arg value="-n"/>
890
      <arg value="http://${services.namespace}/${interface.name}"/>
891
      <arg value="${interface.package}.${interface.name}"/>
892
    </java>
893
  </target>
894
895
   <target name="decorateWSDL" depends="generateWSDL">
896
      <property name="wsdl.file" value="${interface.name}Service.wsdl"/>
897 1814 tao
      <java classname="${wsdldecorator.tool}" dir="${build.src}"
898 1811 tao
            fork="yes"
899
            classpathref="webservicepath" failonerror="true" >
900
        <arg value="${binding.file}"/>
901
        <arg value="${wsdl.file}"/>
902
      </java>
903
   </target>
904
905
   <target name="generatestubs" depends="decorateWSDL">
906
      <echo message=" Generating stubs " />
907 1814 tao
      <echo message="wsdl file is ${wsdl.file}"/>
908
      <echo message="build.src is ${build.src}"/>
909 1811 tao
      <java classname="${wsdl.tool}" dir="${build.src}" fork="yes"
910
            classpathref="webservicepath" failonerror="true" >
911 1814 tao
         <arg value="${wsdl.file}"/>
912 1811 tao
    </java>
913
  </target>
914
915
  <target name="compileStubsAndImpl" depends="generatestubs, utilities">
916
     <echo message=" Compiling stubs " />
917
     <javac srcdir="${build.src}" destdir="${build.dest}" classpathref="webservicepath" includes="**/${interface.name}/*.java" />
918
     <echo message=" Compiling impl " />
919
     <javac srcdir="${build.src}" destdir="${build.dest}" classpathref="webservicepath" classpath="./lib/utilities.jar" includes="**/impl/*.java" />
920
  </target>
921
922
  <target name="jarStubsAndImpl" depends="compileStubsAndImpl">
923
     <echo message=" jar stubs classes " />
924
     <jar destfile="${build.dir}/${interface.name}-stubs.jar" basedir="${build.dest}" includes="**/${interface.name}/*.class" />
925
     <echo message=" jar impl classes " />
926
     <jar destfile="${build.dir}/${interface.name}.jar" basedir="${build.dest}" includes="**/impl/*.class" />
927
  </target>
928
929
  <target name="gar" depends="jarStubsAndImpl">
930
     <echo message=" jar the gar file"/>
931
     <mkdir dir="${build.dir}/gar"/>
932
     <mkdir dir="${build.dir}/gar/schema/edu"/>
933
     <copy file="${build.dir}/${interface.name}.jar" todir="${build.dir}/gar" />
934
     <copy file="${build.dir}/${interface.name}-stubs.jar" todir="${build.dir}/gar" />
935 1814 tao
     <copy file="lib/utilities.jar" todir="${build.dir}/gar" />
936
     <copy file="lib/server-deploy.wsdd" todir="${build.dir}/gar" />
937
     <copy file="${build.src}/${interface.name}Service.wsdl" todir="${build.dir}/gar/schema/edu" />
938
     <jar destfile="lib/${interface.name}.gar" basedir="${build.dir}/gar"/>
939 1811 tao
  </target>
940 1814 tao
941
  <target name="compilewebclient" depends="prepare">
942
     <javac srcdir="${build.src}" destdir="${build.dest}" includes="**/application/*.java" classpathref="webservicepath" />
943
  </target>
944
945
  <target name="runwebclient" depends="compilewebclient">
946
     <java classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
947
           dir="${build.dest}" fork="yes"
948
           classpathref="webservicepath" classpath="./lib/utilities.jar" failonerror="true">
949
         <arg value="${serviceUrl}"/>
950
         <arg value="${docid}"/>
951
     </java>
952
  </target>
953 113 jones
</project>