Project

General

Profile

1
<?xml version="1.0"?>
2
<!--
3
  *   '$RCSfile$'
4
  *     Authors: Matt Jones, Chad Berkley, Jivka Bojilova
5
  *   Copyright: 2000 Regents of the University of California and the
6
  *              National Center for Ecological Analysis and Synthesis
7
  * For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *    '$Author: jones $'
10
  *    '$Date: 2004-09-22 13:35:59 -0700 (Wed, 22 Sep 2004) $'
11
  *    '$Revision: 2323 $'
12
  *
13
  * Build file for the Ant cross-platform build system for metacat
14
  * See http://jakarta.apache.org for details on Ant
15
  *
16
  * usage: ant [compile|jar|install|jdoc]
17
  *
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
-->
32
<project name="metacat" default="jar" basedir=".">
33
  <property environment="env"/>
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
     <!-- Customize these properties if you are using oracle -->
50
     <echo message="Using oracle..."/>
51
     <property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
52
     <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
53
     <property name="jdbc" value="${jdbc_base}/classes111.zip" />
54
     <!-- Property to indicate is not MSSQL installation-->
55
     <property name="other" value="yes"/>
56
     <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
   </target>
65

    
66
   <target name="postgresql" if="use-postgresql">
67
     <!-- Customize these properties if you are using postgres -->
68
     <echo message="Using PostgreSQL..."/>
69
     <property name="dbDriver" value="org.postgresql.Driver"/>
70
     <property name="dbAdapter"
71
               value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
72
     <property name="jdbc" value="lib/jdbc7.1-1.2.jar" />
73
     <!-- Property to indicate is not MSSQL installation-->
74
     <property name="other" value="yes"/>
75
     <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
    </target>
84

    
85
   <target name="sqlserver" if="use-sqlserver">
86
     <!-- Customize these properties if you are using SQL server -->
87
     <echo message="Using SQL Server..."/>
88
     <property name="dbDriver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
89
     <property name="dbAdapter"
90
               value="edu.ucsb.nceas.dbadapter.SqlserverAdapter"/>
91
     <property name="jdbc" value="${jdbc_base}/msbase.jar" />
92
     <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
     <property name="install-sql"
97
               value="xmltables-sqlserver.sql" />
98
   </target>
99

    
100
   <target name="config" depends="check-db,oracle,postgresql,sqlserver">
101
      <!-- usr for client testing, generally you don't need change-->
102
      <property name="mcuser" value="uid=jones,o=NCEAS,dc=ecoinformatics,dc=org"/>
103
      <property name="mcpassword" value=""/>
104
      <property name="mcanotheruser" value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org"/>
105
      <property name="mcanotherpassword" value=""/>
106

    
107
      <property name="debug" value="on" />
108
      <property name="debuglevel" value="55" />
109

    
110
      <property name="morphosourcedir" value="../morpho" />
111
      <property name="defaultcontenttype" value="application/octet-stream" />
112
      <property name="utilitiesdir" value="../utilities" />
113

    
114
      <!-- Make sure these paths match the location of the jar files
115
           on your system, the defaults should usually work -->
116
      <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
      <condition property="jsdk" value="${tomcat}/common/lib/servlet-api.jar">
123
        <equals arg1="${tomcatversion}" arg2="tomcat5" />
124
      </condition>
125
      <echo>*********** tomcatversion = ${tomcatversion}</echo>
126
      <echo>*********** set jsdk to ${jsdk}</echo>
127
      <property name="xmlp"
128
                value="lib/xercesImpl.jar" />
129
      <property name="cos"
130
                value="lib/cos.jar" />
131
      <property name="morpho"
132
                value="lib/morpho.jar" />
133
      <property name="xalan"
134
                value="lib/xalan/xalan.jar" />
135
      <property name="apis"
136
                value="lib/xalan/xml-apis.jar" />
137
      <property name="httpclient"
138
                value="lib/httpclient.jar" />
139
      <property name="emlparser"
140
                value="lib/eml.jar" />
141
      <property name="configxml"
142
                value="lib/configxml.jar" />
143
      <property name="itislib"
144
                value="lib/itislib.jar" />
145
      <property name="emlparser"
146

    
147
                value="lib/eml.jar" />
148
      <property name="util"
149
                value="lib/utilities.jar" />
150
  </target>
151

    
152
   <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
      <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
      <property name="release"             value="1.4.0"/>
161
      <property name="replication-path"    value="/${context}/servlet/replication"/>
162
      <property name="harvester-registration-login-path" value="/${context}/servlet/HarvesterRegistrationLogin"/>
163
      <property name="harvester-registration-path"       value="/${context}/servlet/HarvesterRegistration"/>
164
      <property name="servlet-path"        value="/${context}/metacat"/>
165
      <property name="html-path"           value="/${context}"/>
166
      <property name="systemidserver"      value="http://${httpserver}"/>
167
      <property name="style-common-relpath"
168
                                           value="/style/common"/>
169
      <property name="style-common-cvsrelpath"
170
                                           value="lib${style-common-relpath}"/>
171
      <property name="style-common-fullpath"
172
                                           value="/${installdir}${style-common-relpath}"/>
173
      <property name="style-common-path"
174
                                           value="/${context}${style-common-relpath}"/>
175
      <property name="style-skins-relpath" value="/style/skins"/>
176
      <property name="style-skins-path"    value="/${context}${style-skins-relpath}"/>
177
      <property name="replication-log"     value="/tmp/metacatreplication.log"/>
178
      <property name="replicationerrorlog" value="/tmp/metacatreplication.err"/>
