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: 2001-07-19 01:52:43 -0700 (Thu, 19 Jul 2001) $'
11
  *  '$Revision: 798 $'
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
   <target name="init">
34
      <property name="jdbc-connect" 
35
                value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
36
      <property name="installdir" value="/opt/tomcat/webapps/jones" />
37
      <property name="name" value="metacat"/>
38
      <property name="Name" value="MetaCat"/>
39
      <property name="release" value="1.0beta1"/>
40
      <property name="web-base-url" 
41
                value="http://www.nceas.ucsb.edu/collab/2840/knbweb"/>
42
      <property name="replication-path" value="//servlet/replication"/>
43
      <property name="servlet-path" value="/jones/servlet/metacat"/>
44
      <property name="html-path" value="/jones"/>
45
      <property name="image-path" value="/img/jones" />
46
      <property name="server" value="dev.nceas.ucsb.edu"/>
47
      <property name="replication-log" value="/tmp/metacatreplication.log"/>
48
      <property name="dataport" value="4444"/>
49
      <property name="user" value="jones"/>
50
      <property name="password" value="your-pw-goes-here"/>
51

    
52
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
53
      <filter token="data-port" value="${dataport}"/>
54
      <filter token="install-dir" value="${installdir}"/>
55
      <filter token="server" value="${server}"/>
56
      <filter token="replication-log" value="${replication-log}"/>
57
      <filter token="release" value="${release}"/>
58
      <filter token="servlet-path" value="${servlet-path}"/>
59
      <filter token="html-path" value="${html-path}"/>
60
      <filter token="user" value="${user}"/>
61
      <filter token="password" value="${password}"/>
62
      <filter token="image-path" value="${image-path}"/>
63
      <filter token="web-base-url" value="${web-base-url}"/>
64
      <filter token="replication-path" value="${replication-path}"/>
65
      <property name="srcdir" value="./src" />
66

    
67
      <property name="build.dir" value="./build"/>
68
      <property name="build.src" value="${build.dir}/src"/>
69
      <property name="build.dest" value="${build.dir}/classes"/>
70
      <property name="build.docs" value="${build.dir}/docs"/>
71
      <property name="build.samples" value="${build.dir}/samples"/>
72
      <property name="build.tests" value="${build.dir}/tests"/>
73
      <property name="build.data" value="${build.dir}/data"/>
74
      <property name="build.javadocs" value="${build.dir}/docs/apiDocs"/>
75
      <property name="build.img" value="/opt/httpd/html${image-path}"/>
76

    
77
      <property name="oracle_home" 
78
                value="/oracle01/app/oracle/product/8.1.6" />
79
      <property name="toolsdir" 
80
                value="/usr/local/devtools" />
81
      <property name="xmlp" 
82
                value="${toolsdir}/OracleXSU111/lib/xmlparserv2.jar" />
83
      <property name="xmlp2" 
84
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
85
      <property name="jdbc" 
86
                value="${oracle_home}/jdbc/lib/classes111.zip" />
87
      <property name="jserv" 
88
                value="/usr/lib/apache/ApacheJServ.jar" />
89
      <property name="jsdk" 
90
                value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
91
      <property name="srb" 
92
                value="lib/srbrmi" />
93
      <property name="cos" 
94
                value="lib/cos.jar" />
95
      <property name="cpath" 
96
                value="${xmlp2}:${xmlp}:${jdbc}:${jserv}:${jsdk}:${srb}:${cos}"/>
97
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
98

    
99
   </target>
100
   
101
   <target name="prepare" depends="init">
102
      <mkdir dir="${build.dir}"/>
103
      <mkdir dir="${build.src}"/>
104
      <mkdir dir="${build.dest}"/>
105
      <mkdir dir="${build.javadocs}"/>
106

    
107
      <copydir src="${srcdir}" 
108
               dest="${build.src}" 
109
               filtering="yes"
110
               includes="edu/**, com/**"
111
               excludes="**/CVS* **/.#* **/*.sql"/>
112

    
113
   </target>
114

    
115
   <target name="compile" depends="prepare">
116
       <javac srcdir="${build.src}" 
117
              destdir="${build.dest}" 
118
              classpath="${cpath}" 
119
              excludes="**/*.sql" /> 
120
       <copyfile src="lib/metacat.properties" 
121
                 dest="${build.dest}/${package.home}/metacat.properties" 
122
                 filtering="yes" />
123
       <copyfile src="lib/srbProps.properties" 
124
                 dest="${build.dest}/${package.home}/srbProps.properties"/>
125
   </target> 
126

    
127
   <target name="jar" depends="compile">
128
       <delete file="${build.dir}/${name}.jar" />
129
       <copydir src="lib/srbrmi" dest="${build.dest}" />
130
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
131
            excludes="**/protocols/" />
132
   </target> 
133
 
134
   <target name="protocol" depends="compile">
135
       <delete file="${build.dir}/protocol.jar" />
136
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
137
            includes="**/protocols/" />
138
   </target> 
139

    
140
   <target name="install" depends="jar">
141
       <mkdir dir="${installdir}/WEB-INF/lib" />
142
       <copyfile src="${build.dir}/${name}.jar" 
143
                 dest="${installdir}/WEB-INF/lib/${name}.jar" />
144
       <copyfile src="${xmlp2}" 
145
                 dest="${installdir}/WEB-INF/lib/xerces.jar" />
146
       <copyfile src="${xmlp}" 
147
                 dest="${installdir}/WEB-INF/lib/xmlparserv2.jar" />
148
       <copyfile src="${jdbc}" 
149
                 dest="${installdir}/WEB-INF/lib/oracle-jdbc111.jar" />
150
       <copyfile src="${cos}" 
151
                 dest="${installdir}/WEB-INF/lib/cos.jar" />
152
       <copyfile src="lib/web.xml" 
153
                 dest="${installdir}/WEB-INF/web.xml" />
154
       <copydir src="lib"
155
                dest="${build.img}"
156
                includes="*.jpg,*.png,*.gif,**/marine/*.jpg, **/marine/*.png, **/marine/*.gif"/>
157
       <copydir src="lib" dest="${installdir}"
158
                filtering="yes"
159
                excludes="*.jar,*.properties,web.xml,**/srbrmi/*" />
160
<!--       <mkdir dir="${installdir}/dtd" />
161
       <copydir src="../dtd" dest="${installdir}/dtd"
162
                filtering="yes"
163
                includes="*.dtd" />-->
164
   </target> 
165

    
166
   <target name="clean" depends="init">
167
       <deltree dir="${build.dir}" />
168
   </target>
169

    
170
   <target name="jdoc" depends="prepare">
171
       <javadoc packagenames="edu.ucsb.nceas.metacat"
172
           sourcepath="${build.src}"
173
           destdir="${build.javadocs}"
174
           author="true"
175
           version="true"
176
           use="true"
177
           windowtitle="${Name} API"
178
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
179
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
180
       />
181
   </target>
182

    
183
</project>
(4-4/4)