Project

General

Profile

« Previous | Next » 

Revision 4098

Added by daigle over 16 years ago

Add db jars to the war. Remove db upgrade sections. Reformat properties.

View differences:

build.xml
32 32
<project name="metacat" default="jar" basedir=".">
33 33
  <property environment="env"/>
34 34
  <property file="build.properties"/>  <!-- USER SPECIFIC PROPS -->
35

  
36
  <!-- Determine which tomcat we are using and tomcat-specific settings -->
37
	 <!-- MCD HACK -->
38
	<property name="jsdk" value="${build.tomcat.dir}/common/lib/servlet-api.jar"/>
39
  <!-- MCD BYE condition property="jsdk" value="${tomcat}/common/lib/servlet.jar">
40
    <equals arg1="${tomcatversion}" arg2="tomcat4" />
41
  </condition>
42

  
43
  <condition property="jsdk" value="${tomcat}/common/lib/servlet-api.jar">
44
    <equals arg1="${tomcatversion}" arg2="tomcat5" />
45
  </condition -->
46 35
	
36
  
37
	
47 38
  <!-- Determine if installed ecogrid -->
48 39
  <condition property="enable.ecogrid">
49 40
    <equals arg1="${install.ecogrid}" arg2="true" />
50 41
  </condition>
51 42

  
52
  <!-- note, if you change a db driver or add a new database, you will need -->
53
  <!-- to update upgrade_db_to_1_5.java -->
54
  <target name="check-db">
55
    <condition property="use-oracle">
56
      <equals arg1="${database}" arg2="oracle" />
57
    </condition>
58
    <condition property="use-postgresql">
59
      <equals arg1="${database}" arg2="postgresql" />
60
    </condition>
61
    <condition property="use-sqlserver">
62
      <equals arg1="${database}" arg2="sqlserver" />
63
    </condition>
64
  </target>
65

  
66
  <target name="oracle" if="use-oracle">
67
     <!-- Customize these properties if you are using oracle -->
68
     <echo message="Using oracle..."/>
69
     <property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
70
     <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
71
     <property name="jdbc-jar-name" value="classes111.zip" />
72
     <property name="jdbc" value="${jdbc_base}/${jdbc-jar-name}" />
73
     <!-- Property to indicate is not MSSQL installation-->
74
     <property name="other" value="yes"/>
75
     <property name="install-sql"
76
               value="xmltables.sql" />
77
     <property name="upgrade-1.2-sql"
78
               value="upgrade-db-to-1.2.sql" />
79
     <property name="upgrade-1.3-sql"
80
               value="upgrade-db-to-1.3.sql" />
81
     <property name="upgrade-1.4-sql"
82
               value="upgrade-db-to-1.4.sql" />
83
     <property name="upgrade-1.5-sql"
84
               value="upgrade-db-to-1.5.sql" />
85
     <property name="upgrade-1.6-sql"
86
               value="upgrade-db-to-1.6.sql" />
87
     <property name="upgrade-1.7-sql"
88
               value="upgrade-db-to-1.7.sql" />
89
  	<property name="upgrade-1.8-sql"
90
  	   	               value="upgrade-db-to-1.8.sql" />
91
   </target>
92

  
93
   <target name="postgresql" if="use-postgresql">
94
     <!-- Customize these properties if you are using postgres -->
95
     <echo message="Using PostgreSQL..."/>
96
     <property name="dbDriver" value="org.postgresql.Driver"/>
97
     <property name="dbAdapter"
98
               value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
99
     <property name="jdbc-jar-name" value="postgresql-8.0-312.jdbc3.jar" />
100
     <property name="jdbc" value="lib/${jdbc-jar-name}" />
101
     <!-- Property to indicate is not MSSQL installation-->
102
     <property name="other" value="yes"/>
103
     <property name="install-sql"
104
               value="xmltables-postgres.sql" />
105
     <property name="upgrade-1.2-sql"
106
               value="upgrade-db-to-1.2-postgres.sql" />
107
     <property name="upgrade-1.3-sql"
108
               value="upgrade-db-to-1.3-postgres.sql" />