179
      <property name="config-dir"          value="${webapps}/${style-skins-path}" />
180
      <property name="eml-module"          value="eml" />
181
      <property name="eml-version"         value="2.0.0beta6" />
182
      <property name="eml-tag"             value="EML_2_0_0_BETA_6_FOR_METACAT" />
183
      <property name="eml2_0_0-tag"        value="RELEASE_EML_2_0_0_UPDATE_1" />
184
      <property name="eml2_0_1-tag"        value="RELEASE_EML_2_0_1" />
185
      <property name="eml2_0_0namespace"   value="eml://ecoinformatics.org/eml-2.0.0" />
186
      <property name="eml2_0_1namespace"   value="eml://ecoinformatics.org/eml-2.0.1" />
187
      <property name="eml2_1_0namespace"   value="eml://ecoinformatics.org/eml-2.1.0" />
188
      <property name="stmmlnamespace"      value="http://www.xml-cml.org/schema/stmml" />
189
      <property name="eml-css"             value="eml_xsl.css"/>
190
      <property name="eml-module.default.css"
191
                                           value="default.css"/>
192
      <property name="conversion-module"   value="webmdentry" />
193

    
194
      <!-- Config for registry variables -->
195
      <property name="scope"               value="obfs"/>
196
      <property name="responseForm"        value="genericResponse.tmpl"/>
197
      <property name="entryForm"           value="entryForm.tmpl"/>
198
      <property name="guide"               value="genericGuide.tmpl"/>
199
      <property name="confirmData" value="confirmData.tmpl"/>
200
      <property name="deleteData" value="deleteData.tmpl"/>
201
      <property name="genericHeader" value="genericHeader.tmpl"/>
202
      <property name="genericFooter" value="genericFooter.tmpl"/>
203
      <property name="adminname" value="KNB Support"/>
204
      <property name="recipient" value="knb-software\@nceas.ucsb.edu"/>
205
      <filter token="scope" value="${scope}"/>
206
      <filter token="responseForm" value="${responseForm}"/>
207
      <filter token="entryForm" value="${entryForm}"/>
208
      <filter token="guide" value="${guide}"/>
209
      <filter token="confirmData" value="${confirmData}"/>
210
      <filter token="deleteData" value="${deleteData}"/>
211
      <filter token="genericHeader" value="${genericHeader}"/>
212
      <filter token="genericFooter" value="${genericFooter}"/>
213
      <filter token="adminname" value="${adminname}"/>
214
      <filter token="recipient" value="${recipient}"/>
215

    
216
      <property name="cpath"
217
                value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${cos}:${morpho}:${emlparser}:${jdbc-add1}:${jdbc-add2}:${util}:${httpclient}"/>
218

    
219
      <filter token="docrooturl" value="./" />
220
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
221
      <filter token="dbDriver" value="${dbDriver}"/>
222
      <filter token="dbAdapter" value="${dbAdapter}"/>
223
      <filter token="install-dir" value="${installdir}"/>
224
      <filter token="temp-dir" value="${temp-dir}"/>
225
      <filter token="server" value="${server}"/>
226
      <filter token="systemidserver" value="${systemidserver}"/>
227
      <filter token="cgi-prefix" value="${cgi-prefix}"/>
228
      <filter token="ldapUrl" value="${ldapUrl}"/>
229
      <filter token="replication-log" value="${replication-log}"/>
230
      <filter token="replicationerrorlog" value="${replicationerrorlog}"/>
231
      <filter token="release" value="${release}"/>
232
      <filter token="servlet-path" value="${servlet-path}"/>
233
      <filter token="html-path" value="${html-path}"/>
234
      <filter token="user" value="${user}"/>
235
      <filter token="password" value="${password}"/>
236
      <filter token="mcuser" value="${mcuser}"/>
237
      <filter token="mcpassword" value="${mcpassword}"/>
238
      <filter token="mcanotheruser" value="${mcanotheruser}"/>
239
      <filter token="mcanotherpassword" value="${mcanotherpassword}"/>
240
      <filter token="knb-site-url" value="${knb-site-url}"/>
241
      <filter token="eml-css" value="${eml-css}"/>
242
      <filter token="style-skins-relpath" value="${style-skins-relpath}"/>
243
      <filter token="style-skins-path" value="${style-skins-path}"/>
244
      <filter token="style-common-relpath" value="${style-common-relpath}"/>
245
      <filter token="style-common-fullpath" value="${style-common-fullpath}"/>
246
      <filter token="style-common-path" value="${style-common-path}"/>
247
      <!-- The "style-path" filter is used by the eml xsl stylesheets!!  -->
248
      <filter token="style-path" value="${style-skins-path}"/>
249
      <filter token="replication-path" value="${replication-path}"/>
250
      <filter token="harvester-registration-login-path" value="${harvester-registration-login-path}"/>
251
      <filter token="harvester-registration-path" value="${harvester-registration-path}"/>
252
      <filter token="config-dir" value="${config-dir}"/>
253
      <filter token="default-style" value="${default-style}"/>
254
      <filter token="eml-version" value="${eml-version}"/>
255
      <filter token="eml2_0_0namespace" value="${eml2_0_0namespace}"/>
256
      <filter token="eml2_0_1namespace" value="${eml2_0_1namespace}"/>
257
      <filter token="eml2_1_0namespace" value="${eml2_1_0namespace}"/>
258
      <filter token="stmmlnamespace" value="${stmmlnamespace}"/>
259
      <filter token="context" value="${context}"/>
260
      <filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" />
