Project

General

Profile

metacat / build.xml @ 666

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-01-18 11:02:14 -0800 (Thu, 18 Jan 2001) $'
11
  * '$Revision: 666 $'
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" value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
35
      <property name="installdir" value="/opt/tomcat/webapps/metadata" />
36
      <property name="name" value="metacat"/>
37
      <property name="Name" value="MetaCat"/>
38
      <property name="release" value="1.0a8"/>
39
      <property name="web-base-url" value="http://www.nceas.ucsb.edu/collab/2840/knbweb"/>
40
      <property name="replication-path" value="/metadata/servlet/replication"/>
41
      <property name="servlet-path" value="/metadata/servlet/metacat"/>
42
      <property name="html-path" value="/metadata"/>
43
      <property name="image-path" value="/img/metadata" />
44
      <property name="server" value="dev.nceas.ucsb.edu"/>
45
      <property name="replication-log" value="/home/computer/berkley/xmltodb/logs/metacatreplication.log"/>
46
      <property name="dataport" value="4444"/>
47
      <property name="user" value="metadata"/>
48
      <property name="password" value="your-pw-goes-here"/>
49

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

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

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

    
95
   </target>
96
   
97
   <target name="prepare" depends="init">
98
      <mkdir dir="${build.dir}"/>
99
      <mkdir dir="${build.src}"/>
100
      <mkdir dir="${build.dest}"/>
101
      <mkdir dir="${build.javadocs}"/>
102

    
103
      <copydir src="${srcdir}" 
104
               dest="${build.src}" 
105
               filtering="yes"
106
               includes="edu/**, com/**"
107
               excludes="**/CVS* **/.#* **/*.sql"/>
108

    
109
   </target>
110

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

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

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

    
161
   <target name="clean" depends="init">
162
       <deltree dir="${build.dir}" />
163
   </target>
164

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

    
178
</project>