109
     <property name="upgrade-1.4-sql"
110
               value="upgrade-db-to-1.4-postgres.sql" />
111
     <property name="upgrade-1.5-sql"
112
               value="upgrade-db-to-1.5-postgres.sql" />
113
     <property name="upgrade-1.6-sql"
114
               value="upgrade-db-to-1.6-postgres.sql" />
115
     <property name="upgrade-1.7-sql"
116
               value="upgrade-db-to-1.7-postgres.sql" />
117
   	<property name="upgrade-1.8-sql"
118
   	               value="upgrade-db-to-1.8-postgres.sql" />
119
    </target>
120

  
121
   <target name="sqlserver" if="use-sqlserver">
122
     <!-- Customize these properties if you are using SQL server -->
123
     <echo message="Using SQL Server..."/>
124
     <property name="dbDriver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
125
     <property name="dbAdapter"
126
               value="edu.ucsb.nceas.dbadapter.SqlserverAdapter"/>
127
     <property name="jdbc" value="${jdbc_base}/msbase.jar" />
128
     <property name="jdbc-add1" value="${jdbc_base}/msutil.jar" />
129
     <property name="jdbc-add2" value="${jdbc_base}/mssqlserver.jar" />
130
     <!-- Property to indicate is a MSSQL installation-->
131
     <property name="MSSQL" value="yes"/>
132
     <property name="install-sql"
133
               value="xmltables-sqlserver.sql" />
134
   </target>
135

  
136
   <target name="config" depends="check-db,oracle,postgresql,sqlserver">
43
   <target name="config">
44
   	  <property name="jsdk" value="${build.tomcat.dir}/common/lib/servlet-api.jar"/>
137 45
      <!-- usr for client testing, generally you don't need change-->
138
      <property name="mcuser" value="uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org"/>
139
      <property name="mcpassword" value="kepler"/>
140
      <property name="mcanotheruser" value="uid=tao,o=NCEAS,dc=ecoinformatics,dc=org"/>
141
      <property name="mcanotherpassword" value="yourpass"/>
142
   	   <property name="piscouser" value="uid=tao,o=PISCO,dc=ecoinformatics,dc=org"/>
143
   	   <property name="piscopassword" value="yourpass"/>
144
   	   <property name="lteruser" value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org"/>
145
   	   <property name="lterpassword" value="yourpass"/>
46
      <property name="mcuser"              value="uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org"/>
47
      <property name="mcpassword"          value="kepler"/>
48
      <property name="mcanotheruser"       value="uid=tao,o=NCEAS,dc=ecoinformatics,dc=org"/>
49
      <property name="mcanotherpassword"   value="yourpass"/>
50
   	  <property name="piscouser"           value="uid=tao,o=PISCO,dc=ecoinformatics,dc=org"/>
51
   	  <property name="piscopassword"       value="yourpass"/>
52
   	  <property name="lteruser"            value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org"/>
53
   	  <property name="lterpassword"        value="yourpass"/>
146 54

  
147
      <property name="debug" value="on" />
148
      <property name="debuglevel" value="55" />
55
      <property name="debug"               value="on" />
56
      <property name="debuglevel"          value="55" />
149 57

  
150
      <property name="morphosourcedir" value="../morpho" />
151
      <property name="defaultcontenttype" value="application/octet-stream" />
152
      <property name="utilitiesdir" value="../utilities" />
58
      <property name="morphosourcedir"     value="../morpho" />
59
      <property name="defaultcontenttype"  value="application/octet-stream" />
60
      <property name="utilitiesdir"        value="../utilities" />
153 61

  
154 62
      <echo>*********** tomcatversion = ${tomcatversion}</echo>
155 63
      <echo>*********** set jsdk to ${jsdk}</echo>
......
167 75
         </fileset>
168 76
       <fileset dir="lib/lsid_lib">
169 77
         <include name="*.jar"/>
170
       </fileset>
171
       <fileset dir="${jdbc_base}">
172
         <include name="${jdbc-jar-name}"/>
173
          <include name="msbase.jar"/>