261
      <filter token="debuglevel" value="${debuglevel}" />
262
      <filter token="datafilepath" value="${datafilepath}" />
263
      <filter token="inlinedatafilepath" value="${inlinedatafilepath}" />
264
      <filter token="defaultcontenttype" value="${defaultcontenttype}" />
265
      <filter token="debugprefix" value="${debugprefix}"/>
266
      <filter token="administrators" value="${administrators}"/>
267

    
268
      <property name="srcdir" value="./src" />
269
      <property name="testdir" value="./test" />
270
      <property name="testtorun" value="BuildIndexTest" />
271
      <property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
272
      <property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
273
      <property name="build.dir" value="./build"/>
274
      <property name="build.src" value="${build.dir}/src"/>
275
      <property name="build.dest" value="${build.dir}/classes"/>
276
      <property name="build.docs" value="${build.dir}/docs"/>
277
      <property name="build.samples" value="${build.dir}/samples"/>
278
      <property name="build.tests" value="${build.dir}/tests"/>
279
      <property name="build.tmp" value="${build.dir}/tmp"/>
280
      <property name="build.metacattest" value="${build.tests}/metacattest"/>
281
      <property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
282
      <property name="build.data" value="${build.dir}/data"/>
283
      <property name="build.javadocs" value="${build.dir}/docs/api"/>
284
      <property name="build.war" value="${build.dir}/war"/>
285

    
286
      <property name="dist.dir" value="dist"/>
287
      <property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
288
      <property name="ver.src" value="${ver.dir}/src"/>
289

    
290
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
291
      <condition property="utilities.required">
292
        <or>
293
          <not><available file="lib/httpclient.jar"/></not>
294
          <not><available file="lib/utilities.jar"/></not>
295
        </or>
296
      </condition>
297
      <condition property="eml.required">
298
        <or>
299
          <not><available file="lib/schema/eml-2.0.1/eml.xsd"/></not>
300
          <not><available file="lib/schema/eml-2.0.0/eml.xsd"/></not>
301
          <not><available file="lib/dtd/eml-dataset-2.0.0beta6.dtd"/></not>
302
        </or>
303
      </condition>
304
   </target>
305

    
306
   <target name="prepare" depends="init">
307
      <mkdir dir="${build.dir}"/>
308
      <mkdir dir="${build.src}"/>
309
      <mkdir dir="${build.dest}"/>
310
      <mkdir dir="${build.javadocs}"/>
311
      <mkdir dir="${build.tmp}"/>
312

    
313
      <copy todir="${build.src}" filtering="yes">
314
        <fileset dir="${srcdir}">
315
          <include name="edu/**"/>
316
          <include name="com/**"/>
317
          <include name="**/*.sql"/>
318
          <exclude name="**/CVS*"/>
319
          <exclude name="**/.#*"/>
320
        </fileset>
321
      </copy>
322
      <available file="build/tmp/${conversion-module}" type="dir"
323
                 property="styles.not.needed"/>
324
   </target>
325

    
326
   <target name="compile" depends="prepare,utilities"
327
    description="Compiles java code to build dir, and copies metacat props files there">
328

    
329
       <javac srcdir="${build.src}"
330
              destdir="${build.dest}"
331
              classpath="${cpath}"
332
              debug="${debug}"
333
              excludes="**/*.sql **/stringclient/** **/client/*.java **/harvesterClient/*.java"/>
334
   </target>
335

    
336
   <target name="jar" depends="compile,geteml"
337
    description="Compiles and jars metacat java code to metacat.jar in build dir">
338

    
339
       <delete file="${build.dir}/${name}.jar" />
340
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
341
            excludes="**/protocols/ **/harvesterClient/" />
342
   </target>
343

    
344
   <target name="protocol" depends="compile"
345
    description="Compiles and jars protocol java code to protocol.jar in build dir">
346
       <delete file="${build.dir}/protocol.jar" />
347
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
348
            includes="**/protocols/" />
349
   </target>
350

    
351
   <target name="utilities" depends="config" if="utilities.required">
352
     <ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
353
     <ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
354
     <copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
355
     <copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
356
   </target>
357

    
358
   <target name="client" depends="utilities, prepare"
359
    description="Compiles metacat-client java code to build dir">
360
       <javac srcdir="${build.src}"
361
              destdir="${build.dest}"
362
              classpath="${cpath}"
363
              includes="edu/ucsb/nceas/metacat/client/*" />
364
   </target>
365

    
366
   <target name="clientjar" depends="client"
367
    description="Compiles and jars metacat-client java code to metacat-client.jar in build dir">
368
       <delete file="${build.dir}/${name}-client.jar" />
369
       <jar jarfile="${build.dir}/${name}-client.jar" basedir="${build.dest}"
370
            includes="**/metacat/client/" />
371
   </target>
372

    
373
   <target name="harvester" depends="client"
374
           description="Compiles harvester java code to build dir">
375
       <echo message="classpath is:   ${cpath}"/>
376
       <javac srcdir="${build.src}"
377
              destdir="${build.dest}"
378
              classpath="${cpath}"
379
              includes="edu/ucsb/nceas/metacat/harvesterClient/*" />
380
   </target>
381

    
382
   <target name="harvesterjar" depends="harvester"
383
           description="Compiles and jars harvester java code to harvester.jar in build dir">
384
       <delete file="${build.dir}/harvester.jar" />
385
       <jar jarfile="${build.dir}/harvester.jar" basedir="${build.dest}"
386
            includes="**/metacat/harvesterClient/" />
387
   </target>
388

    
389
   <target  name="geteml" depends="getemlpre2,geteml2+" if="eml.required"
