Project

General

Profile

1 113 jones
<?xml version="1.0"?>
2
<!--
3
  * build.xml
4
  *
5
  *      Authors: Matt Jones
6
  *    Copyright: 2000 Regents of the University of California and the
7
  *               National Center for Ecological Analysis and Synthesis
8
  *  For Details: http://www.nceas.ucsb.edu/
9
  *    File Info: '$Id$'
10
  *
11
  *  Build file for the Ant cross-platform build system for metacat
12
  *  See http://jakarta.apache.org for details on Ant
13
  *
14 303 jones
  * usage: ant [compile|jar|install|jdoc]
15 113 jones
-->
16 329 jones
<project name="metacat" default="jar" basedir=".">
17 113 jones
   <target name="init">
18 587 berkley
      <property name="jdbc-connect" value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
19 410 berkley
      <property name="installdir" value="/opt/tomcat/webapps/metadata" />
20 348 jones
      <property name="name" value="metacat"/>
21
      <property name="Name" value="MetaCat"/>
22 378 jones
      <property name="release" value="1.0a8"/>
23 586 berkley
      <property name="web-base-url" value="http://www.nceas.ucsb.edu/collab/2840/knbweb"/>
24 525 berkley
      <property name="replication-path" value="/metadata/servlet/replication"/>
25 412 berkley
      <property name="servlet-path" value="/metadata/servlet/metacat"/>
26 410 berkley
      <property name="html-path" value="/metadata"/>
27
      <property name="image-path" value="/img/metadata" />
28 586 berkley
      <property name="server" value="dev.nceas.ucsb.edu"/>
29
      <property name="replication-log" value="/home/computer/berkley/xmltodb/logs/metacatreplication.log"/>
30 412 berkley
      <property name="user" value="metadata"/>
31 525 berkley
      <property name="password" value="your-pw-goes-here"/>
32 348 jones
33 588 berkley
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
34 614 bojilova
      <filter token="install-dir" value="${installdir}"/>
35 586 berkley
      <filter token="server" value="${server}"/>
36
      <filter token="replication-log" value="${replication-log}"/>
37 348 jones
      <filter token="release" value="${release}"/>
38
      <filter token="servlet-path" value="${servlet-path}"/>
39 359 bojilova
      <filter token="html-path" value="${html-path}"/>
40 362 jones
      <filter token="user" value="${user}"/>
41
      <filter token="password" value="${password}"/>
42 409 berkley
      <filter token="image-path" value="${image-path}"/>
43 506 jones
      <filter token="web-base-url" value="${web-base-url}"/>
44 525 berkley
      <filter token="replication-path" value="${replication-path}"/>
45 254 jones
      <property name="srcdir" value="./src" />
46 348 jones
47
      <property name="build.dir" value="./build"/>
48
      <property name="build.src" value="${build.dir}/src"/>
49
      <property name="build.dest" value="${build.dir}/classes"/>
50 516 jones
      <property name="build.docs" value="${build.dir}/docs"/>
51 348 jones
      <property name="build.samples" value="${build.dir}/samples"/>
52
      <property name="build.tests" value="${build.dir}/tests"/>
53
      <property name="build.data" value="${build.dir}/data"/>
54
      <property name="build.javadocs" value="${build.dir}/docs/apiDocs"/>
55 409 berkley
      <property name="build.img" value="/opt/httpd/html${image-path}"/>
56 348 jones
57 113 jones
      <property name="oracle_home"
58 329 jones
                value="/oracle01/app/oracle/product/8.1.6" />
59
      <property name="toolsdir"
60
                value="/usr/local/devtools" />
61 113 jones
      <property name="xmlp"
62 329 jones
                value="${toolsdir}/OracleXSU111/lib/xmlparserv2.jar" />
63 185 jones
      <property name="xmlp2"
64 329 jones
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
65 113 jones
      <property name="jdbc"
66
                value="${oracle_home}/jdbc/lib/classes111.zip" />
67
      <property name="jserv"
68
                value="/usr/lib/apache/ApacheJServ.jar" />