174
          <include name="msutil.jar"/>
175
          <include name="mssqlserver.jar"/>
176
       </fileset>
78
       </fileset>     	
177 79

  
178 80
        <!-- Include geoserver, geotools, et. al. -->
179 81
        <fileset dir="lib/spatial/geoserver/WEB-INF/lib">
......
191 93
      <property name="release"             value="${metacat.version}"/>
192 94
      <property name="style-common-relpath" value="/style/common"/>
193 95
      <property name="style-shared-relpath" value="/style/shared"/>
194
      <property name="schema-relpath" value="/schema"/>
96
      <property name="schema-relpath"      value="/schema"/>
195 97
      <property name="style-common-cvsrelpath" value="lib${style-common-relpath}"/>
196
   	  <property name="schema-cvsrelpath" value="lib${schema-relpath}"/>
98
   	  <property name="schema-cvsrelpath"   value="lib${schema-relpath}"/>
197 99
      <property name="style-skins-relpath" value="/style/skins"/>
198 100
      <property name="util-module"         value="utilities" />
199 101
      <property name="eml-module"          value="eml" />
......
235 137
      <filter token="recipient"            value="${recipient}"/>
236 138
   	  <filter token="metacatVersion"       value="${metacat.version}"/>
237 139

  
238
      <filter token="docrooturl" value="./" />
239
      <filter token="mcuser" value="${mcuser}"/>
240
      <filter token="mcpassword" value="${mcpassword}"/>
241
      <filter token="mcanotheruser" value="${mcanotheruser}"/>
242
      <filter token="mcanotherpassword" value="${mcanotherpassword}"/>
243
      <filter token="eml-css" value="${eml-css}"/>
244
      <filter token="style-skins-relpath" value="${style-skins-relpath}"/>
140
      <filter token="docrooturl"           value="./" />
141
      <filter token="mcuser"               value="${mcuser}"/>
142
      <filter token="mcpassword"           value="${mcpassword}"/>
143
      <filter token="mcanotheruser"        value="${mcanotheruser}"/>
144
      <filter token="mcanotherpassword"    value="${mcanotherpassword}"/>
145
      <filter token="eml-css"              value="${eml-css}"/>
146
      <filter token="style-skins-relpath"  value="${style-skins-relpath}"/>
245 147
      <filter token="style-common-relpath" value="${style-common-relpath}"/>
246 148

  
247
      <filter token="eml-version" value="${eml-version}"/>
248
      <filter token="eml2_0_0namespace" value="${eml2_0_0namespace}"/>
249
      <filter token="eml2_0_1namespace" value="${eml2_0_1namespace}"/>
250
      <filter token="eml2_1_0namespace" value="${eml2_1_0namespace}"/>
251
      <filter token="stmmlnamespace" value="${stmmlnamespace}"/>
149
      <filter token="eml-version"          value="${eml-version}"/>
150
      <filter token="eml2_0_0namespace"    value="${eml2_0_0namespace}"/>
151
      <filter token="eml2_0_1namespace"    value="${eml2_0_1namespace}"/>
152
      <filter token="eml2_1_0namespace"    value="${eml2_1_0namespace}"/>
153
      <filter token="stmmlnamespace"       value="${stmmlnamespace}"/>
252 154
      <filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" />
253
      <filter token="debuglevel" value="${debuglevel}" />
254
      <filter token="defaultcontenttype" value="${defaultcontenttype}" />
255
      <filter token="debugprefix" value="${debugprefix}"/>
256
      <filter token="indexPaths" value="${indexPaths}"/>
155
      <filter token="debuglevel"           value="${debuglevel}" />
156
      <filter token="defaultcontenttype"   value="${defaultcontenttype}" />
157
      <filter token="debugprefix"          value="${debugprefix}"/>
158
      <filter token="indexPaths"           value="${indexPaths}"/>
257 159

  
258
      <filter token="defaultStage" value="${defaultStage}"/>
259
      <filter token="defaultHeader" value="${defaultHeader}"/>
260
      <filter token="defaultFooter" value="${defaultFooter}"/>