390
            description="Calls getemlpre2 and geteml2+ targets" />
391

    
392
   <target name="getemlpre2" depends="prepare" if="eml.required"
393
   description="Checks EML-beta6 out of cvs and copies dtds and xsl to your metacat cvs sandbox">
394
     <echo>Enter CVS password: </echo>
395
     <cvs cvsRoot="${cvsroot}"
396
          package="${eml-module}"
397
          tag="${eml-tag}"
398
          dest="${build.tmp}/eml_${eml-tag}" />
399
     <mkdir dir="lib/dtd" />
400
     <copy todir="lib/dtd" filtering="yes">
401
       <fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}">
402
         <include name="*.dtd"/>
403
       </fileset>
404
       <mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
405
     </copy>
406

    
407
     <copy todir="${style-common-cvsrelpath}" filtering="yes">
408
       <fileset dir="${build.tmp}/eml_${eml-tag}/${eml-module}/style">
409
       <include name="**/*.xsl"/>
410
     </fileset>
411
     </copy>
412
   </target>
413

    
414
   <target name="geteml2+" depends="prepare" if="eml.required"
415
   description="Checks eml-2 out of cvs and copies schema and xsl to your metacat cvs sandbox">
416
     <echo>Enter CVS password: </echo>
417
     <cvs cvsRoot="${cvsroot}"
418
          package="${eml-module}"
419
          tag="${eml2_0_0-tag}"
420
          dest="${build.tmp}/eml_${eml2_0_0-tag}" />
421
     <mkdir dir="lib/schema/eml-2.0.0" />
422
     <copy todir="lib/schema/eml-2.0.0" filtering="yes">
423
       <fileset dir="${build.tmp}/eml_${eml2_0_0-tag}/${eml-module}">
424
         <include name="*.xsd"/>
425
       </fileset>
426

    
427
       <!-- shouldn't we have a mapper here like this??
428
       <mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" />
429

    
430
       Jing's code didn't nave one - does it need to be added?
431
       NOTE that eml-version is set to beta 6, so this would need changing -->
432

    
433
     </copy>
434
     <antcall target="copyxsl">
435
        <param name="cvs.tagname" value="${eml2_0_0-tag}" />
436
        <param name="dirname" value="eml-2.0.0" />
437
     </antcall>
438

    
439
     <echo>Enter CVS password: </echo>
440
     <cvs cvsRoot="${cvsroot}"
441
          package="${eml-module}"
442
          tag="${eml2_0_1-tag}"
443
          dest="${build.tmp}/eml_${eml2_0_1-tag}" />
444
     <mkdir dir="lib/schema/eml-2.0.1" />
445
     <copy todir="lib/schema/eml-2.0.1" filtering="yes">
446
       <fileset dir="${build.tmp}/eml_${eml2_0_1-tag}/${eml-module}">
447
         <include name="*.xsd"/>
448
       </fileset>
449
     </copy>
450
     <antcall target="copyxsl">
451
        <param name="cvs.tagname" value="${eml2_0_1-tag}" />
452
        <param name="dirname" value="eml-2.0.1" />
453
     </antcall>
454
   </target>
455

    
456

    
457

    
458
   <target  name="copyxsl"
459
   description="Copies xsl stylesheets from checkout in build/tmp to your metacat cvs sandbox">
460

    
461
     <delete file="${style-common-cvsrelpath}/${eml-css}"/>
462

    
463
     <copy todir="${style-common-cvsrelpath}/${dirname}" filtering="yes">
464
       <fileset dir="${build.tmp}/eml_${cvs.tagname}/${eml-module}/style/eml">
465
       <include name="**/*.xsl"/>
466
     </fileset>
467
     </copy>
468

    
469

    
470
     <!-- now copy default css from eml module and put it in style-common-path
471
          dir with a new name, so other skin-specific css can import it if reqd -->
472
     <copy file="${build.tmp}/eml_${cvs.tagname}/${eml-module}/${eml-module.default.css}"
473
           tofile="${style-common-cvsrelpath}/${eml-css}" />
474

    
475
   </target>
476

    
477

    
478

    
479
   <target name="register-schemas" depends="prepare"
480
   description="Registers the Schemas with a new Metacat instance">
481
     <echo/>
482
     <echo>Registering the Schemas with the new Metacat instance...</echo>
483
     <sql driver="${dbDriver}"
484
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
485
          url="${jdbc-connect}"
486
          userid="${user}"
487
          password="${password}"
488
          src="${build.src}/loaddtdschema.sql" />
489
   </target>
490

    
491
   <target name="installdb" depends="prepare"
492
            description="Installs the database tables">
493
     <echo/>
494
     <echo>Installing the database tables...</echo>
495
     <sql driver="${dbDriver}"
496
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
497
          url="${jdbc-connect}"
498
          userid="${user}"
499
          password="${password}"
500
          src="${build.src}/${install-sql}" />
501
   </target>
502

    
503
   <target name="upgrade12" depends="prepare"
504
            description="Updates the database tables to upgrade to version 1.2">
505
     <echo/>
506
     <echo>Updating the database tables to upgrade to version 1.2...</echo>
507
     <sql driver="${dbDriver}"
508
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
509
          url="${jdbc-connect}"
510
          userid="${user}"
511
          password="${password}"
512
          src="${build.src}/${upgrade-1.2-sql}" />
513
   </target>
514

    
515
   <target name="upgrade13" depends="prepare"
516
            description="Updates the database tables to upgrade to version 1.3">
517
     <echo/>