69
      <property name="jsdk"
70 329 jones
                value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
71 213 jones
      <property name="srb"
72
                value="lib/srbrmi" />
73 113 jones
      <property name="cpath"
74 319 jones
                value="${xmlp2}:${xmlp}:${jdbc}:${jserv}:${jsdk}:${srb}"/>
75 254 jones
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
76 348 jones
77 113 jones
   </target>
78
79 348 jones
   <target name="prepare" depends="init">
80
      <mkdir dir="${build.dir}"/>
81
      <mkdir dir="${build.src}"/>
82
      <mkdir dir="${build.dest}"/>
83 516 jones
      <mkdir dir="${build.javadocs}"/>
84 348 jones
85
      <copydir src="${srcdir}"
86
               dest="${build.src}"
87
               filtering="yes"
88
               includes="edu/**, com/**"
89
               excludes="**/CVS* **/.#* **/*.sql"/>
90
91
   </target>
92
93
   <target name="compile" depends="prepare">
94
       <javac srcdir="${build.src}"
95
              destdir="${build.dest}"
96 257 jones
              classpath="${cpath}"
97
              excludes="**/*.sql" />
98 116 jones
       <copyfile src="lib/metacat.properties"
99 356 bojilova
                 dest="${build.dest}/${package.home}/metacat.properties"
100
                 filtering="yes" />
101 481 bojilova
       <copyfile src="lib/srbProps.properties"
102
                 dest="${build.dest}/${package.home}/srbProps.properties"/>
103 113 jones
   </target>
104
105 204 jones
   <target name="jar" depends="compile">
106 353 jones
       <delete file="${build.dir}/${name}.jar" />
107 348 jones
       <copydir src="lib/srbrmi" dest="${build.dest}" />
108 586 berkley
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}" />
109 113 jones
   </target>
110
111 204 jones
   <target name="install" depends="jar">
112 329 jones
       <mkdir dir="${installdir}/WEB-INF/lib" />
113 353 jones
       <copyfile src="${build.dir}/${name}.jar"
114 348 jones
                 dest="${installdir}/WEB-INF/lib/${name}.jar" />
115 329 jones
       <copyfile src="${xmlp2}"
116
                 dest="${installdir}/WEB-INF/lib/xerces.jar" />
117
       <copyfile src="${xmlp}"
118
                 dest="${installdir}/WEB-INF/lib/xmlparserv2.jar" />
119
       <copyfile src="${jdbc}"
120
                 dest="${installdir}/WEB-INF/lib/oracle-jdbc111.jar" />
121
       <copyfile src="lib/web.xml"
122
                 dest="${installdir}/WEB-INF/web.xml" />
123 409 berkley
       <copydir src="lib"
124 410 berkley
                dest="${build.img}"
125
                includes="*.jpg,*.png,*.gif,**/marine/*.jpg, **/marine/*.png, **/marine/*.gif"/>
126 329 jones
       <copydir src="lib" dest="${installdir}"
127 348 jones
                filtering="yes"
128 329 jones
                excludes="*.jar,*.properties,web.xml,**/srbrmi/*" />
129 391 jones
       <mkdir dir="${installdir}/dtd" />
130
       <copydir src="../dtd" dest="${installdir}/dtd"
131
                filtering="yes"
132
                includes="*.dtd" />
133 329 jones
       <copydir src="images" dest="${installdir}" />
134 204 jones
   </target>
135
136 113 jones
   <target name="clean" depends="init">
137 348 jones
       <deltree dir="${build.dir}" />
138 113 jones
   </target>
139
140 516 jones
   <target name="jdoc" depends="prepare">
141 113 jones
       <javadoc packagenames="edu.ucsb.nceas.metacat"
142 516 jones
           sourcepath="${build.src}"
143
           destdir="${build.javadocs}"
144 113 jones
           author="true"
145
           version="true"
146
           use="true"
147 348 jones
           windowtitle="${Name} API"
148
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
149 113 jones
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
150
       />
151
   </target>
152
153
</project>