261
      <filter token="defaultChangePass" value="${defaultChangePass}"/>
262
      <filter token="defaultResetPass" value="${defaultResetPass}"/>
263
      <filter token="changePassSuccess" value="${changePassSuccess}"/>
264
      <filter token="resetPassSuccess" value="${resetPassSuccess}"/>
265
      <filter token="registerFailed" value="${registerFailed}"/>
266
      <filter token="registerLter" value="${registerLter}"/>
267
      <filter token="registerMatch" value="${registerMatch}"/>
268
      <filter token="registerSuccess" value="${registerSuccess}"/>
269
      <filter token="register" value="${register}"/>
270
      <filter token="searchResults" value="${searchResults}"/>
160
      <filter token="defaultStage"         value="${defaultStage}"/>
161
      <filter token="defaultHeader"        value="${defaultHeader}"/>
162
      <filter token="defaultFooter"        value="${defaultFooter}"/>
163
      <filter token="defaultChangePass"    value="${defaultChangePass}"/>
164
      <filter token="defaultResetPass"     value="${defaultResetPass}"/>
165
      <filter token="changePassSuccess"    value="${changePassSuccess}"/>
166
      <filter token="resetPassSuccess"     value="${resetPassSuccess}"/>
167
      <filter token="registerFailed"       value="${registerFailed}"/>
168
      <filter token="registerLter"         value="${registerLter}"/>
169
      <filter token="registerMatch"        value="${registerMatch}"/>
170
      <filter token="registerSuccess"      value="${registerSuccess}"/>
171
      <filter token="register"             value="${register}"/>
172
      <filter token="searchResults"        value="${searchResults}"/>
271 173
   	  <filter token="ldapMainServerFailure" value="${ldapMainServerFailure}"/>
272
   	  <filter token="lter-user" value="${lteruser}"/>
273
   	  <filter token="lter-pass" value="${lterpassword}"/>
274
      <filter token="pisco-user" value="${piscouser}"/>
275
      <filter token="pisco-pass" value="${piscopassword}"/>
174
   	  <filter token="lter-user"            value="${lteruser}"/>
175
   	  <filter token="lter-pass"            value="${lterpassword}"/>
176
      <filter token="pisco-user"           value="${piscouser}"/>
177
      <filter token="pisco-pass"           value="${piscopassword}"/>
276 178
   	   
277 179
       
278
   	  <filter token="timedreplication" value="${timedreplication}" />
180
   	  <filter token="timedreplication"     value="${timedreplication}" />
279 181
   	  <filter token="firsttimedreplication" value="${firsttimedreplication}" />
280 182
   	  <filter token="timedreplicationinterval" value="${timedreplicationinterval}" />
281 183
      
282
   	  <property name="srcdir" value="./src" />
283
   	  <property name="lib.dir" value="./lib" />
284
   	  <property name="docdir" value="./docs" />
285
      <property name="testdir" value="./test" />
286
      <property name="testtorun" value="BuildIndexTest" />
287
      <property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
288
      <property name="junitnettestsdir" value="./test/edu/ucsb/nceas/metacatnettest" />
289
   	  <property name="dev.deploy.dir" value="${build.tomcat.dir}/webapps" />
290
      <property name="build.dir" value="./build"/>
291
      <property name="build.src" value="${build.dir}/src"/>
292
      <property name="build.dest" value="${build.dir}/classes"/>
293
      <property name="build.samples" value="${build.dir}/samples"/>
294
      <property name="build.tests" value="${build.dir}/tests"/>
295
      <property name="build.tmp" value="${build.dir}/tmp"/>
296
      <property name="build.metacattest" value="${build.tests}/metacattest"/>
184
   	  <property name="srcdir"              value="./src" />
185
   	  <property name="lib.dir"             value="./lib" />
186
   	  <property name="docdir"              value="./docs" />
187
      <property name="testdir"             value="./test" />
188
      <property name="testtorun"           value="BuildIndexTest" />
189
      <property name="junittestsdir"       value="./test/edu/ucsb/nceas/metacattest" />