518
     <echo>Updating the database tables to upgrade to version 1.3...</echo>
519
     <sql driver="${dbDriver}"
520
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
521
          url="${jdbc-connect}"
522
          userid="${user}"
523
          password="${password}"
524
          src="${build.src}/${upgrade-1.3-sql}" />
525
   </target>
526

    
527
   <target name="upgrade14" depends="prepare"
528
            description="Updates the database tables to upgrade to version 1.4">
529
     <echo/>
530
     <echo>Updating the database tables to upgrade to version 1.4...</echo>
531
     <sql driver="${dbDriver}"
532
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
533
          url="${jdbc-connect}"
534
          userid="${user}"
535
          password="${password}"
536
          src="${build.src}/${upgrade-1.4-sql}" />
537
   </target>
538

    
539
   <target name="install" depends="war" description="* Full Install *">
540
       <mkdir dir="${datafilepath}" />
541
       <mkdir dir="${inlinedatafilepath}" />
542
       <chmod dir="${datafilepath}" perm="ug+w" />
543
       <mkdir dir="${temp-dir}"/>
544
       <chmod dir="${temp-dir}" perm="ug+w" />
545
       <copy file="${build.dir}/${context}.war" todir="${webapps}"/>
546
   </target>
547

    
548
   <target name="upgrade" depends="install"
549
          description="* Upgrade an existing metacat installation with a new version *">
550
       <unwar src="${webapps}/${context}.war" dest="${webapps}/${context}" />
551
   </target>
552

    
553
   <target name="install-registry" depends="init,getConversionXSL"
554
            description="Install Registry">
555

    
556
      <copy file="${srcdir}/perl/register-dataset.cgi"
557
            todir="${inst.cgi.dir}" filtering="yes"/>
558
      <chmod file="${inst.cgi.dir}/register-dataset.cgi" perm="ugo+x" />
559

    
560
      <mkdir dir="${temp-dir}" />
561
     <copy todir="${temp-dir}" filtering="yes">
562
       <fileset dir="${build.tmp}/${conversion-module}/lib/style">
563
         <include name="*.xsl"/>
564
         <include name="*.xml"/>
565
       </fileset>
566
     </copy>
567

    
568
      <echo message="Install Registry completed." />
569
   </target>
570

    
571
   <target name="install-skin" depends="init"
572
            description="Install a Skin">
573

    
574
      <input message="Please enter name of the skin"
575
             addproperty="skin-name"/>
576

    
577
      <mkdir dir="${installdir}/style/skins/${skin-name}" />
578
      <copy todir="${installdir}/style/skins/${skin-name}" filtering="yes">
579
       <fileset dir="lib/style/skins/${skin-name}">
580
           <exclude name="*.png"/>
581
           <exclude name="*.gif"/>
582
           <exclude name="*.jpg"/>
583
           <exclude name="**/CVS*"/>
584
           <exclude name="**/.#*"/>
585
       </fileset>
586
      </copy>
587
     <copy todir="${installdir}/style/skins/${skin-name}" filtering="no">
588
       <fileset dir="lib/style/skins/${skin-name}">
589
           <include name="*.png"/>
590
           <include name="*.gif"/>
591
           <include name="*.jpg"/>
592
           <exclude name="**/CVS*"/>
593
           <exclude name="**/.#*"/>
594
       </fileset>
595
      </copy>
596
      <!--
597
      <mkdir dir="${installdir}/style/skins/${skin-name}/images" />
598
     <copy todir="${installdir}/style/skins/${skin-name}/images" filtering="no">
599
       <fileset dir="lib/style/skins/${skin-name}/images">
600
           <include name="*.png"/>
601
           <include name="*.gif"/>
602
           <include name="*.jpg"/>
603
       </fileset>
604
      </copy>
605
      -->
606

    
607
      <echo message="Install Skin completed." />
608
   </target>
609

    
610
   <target name="war" depends="warPrepare,warMSSQL"
611
            description="Create a web archive (WAR) for servlet deployment">
612
       <war destfile="${build.dir}/${context}.war"
613
            webxml="${build.war}/web.xml">
614
         <fileset dir="${war.context}"/>
615
         <lib dir="${war.lib}"/>
616
         <webinf dir="${war.webinf}"/>
617
       </war>
618
   </target>
619

    
620
   <target name="warPrepare" depends="jar,clientjar,harvesterjar"
621
            description="Prepare files for creating a web archive (WAR)">
622

    
623
       <property name="war.lib" value="${build.war}/lib" />
624
       <property name="war.webinf" value="${build.war}/WEB-INF" />
625
       <property name="war.context" value="${build.war}/${context}" />
626
       <mkdir dir="${war.lib}" />
627
       <mkdir dir="${war.webinf}" />
628
       <mkdir dir="${war.context}" />
629

    
630
       <copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
631
       <copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
632
       <copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
633
       <copy todir="${war.lib}" filtering="no">
634
         <fileset dir="lib">
635
           <include name="*.jar"/>
636
         </fileset>
637
         <fileset dir="lib/xalan">
638
           <include name="*.jar"/>
639
         </fileset>
640
       </copy>
641
       <copy file="${jdbc}" tofile="${war.lib}/jdbc.jar" />
642
       <copy file="lib/web.xml.${tomcatversion}"
643
             tofile="${build.war}/web.xml" />
644
       <copy file="lib/metacat.properties" todir="${war.webinf}"
645
             filtering="yes" />
646
       <copy todir="${war.context}" filtering="no">
647
         <fileset dir="lib">
648
           <include name="**/*.jpg"/>
