Project

General

Profile

« Previous | Next » 

Revision 1744

Added by Jing Tao over 21 years ago

Because MS SQL server has 3 jar files for JDBC, so revised build.xml.

View differences:

build.xml
38 38
     <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
39 39
     <property name="oracle_home" value="/oracle01/app/oracle/product/8.1.6" />
40 40
     <property name="jdbc" value="${oracle_home}/jdbc/lib/classes111.zip" />
41
     <!-- Property to indicate is not MSSQL installation-->
42
     <property name="other" value="yes"/>
41 43
   </target>
42 44

  
43 45
   <target name="postgresql">
......
48 50
     <property name="dbAdapter"
49 51
               value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
50 52
     <property name="jdbc" value="lib/jdbc7.1-1.2.jar" />
51
   </target>
53
     <!-- Property to indicate is not MSSQL installation-->
54
     <property name="other" value="yes"/>
55
    </target>
52 56
   
53 57
   <target name="sqlserver">
54 58
     <!-- Customize these properties if you are using SQL server -->
......
59 63
               value="edu.ucsb.nceas.dbadapter.SqlserverAdapter"/>
60 64
     <property name="jdbc-base" value="F:\\Program Files\\Microsoft SQL Server 2000 Driver for JDBC\\lib" />
61 65
     <property name="jdbc" value="${jdbc-base}/msbase.jar" />
62
     <property name="msutil" value="${jdbc-base}/msutil.jar" />
63
     <property name="mssqlserver" value="${jdbc-base}/mssqlserver.jar" />
66
     <property name="jdbc-add1" value="${jdbc-base}/msutil.jar" />
67
     <property name="jdbc-add2" value="${jdbc-base}/mssqlserver.jar" />
68
     <!-- Property to indicate is a MSSQL installation-->
69
     <property name="MSSQL" value="yes"/>
64 70
   </target>
65 71

  
66
   <target name="config" depends="sqlserver">
72
   <target name="config" depends="postgresql">
67 73
      <!-- Change the 'depends' attribute above to 'postgresql' to install
68 74
           metacat with postgres instead of oracle -->
69 75

  
70 76
      <!-- Customize these properties for your system -->
71
      <property name="tomcat" value="f:\\devtools\\jakarta-tomcat" />
72
      <property name="webapps" value="f:\\devtools\\jakarta-tomcat\\webapps" />
77
      <property name="tomcat" value="/usr/local/devtools/jakarta-tomcat" />
78
      <property name="webapps" value="/usr/local/devtools/jakarta-tomcat/webapps" />
73 79
      <property name="context" value="tao" />
74 80
      <property name="user" value="tao"/>
75 81
      <property name="password" value="tdataint"/>
76 82
      <!-- Tomcat version, if you use tomcat 3, please fill it "tomcat3". If you using tomcat4, please fill it "tomcat4"-->
77
      <property name="tomcatversion" value="tomcat4"/>
83
      <property name="tomcatversion" value="tomcat3"/>
78 84

  
79
      <property name="server" value="fatali.nceas.ucsb.edu:8080"/>
80
      <property name="systemidserver" value="http://fatali.nceas.ucsb.edu:8080" />
81
      <property name="datafilepath" value="f:\\devtools\\jakarta-tomcat\\data\\tao\\data" />
82
      <property name="inlinedatafilepath" value="f:\\devtools\\jakarta-tomcat\\data\\tao\\inlinedata" />
85
      <property name="server" value="pine.nceas.ucsb.edu:8443"/>
86
      <property name="systemidserver" value="http://pine.nceas.ucsb.edu:8080" />
87
      <property name="datafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/data" />
88
      <property name="inlinedatafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/inlinedata" />
83 89
      <property name="debuglevel" value="40" />
84 90

  
85 91
      <property name="forcereplicationwaitingtime" value="30000"/>
......
146 152
      <property name="stmmlnamespace" value="http://www.xml-cml.org/schema/stmml" />
147 153

  
148 154
      <property name="cpath"
149
                value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${srb}:${cos}:${morpho}:${emlparser}:${msutil}:${mssqlserver}"/>
155
                value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${srb}:${cos}:${morpho}:${emlparser}:${jdbc-add1}:${jdbc-add2}"/>
150 156

  
151 157
      <filter token="docrooturl" value="./" />
152 158
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
......
315 321
     <echo/>
316 322
     <echo>Registering the DTDs with the new Metacat instance...</echo>
317 323
     <sql driver="${dbDriver}"
318
          classpath="${jdbc}:${msutil}:${mssqlserver}"
324
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
319 325
          url="${jdbc-connect}"
320 326
          userid="${user}"
321 327
          password="${password}"
......
326 332
     <echo/>
327 333
     <echo>Registering the DTDs with the new Metacat instance...</echo>
328 334
     <sql driver="${dbDriver}"
329
          classpath="${jdbc}:${msutil}:${mssqlserver}"
335
          classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
330 336
          url="${jdbc-connect}"
331 337
          userid="${user}"
332 338
          password="${password}"
333 339
          src="${build.src}/loadschema.sql" />
334 340
   </target>
335

  
336
   <target name="install" depends="jar">
341
  
342
   <target name="installCommon" depends="jar">
337 343
       <mkdir dir="${datafilepath}" />
338 344
       <mkdir dir="${inlinedatafilepath}" />
339 345
       <chmod dir="${datafilepath}" perm="ug+w" />
......
348 354
             tofile="${installdir}/WEB-INF/lib/xml-apis.jar" />
349 355
       <copy file="${jdbc}"
350 356
             tofile="${installdir}/WEB-INF/lib/jdbc.jar" />
351
       <copy file="${msutil}"
352
             tofile="${installdir}/WEB-INF/lib/msutil.jar" />
353
       <copy file="${mssqlserver}"
354
             tofile="${installdir}/WEB-INF/lib/mssqlserver.jar" />
355 357
       <copy file="${cos}"
356 358
             tofile="${installdir}/WEB-INF/lib/cos.jar" />
357 359
       <copy file="${morpho}"
......
390 392
             ***********************************************************
391 393
       </echo>
392 394
   </target>
395
   
396
   <target name="installMSSQL" if="MSSQL" depends="installCommon">
397
      <echo> Install MSSQL</echo>
398
      <copy file="${jdbc-add1}"
399
             tofile="${installdir}/WEB-INF/lib/msutil.jar" />
400
       <copy file="${jdbc-add2}"
401
             tofile="${installdir}/WEB-INF/lib/mssqlserver.jar" />
402
   </target>
403
   
404
    <target name="installother" if="other" depends="installCommon">
405
        <echo> Install Other Database</echo>
406
   </target>
407
   
408
   <target name="install" depends="installMSSQL, installother">
409
     
410
   </target>
411
   
412
   
393 413

  
394 414
   <target name="test" depends="install">
395 415
      <!-- copy and compile the tests into a jar file -->

Also available in: Unified diff