190
      <property name="junitnettestsdir"    value="./test/edu/ucsb/nceas/metacatnettest" />
191
      <property name="build.dir"           value="./build"/>
192
      <property name="build.src"           value="${build.dir}/src"/>
193
      <property name="build.dest"          value="${build.dir}/classes"/>
194
      <property name="build.samples"       value="${build.dir}/samples"/>
195
      <property name="build.tests"         value="${build.dir}/tests"/>
196
      <property name="build.tmp"           value="${build.dir}/tmp"/>
197
      <property name="build.metacattest"   value="${build.tests}/metacattest"/>
297 198
      <property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
298
      <property name="build.data" value="${build.dir}/data"/>
299
      <property name="build.javadocs" value="${build.dir}/docs/api"/>
300
      <property name="build.war" value="${build.dir}/war"/>
301

  
302
      <property name="dist.dir" value="dist"/>
303
      <property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
304
      <property name="ver.src" value="${ver.dir}/src"/>
305
      <property name="util.dir" value="${dist.dir}/${util-module}"/>
199
      <property name="build.data"          value="${build.dir}/data"/>
200
      <property name="build.javadocs"      value="${build.dir}/docs/api"/>
201
      <property name="build.war"           value="${build.dir}/war"/>
202
      <property name="dist.dir"            value="dist"/>
203
      <property name="ver.dir"             value="${dist.dir}/${name}-${release}"/>
204
      <property name="ver.src"             value="${ver.dir}/src"/>
205
      <property name="util.dir"            value="${dist.dir}/${util-module}"/>
306 206
	  <!-- directories for creating a Harvest List Editor distribution -->
307
      <property name="dist.dir.hle" value="disthle"/>
308
      <property name="ver.dir.hle" value="${dist.dir.hle}/harvest-list-editor-${release}"/>
309
   	  
310
   	  
207
      <property name="dist.dir.hle"        value="disthle"/>
208
      <property name="ver.dir.hle"         value="${dist.dir.hle}/harvest-list-editor-${release}"/>
209
	  
311 210
   	  <property name="ecogrid-target-name" value="metacatImpl"/>
312 211
   	  <property name="ecogrid-module-dest-dir" value =".."/>
313
   	  <property name="ecogrid-module" value="seek/projects/ecogrid"/>
314
   	  <property name="ecogrid-dist-dir" value="${dist.dir}/${ecogrid-module}"/>
315
   	  <property name="ecogrid-dir" value="${ecogrid-module-dest-dir}/${ecogrid-module}"/>
212
   	  <property name="ecogrid-module"      value="seek/projects/ecogrid"/>
213
   	  <property name="ecogrid-dist-dir"    value="${dist.dir}/${ecogrid-module}"/>
214
   	  <property name="ecogrid-dir"         value="${ecogrid-module-dest-dir}/${ecogrid-module}"/>
316 215

  
317
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
216
      <property name="package.home"        value="edu/ucsb/nceas/metacat" />
318 217
      <condition property="utilities.required">
319 218
        <or>
320 219
          <not><available file="lib/httpclient.jar"/></not>
......
557 456
           tofile="${style-common-cvsrelpath}/${eml-css}" />
558 457

  
559 458
   </target>
560

  
561

  
562
<!--
563
   <target name="register-schemas" depends="prepare"
564
   description="Registers the Schemas with a new Metacat instance">
565
     <echo/>
566
     <echo>Registering the Schemas with the new Metacat instance...</echo>
567
     <sql driver="${dbDriver}"
568
          url="${jdbc-connect}"
569
          userid="${user}"
570
          password="${password}"
571
          src="${build.src}/loaddtdschema.sql">
572
       <classpath>
573
         <path refid="compile.classpath"/>
574
       </classpath>
575
     </sql>
576
   </target>
577

  
578
   <target name="installdb" depends="prepare"
579
            description="Installs the database tables">
580
     <echo/>
581
     <echo>Installing the database tables...</echo>
582
     <echo>In case of failure, run the sql script manually. Look at Metacat install instructions for more details</echo>
583
     <echo/>