649
           <include name="**/*.png"/>
650
           <include name="**/*.gif"/>
651
         </fileset>
652
       </copy>
653
       <copy todir="${war.context}" filtering="yes">
654
         <fileset dir="lib">
655
           <exclude name="*.jar"/>
656
           <exclude name="*.properties"/>
657
           <exclude name="web.xml"/>
658
           <exclude name="**/*.jpg"/>
659
           <exclude name="**/*.png"/>
660
           <exclude name="**/*.gif"/>
661
         </fileset>
662
       </copy>
663
       <copy todir="${war.context}" filtering="no">
664
         <fileset dir="lib">
665
           <include name="**/*.jpg"/>
666
           <include name="**/*.png"/>
667
           <include name="**/*.gif"/>
668
         </fileset>
669
       </copy>
670
   </target>
671

    
672
   <target name="warMSSQL" if="MSSQL" depends="warPrepare">
673
      <copy file="${jdbc-add1}" tofile="${war.lib}/msutil.jar" />
674
       <copy file="${jdbc-add2}" tofile="${war.lib}/mssqlserver.jar" />
675
   </target>
676

    
677
   <target name="getConversionXSL" depends="prepare"
678
            unless="styles.not.needed"
679
            description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
680
     <echo>Enter CVS password: </echo>
681
     <cvs cvsRoot="${cvsroot-alternate}"
682
          package="${conversion-module}"
683
          dest="${build.tmp}" />
684
   </target>
685

    
686
   <target name="testprep" depends="jar,clientjar,harvesterjar">
687
      <mkdir dir="${build.tests}"/>
688
      <copy todir="${build.tests}" filtering="yes">
689
        <fileset dir="${testdir}">
690
          <include name="edu/**"/>
691
        </fileset>
692
      </copy>
693
      <!-- copy and compile the tests into a jar file -->
694
      <javac srcdir="${build.tests}"
695
             destdir="${build.tests}"
696
             classpath="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/harvester.jar"
697
             debug="on"
698
       includes="**/*.java" />
699

    
700
      <jar jarfile="${build.dir}/${name}-junittests.jar"
701
        basedir="${build.tests}"
702
                includes="**/*.class" />
703
   </target>
704

    
705
   <target name="test" depends="testprep"
706
            description="Uses the ant junit task to run all JUnit tests">
707

    
708
      <!-- use the ant "junit" task to run JUnit tests. -->
709
      <junit printsummary="yes" haltonfailure="no" fork="yes"
710
             haltonerror="no">
711
        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
712
        <classpath>
713
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/${name}-junittests.jar" />
714
        </classpath>
715

    
716
        <formatter type="plain" />
717

    
718
        <batchtest fork="yes" todir="${build.dir}">
719
          <fileset dir="${build.tests}">
720
            <include name="**/*.class" />
721
          </fileset>
722
        </batchtest>
723
     </junit>
724
   </target>
725

    
726
    <target name="runonetest" depends="testprep"
727
            description="Uses the ant junit task to run a single JUnit test, defined by the ${testtorun} property">
728

    
729
              <echo>testtorun: ${testtorun}</echo>
730

    
731
      <!-- use the ant "junit" task to run JUnit tests. -->
732
      <junit printsummary="yes" haltonfailure="no" fork="yes"
733
             haltonerror="no">
734
        <!--<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>-->
735
        <classpath>
736
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/${name}-junittests.jar" />
737
        </classpath>
738

    
739
        <formatter type="plain" />
740

    
741
        <batchtest fork="yes" todir="${build.dir}">
742
          <fileset dir="${build.tests}">
743
            <include name="**/${testtorun}.class" />
744
          </fileset>
745
        </batchtest>
746
     </junit>
747
   </target>
748

    
749
   <target name="testharvester"
750
           depends="testprep"
751
           description="Uses the ant junit task to test only the Harvester code">
752
     <junit printsummary="yes"
753
            haltonfailure="off"
754
            fork="yes"
755
            haltonerror="off">
756
       <classpath>
757
         <pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-client.jar:${build.dir}/harvester.jar:${build.dir}/${name}-junittests.jar" />
758
       </classpath>
759
       <formatter type="plain" />
760
       <batchtest fork="yes" todir="${build.dir}">
761
         <fileset dir="${build.tests}">
762
           <include name="**/harvesterClient/*.class" />
763
         </fileset>
764
       </batchtest>
765
     </junit>
766
   </target>
767

    
768
  <target name="gethttpclient" depends="prepare"
769
            description="checks out and compiles morpho httpclient code">
770
  <!--mkdir dir="${morphosourcedir}" -->
771
        <cvs cvsRoot="${cvsroot}"
772
             package="morpho"
773
             dest="." />
774
        <ant dir="${morphosourcedir}" inheritAll="false"  target="jar" />
775
   </target>
776

    
777
   <!-- run this target, we need to check out a another morpho souce dir was checked out. -->
778
   <target name="nettest" depends="install"
779
            description="compiles and runs the metacatnettest code">
780

    
781
      <echo>***********************************
782
      Please run ant gethttpclient first!
783
      ***********************************
784
      </echo>
785
      <!-- copy and compile the tests into a jar file -->
786
      <mkdir dir="${build.metacatnettest}"/>
787
      <javac srcdir="${junitnettestsdir}"
788
             destdir="${build.metacatnettest}"
789
             classpath="${cpath}:${build.dir}/${name}.jar:${httpclient}"
790
             includes="**/*.java" />
791

    
792
      <jar jarfile="${build.dir}/${name}-junitnettests.jar"
793
                    basedir="${build.metacatnettest}"
794
                    includes="**/*.class" />
795

    
796
      <!-- use the ant "junit" task to run JUnit tests. -->
797
      <junit printsummary="yes" haltonfailure="no" fork="yes"
798
             haltonerror="no">
799
        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
800
        <classpath>
801
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${httpclient}:${build.dir}/${name}-junitnettests.jar:${itislib}" />
802
        </classpath>
803

    
804
        <formatter type="plain" />
805

    
806
        <batchtest fork="yes" todir="${build.dir}">
807
          <fileset dir="${build.metacatnettest}">
808
            <include name="**/*.class" />
809
          </fileset>
810
        </batchtest>
811
     </junit>
812
   </target>
813

    
814
   <target name="cleanweb" depends="clean"
815
            description="deletes tomcat web context dir and all its contents">
816
     <delete dir="${installdir}" />
817
   </target>
818

    
819

    
820
   <target name="clean" depends="init"
821
            description="deletes build dir and files that can be regenerated form the release">
822
       <delete dir="${build.dir}" />
823
   </target>
824

    
825
   <target name="fullclean" depends="clean"
826
            description="deletes even jars that depend on external sources such as stylesheets and jars">
827
       <delete file="lib/httpclient.jar" />
828
       <delete file="lib/utilities.jar" />
829
       <delete includeEmptyDirs="true" failonerror="false">
830
         <fileset dir="${style-common-cvsrelpath}">
831
           <include name="${eml-css}" />
832
           <include name="eml-*/*.xsl" />
833
           <include name="eml-*" />
834
         </fileset>
835
       </delete>
836
   </target>
837

    
838
   <target name="jdoc" depends="prepare"
839
            description="generates javadoc documentation">
840
       <javadoc packagenames="edu.ucsb.nceas.*"
841
           sourcepath="${build.src}"
842
           destdir="${build.javadocs}"
843
           classpath="${cpath}"
844
           author="true"
845
           version="true"
846
           use="true"
847
           windowtitle="${Name} API"
848
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
849
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
850
       />
851
   </target>
852

    
853
   <target name="dist" depends="geteml,jar,protocol,jdoc"
854
            description="prepares a full release distribution">
855
      <mkdir dir="${dist.dir}"/>
856
      <delete dir="${ver.dir}" />
857
      <mkdir dir="${ver.dir}"/>
858
      <copy todir="${ver.dir}">
859
        <fileset dir="."
860
            excludes="**/CVS* **/.#* src/** test/** build/** docs/** ${dist.dir}/**"/>
861
      </copy>
862
      <copy todir="${ver.dir}" file="build.xml"/>
863
      <copy todir="${ver.dir}" file="build.properties"/>
864

    
865
      <copy todir="${ver.dir}/docs" filtering="yes">
866
        <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
867
      </copy>
868
      <copy todir="${ver.dir}/docs" filtering="no">
869
        <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
870
      </copy>
871
      <copy todir="${ver.dir}/docs/dev">
872
        <fileset dir="${build.dir}/docs"/>
873
      </copy>
874
      <copy todir="${ver.dir}/src">
875
        <fileset dir="${build.dir}/src"/>
876
      </copy>
877

    
878
      <!--
879
      <delete dir="./${ver.dir}/${build.dir}"/>
880
      <delete dir="./${ver.dir}/dist"/>
881
      -->
882
      <delete file="./${name}-${release}.zip"/>
883
      <zip zipfile="./${name}-${release}.zip" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
884
      <delete file="./${name}-${release}.tar.gz" />
885
      <tar tarfile="./${name}-${release}.tar" basedir="${dist.dir}" excludes="${name}-${release}/src/**, ${name}-${release}/build/src/**"/>
886
      <gzip zipfile="./${name}-${release}.tar.gz"
887
                src="./${name}-${release}.tar"/>
888
      <delete file="./${name}-${release}.tar" />
889
  </target>
890

    
891
  <target name="distsrc" depends="dist"
892
            description="prepares a source distribution">
893
      <mkdir dir="${ver.src}"/>
894
      <copy todir="${ver.src}">
895
        <fileset dir="./src"/>
896
      </copy>
897

    
898
      <delete file="./${name}-src-${release}.zip"/>
899
      <zip zipfile="./${name}-src-${release}.zip" basedir="${dist.dir}"/>
900
      <delete file="./${name}-src-${release}.tar.gz" />
901
      <tar tarfile="./${name}-src-${release}.tar" basedir="${dist.dir}"/>
902
      <gzip zipfile="./${name}-src-${release}.tar.gz"
903
                src="./${name}-src-${release}.tar"/>
904
      <delete file="./${name}-src-${release}.tar" />
905
      <delete dir="${dist.dir}"/>
906
  </target>
907

    
908
   <target name="stylesheettest">
909
     <xslt in="${input}" out="eml.html" style="${style-common-cvsrelpath}/eml-2.0.0/eml-2.0.0.xsl">
910
      <param name="displaymodule" expression="${displaymodule}"/>
911
      <param name="docid" expression="${input}"/>
912
      <param name="entitytype" expression="${entitytype}"/>
913
      <param name="entityindex" expression="${entityindex}"/>
914
      <outputproperty name="method" value="html"/>
915
      <outputproperty name="standalone" value="yes"/>
916
      <outputproperty name="encoding" value="iso8859_1"/>
917
      <outputproperty name="indent" value="yes"/>
918
    </xslt>
919
  </target>
920

    
921
 <target name="gridinit" depends="init">
922
   <property name="java2wsdl.tool" value="org.apache.axis.wsdl.Java2WSDL" />