584
     <sql driver="${dbDriver}"
585
          url="${jdbc-connect}"
586
          userid="${user}"
587
          password="${password}"
588
          src="${build.src}/${install-sql}">
589
       <classpath>
590
         <path refid="compile.classpath"/>
591
       </classpath>
592
     </sql>
593
   </target>
594

  
595
   <target name="dropdb" depends="prepare"
596
            description="WARNING: Drops the database tables">
597
     <echo/>
598
     <echo>Dropping the database tables...</echo>
599
     <echo>In case of failure, run the sql script manually. Look at Metacat install instructions for more details</echo>
600
     <echo/>
601
     <sql driver="${dbDriver}"
602
          url="${jdbc-connect}"
603
          userid="${user}"
604
          password="${password}"
605
          src="${build.src}/drop-postgres.sql">
606
       <classpath>
607
         <path refid="compile.classpath"/>
608
       </classpath>
609
     </sql>
610
   </target>
611

  
612
   <target name="upgrade12" depends="prepare"
613
            description="Updates the database tables to upgrade to version 1.2">
614
     <echo/>
615
     <echo>Updating the database tables to upgrade to version 1.2...</echo>
616
     <sql driver="${dbDriver}"
617
          url="${jdbc-connect}"
618
          userid="${user}"
619
          password="${password}"
620
          src="${build.src}/${upgrade-1.2-sql}">
621
       <classpath>
622
         <path refid="compile.classpath"/>
623
       </classpath>
624
     </sql>
625
   </target>
626

  
627
   <target name="upgrade13" depends="prepare"
628
            description="Updates the database tables to upgrade to version 1.3">
629
     <echo/>
630
     <echo>Updating the database tables to upgrade to version 1.3...</echo>
631
     <sql driver="${dbDriver}"
632
          url="${jdbc-connect}"
633
          userid="${user}"
634
          password="${password}"
635
          src="${build.src}/${upgrade-1.3-sql}">
636
       <classpath>
637
         <path refid="compile.classpath"/>
638
       </classpath>
639
     </sql>
640
   </target>
641

  
642
   <target name="upgrade14" depends="prepare"
643
            description="Updates the database tables to upgrade to version 1.4">
644
     <echo/>
645
     <echo>Updating the database tables to upgrade to version 1.4...</echo>
646
     <sql driver="${dbDriver}"
647
          url="${jdbc-connect}"
648
          userid="${user}"
649
          password="${password}"
650
          src="${build.src}/${upgrade-1.4-sql}">
651
       <classpath>
652
         <path refid="compile.classpath"/>
653
       </classpath>
654
     </sql>
655
   </target>
656

  
657
   <target name="upgrade15" depends="sqlupgrade15"
658
           description="Updates the database tables to upgrade to version 1.5">
659
     <echo/>
660
     <echo>Updating the database tables to upgrade to version 1.5...</echo>
661
     <copy file="${srcdir}/upgrade_db_to_1_5.java"
662
           todir="${build.tmp}" filtering="yes"/>
663

  
664
     <javac srcdir="${build.tmp}"
665
            destdir="${build.tmp}"
666
            debug="${debug}"
667
            includes="upgrade_db_to_1_5.java">
668
       <classpath>
669
         <path refid="compile.classpath"/>
670
       </classpath>
671
     </javac>
672

  
673
     <java classname="upgrade_db_to_1_5">
674
       <classpath>
675
         <path refid="compile.classpath"/>
676
         <fileset dir="${build.tmp}"/>
677
       </classpath>
678
     </java>
679

  
680
   </target>
681

  
682
   <target name="upgrade16" depends="prepare"
683
            description="Updates the database tables from version 1.5 to version 1.6">
684
     <echo/>
685
     <echo>Updating the database tables to upgrade to version 1.6...</echo>
686
     <sql driver="${dbDriver}"
687
          url="${jdbc-connect}"
688
          userid="${user}"
689
          password="${password}"
690
          src="${build.src}/${upgrade-1.6-sql}">
691
       <classpath>
692
         <path refid="compile.classpath"/>
693
       </classpath>