923
   <property name="wsdldecorator.tool" value="org.globus.ogsa.tools.wsdl.DecorateWSDL" />
924
   <property name="wsdl.tool" value="org.globus.ogsa.tools.wsdl.GSDL2Java"/>
925
   <property environment="env"/>
926
   <property name="binding.file" value="${env.GLOBUS_LOCATION}/schema/ogsi/ogsi_bindings.wsdl"/>
927
    <path id="webservicepath">
928
        <pathelement location="."/>
929
        <pathelement location="${env.JAVA_HOME}/../lib/tools.jar"/>
930
        <pathelement location="${build.dest}"/>
931
        <fileset dir="${env.GLOBUS_LOCATION}/lib">
932
           <include name="*.jar"/>
933
        </fileset>
934
      </path>
935
</target>
936

    
937
 <target name="gridprepare" depends="gridinit, prepare">
938
 </target>
939

    
940
  <target name="compileinterface" depends="clean, gridprepare">
941
    <javac srcdir="${build.src}" destdir="${build.dest}" includes="**/${interface.name}.java" />
942
  </target>
943

    
944
  <target name="generateWSDL" depends="compileinterface">
945
    <echo message="Generating wsdl from ${interface.name} interface"/>
946
    <java classname="${java2wsdl.tool}"
947
          dir="${build.src}" fork="yes"
948
          classpathref="webservicepath"  failonerror="true" >
949
      <arg value="-P"/>
950
      <arg value="${interface.name}PortType"/>
951
      <arg value="-S"/>
952
      <arg value="${interface.name}Service"/>
953
      <arg value="-y"/>
954
      <arg value="WRAPPED"/>
955
      <arg value="-u"/>
956
      <arg value="LITERAL"/>
957
      <arg value="-l"/>
958
      <arg value="http://localhost/ogsa/services/${interface.name}Service"/>
959
      <arg value="-n"/>
960
      <arg value="http://${services.namespace}/${interface.name}"/>
961
      <arg value="${interface.package}.${interface.name}"/>
962
    </java>
963
  </target>
964

    
965
   <target name="decorateWSDL" depends="generateWSDL">
966
      <property name="wsdl.file" value="${interface.name}Service.wsdl"/>
967
      <java classname="${wsdldecorator.tool}" dir="${build.src}"
968
            fork="yes"
969
            classpathref="webservicepath" failonerror="true" >
970
        <arg value="${binding.file}"/>
971
        <arg value="${wsdl.file}"/>
972
      </java>
973
   </target>
974

    
975
   <target name="generatestubs" depends="decorateWSDL">
976
      <echo message=" Generating stubs " />
977
      <echo message="wsdl file is ${wsdl.file}"/>
978
      <echo message="build.src is ${build.src}"/>
979
      <java classname="${wsdl.tool}" dir="${build.src}" fork="yes"
980
            classpathref="webservicepath" failonerror="true" >
981
         <arg value="${wsdl.file}"/>
982
    </java>
983
  </target>
984

    
985
  <target name="compileStubsAndImpl" depends="generatestubs, utilities">
986
     <echo message=" Compiling stubs " />
987
     <javac srcdir="${build.src}" destdir="${build.dest}" classpathref="webservicepath" includes="**/${interface.name}/*.java" />
988
     <echo message=" Compiling impl " />
989
     <javac srcdir="${build.src}" destdir="${build.dest}" classpathref="webservicepath" classpath="./lib/utilities.jar" includes="**/impl/*.java" />
990
  </target>
991

    
992
  <target name="jarStubsAndImpl" depends="compileStubsAndImpl">
993
     <echo message=" jar stubs classes " />
994
     <jar destfile="${build.dir}/${interface.name}-stubs.jar" basedir="${build.dest}" includes="**/${interface.name}/*.class" />
995
     <echo message=" jar impl classes " />
996
     <jar destfile="${build.dir}/${interface.name}.jar" basedir="${build.dest}" includes="**/impl/*.class" />
997
  </target>
998

    
999
  <target name="gar" depends="jarStubsAndImpl">
1000
     <echo message=" jar the gar file"/>
1001
     <mkdir dir="${build.dir}/gar"/>
1002
     <mkdir dir="${build.dir}/gar/schema/edu"/>
1003
     <copy file="${build.dir}/${interface.name}.jar" todir="${build.dir}/gar" />
1004
     <copy file="${build.dir}/${interface.name}-stubs.jar" todir="${build.dir}/gar" />
1005
     <copy file="lib/utilities.jar" todir="${build.dir}/gar" />
1006
     <copy file="lib/server-deploy.wsdd" todir="${build.dir}/gar" />
1007
     <copy file="${build.src}/${interface.name}Service.wsdl" todir="${build.dir}/gar/schema/edu" />
1008
     <jar destfile="lib/${interface.name}.gar" basedir="${build.dir}/gar"/>
1009
  </target>
1010

    
1011
  <target name="compilewebclient" depends="prepare">
1012
     <javac srcdir="${build.src}" destdir="${build.dest}" includes="**/application/*.java" classpathref="webservicepath" />
1013
  </target>
1014

    
1015
  <target name="runwebclient" depends="compilewebclient">
1016
     <java classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
1017
           dir="${build.dest}" fork="yes"
1018
           classpathref="webservicepath" classpath="./lib/utilities.jar" failonerror="true">
1019
         <arg value="${serviceUrl}"/>
1020
         <arg value="${docid}"/>
1021
     </java>
1022
  </target>
1023
</project>
(5-5/5)