694
     </sql>
695
   </target>
696

  
697
   <target name="upgrade17" depends="prepare"
698
            description="Updates the database tables from version 1.6 to version 1.7">
699
     <echo/>
700
     <echo>Updating the database tables to upgrade to version 1.7...</echo>
701
     <sql driver="${dbDriver}"
702
          url="${jdbc-connect}"
703
          userid="${user}"
704
          password="${password}"
705
          src="${build.src}/${upgrade-1.7-sql}">
706
       <classpath>
707
         <path refid="compile.classpath"/>
708
       </classpath>
709
     </sql>
710
   </target>
711 459
	
712
   <target name="upgrade18" depends="prepare"
713
	            description="Updates the database tables from version 1.7 to version 1.8">
714
	     <echo/>
715
	     <echo>Updating the database tables to upgrade to version 1.8...</echo>
716
	     <sql driver="${dbDriver}"
717
	          url="${jdbc-connect}"
718
	          userid="${user}"
719
	          password="${password}"
720
	          src="${build.src}/${upgrade-1.8-sql}">
721
	       <classpath>
722
	         <path refid="compile.classpath"/>
723
	       </classpath>
724
	     </sql>
725
   </target>
726

  
727
   <target name="sqlupgrade15" depends="prepare">
728
      <echo>Updating the database tables to upgrade to version 1.5 by sql command</echo>
729
      <sql driver="${dbDriver}"
730
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
731
          url="${jdbc-connect}"
732
          userid="${user}"
733
          password="${password}"
734
          src="${build.src}/${upgrade-1.5-sql}" />
735
      <sql driver="${dbDriver}"
736
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
737
          url="${jdbc-connect}"
738
          userid="${user}"
739
          password="${password}"
740
          rdbms="oracle"
741
          delimiter="/">
742
        <transaction>
743
           CREATE TRIGGER xml_returnfield_before_insert
744
           BEFORE INSERT ON xml_returnfield FOR EACH ROW
745
           BEGIN
746
              SELECT xml_returnfield_id_seq.nextval
747
                 INTO :new.returnfield_id
748
                 FROM dual;
749
           END;
750
           /
751
        </transaction>
752
        <transaction>
753
           CREATE TRIGGER xml_queryresult_before_insert
754
           BEFORE INSERT ON xml_queryresult FOR EACH ROW
755
           BEGIN
756
              SELECT xml_queryresult_id_seq.nextval
757
              INTO :new.queryresult_id
758
              FROM dual;
759
           END;
760
           /
761
        </transaction>
762
      </sql>
763
   </target>
764
-->
765
	
766 460
   <target name="correctEML201Docs" depends="jar"
767 461
		            description="Uses the ant  task to run a JAVA patch class to correct invalide eml201 documents which were generated by wrong schema">
768 462
	   	<copy todir="${build.dir}" file="lib/metacat.properties" filtering="yes"/>    
......
869 563
	<echo>Enter CVS password: </echo>
870 564
	     <cvs cvsRoot="${cvsroot}"
871 565
	          package="${ecogrid-module}" dest="${ecogrid-module-dest-dir}"/>
872
   </target>
566
   </target>  
873 567
	
874
<!--   	
875
   <target name="upgrade" depends="install"
876
          description="* Upgrade an existing metacat installation with a new version *">
877
       <unwar src="${deploy.dir}/${metacat.context}.war" dest="${deploy.dir}/${metacat.context}" />
878
   </target>
879
-->   
880
	
881 568
   <target name="deploy-ecogrid" depends="clean-ecogrid-server-config-wsdd" if="enable.ecogrid" description="Automately generate wsdd for ecogrid service">
882 569
   	 <ant antfile="build.xml" dir="${ecogrid-dir}" target ="deploy" inheritall="false">
883 570
   	   	 <property name="context" value="${metacat.context}"/>
......
982 669
      <echo message="Install Skin completed." />
983 670
   </target>
984 671

  
985
   <target name="war" depends="warPrepare,warMSSQL,install-spatial"
672
   <target name="war" depends="warPrepare,install-spatial"
986 673
            description="Create a web archive (WAR) for servlet deployment">
987 674
       <mkdir dir="${dist.dir}" />
988 675
       <war destfile="${dist.dir}/${metacat.context}.war"
......
1001 688
       <property name="war.lib" value="${build.war}/lib" />
1002 689
       <property name="war.webinf" value="${build.war}/WEB-INF" />
1003 690
       <property name="war.context" value="${build.war}/${metacat.context}" />
1004
   	   <property name="war.context.sql" value="${war.context}/sql" />
691
   	   <property name="war.webinf.sql" value="${war.webinf}/sql" />
1005 692
   	   <property name="war.context.docs" value="${war.context}/docs" />
1006 693
       <mkdir dir="${war.lib}" />
1007 694
       <mkdir dir="${war.webinf}" />
1008 695
       <mkdir dir="${war.context}" />
1009
   	   <mkdir dir="${war.context.sql}" />
696
   	   <mkdir dir="${war.webinf.sql}" />
1010 697
   	   <mkdir dir="${war.context.docs}" />
1011 698
       
1012
       <copy file="${jdbc}" tofile="${war.lib}/jdbc.jar" />
699
   	   <!--copy file="${lib.dir}/${jdbc.lib.oracle}" todir="${war.lib}" / -->
700
	   <!--copy file="${lib.dir}/${jdbc.lib.postgres}" todir="${war.lib}" / -->
701
       <!--copy file="${lib.dir}/${jdbc.lib.sqlserver1}" todir="${war.lib}" / -->
702
       <!--copy file="${lib.dir}/${jdbc.lib.sqlserver2}" todir="${war.lib}" / -->
703
       <!--copy file="${lib.dir}/${jdbc.lib.sqlserver3}" todir="${war.lib}" / -->
1013 704
       <copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
1014 705
       <copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
1015 706
       <copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
1016 707
       <copy todir="${war.lib}" filtering="no">
1017 708
         <fileset dir="lib">
1018
            <not>
709
<!--
710
         	<not>
1019 711
               <filename name="${jdbc-jar-name}"/>
1020 712
            </not>
713
-->
1021 714
            <include name="*.jar"/>
1022 715
         </fileset>
1023 716
         <fileset dir="lib">
......
1073 766
   	           <include name="user/**"/>
1074 767
   	         </fileset>
1075 768
   	   </copy>
1076
	   <copy todir="${war.context.sql}" filtering="yes">
769
	   <copy todir="${war.webinf.sql}" filtering="yes">
1077 770
	         <fileset dir="src">
1078 771
	           <include name="**/*.sql"/>
1079 772
	         </fileset>
1080 773
	   </copy>
1081 774
   </target>
1082 775

  
1083
   <target name="warMSSQL" if="MSSQL" depends="warPrepare">
1084
      <copy file="${jdbc-add1}" tofile="${war.lib}/msutil.jar" />
1085
       <copy file="${jdbc-add2}" tofile="${war.lib}/mssqlserver.jar" />
1086
   </target>
1087

  
1088 776
   <target name="getConversionXSL" depends="prepare"
1089 777
            unless="styles.not.needed"
1090 778
            description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
......
1283 971
       <delete dir="${dist.dir}" />
1284 972
   </target>
1285 973

  
1286
   <target name="fullclean" depends="clean"
1287
            description="deletes even jars that depend on external sources such as stylesheets and jars">
1288
       <delete file="lib/httpclient.jar" />
1289
       <delete file="lib/utilities.jar" />
974
	<target name="localclean" depends="clean"
975
	            description="deletes even jars that depend on external sources such as stylesheets and jars">
976
	       <delete file="lib/httpclient.jar" />
977
	       <delete file="lib/utilities.jar" />
978
	</target>	
979
	
980
   <target name="fullclean" depends="localclean"
981
            description="deletes code and eml">
1290 982
       <delete includeEmptyDirs="true" failonerror="false">
1291 983
         <fileset dir="${style-common-cvsrelpath}">
1292 984
           <include name="${eml-css}" />

Also available in: Unified diff