Project

General

Profile

1
<?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: build.xml 635 2001-01-03 21:34:34Z jones $'
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
  * usage: ant [compile|jar|install|jdoc]
15
--> 
16
<project name="metacat" default="jar" basedir=".">
17
   <target name="init">
18
      <property name="jdbc-connect" value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
19
      <property name="installdir" value="/opt/tomcat/webapps/metadata" />
20
      <property name="name" value="metacat"/>
21
      <property name="Name" value="MetaCat"/>
22
      <property name="release" value="1.0a8"/>
23
      <property name="web-base-url" value="http://www.nceas.ucsb.edu/collab/2840/knbweb"/>
24
      <property name="replication-path" value="/metadata/servlet/replication"/>
25
      <property name="servlet-path" value="/metadata/servlet/metacat"/>
26
      <property name="html-path" value="/metadata"/>
27
      <property name="image-path" value="/img/metadata" />
28
      <property name="server" value="dev.nceas.ucsb.edu"/>
29
      <property name="replication-log" value="/home/computer/berkley/xmltodb/logs/metacatreplication.log"/>
30
      <property name="user" value="metadata"/>
31
      <property name="password" value="your-pw-goes-here"/>
32

    
33
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
34
      <filter token="install-dir" value="${installdir}"/>
35
      <filter token="server" value="${server}"/>
36
      <filter token="replication-log" value="${replication-log}"/>
37
      <filter token="release" value="${release}"/>
38
      <filter token="servlet-path" value="${servlet-path}"/>
39
      <filter token="html-path" value="${html-path}"/>
40
      <filter token="user" value="${user}"/>
41
      <filter token="password" value="${password}"/>
42
      <filter token="image-path" value="${image-path}"/>
43
      <filter token="web-base-url" value="${web-base-url}"/>
44
      <filter token="replication-path" value="${replication-path}"/>
45
      <property name="srcdir" value="./src" />
46

    
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
      <property name="build.docs" value="${build.dir}/docs"/>
51
      <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
      <property name="build.img" value="/opt/httpd/html${image-path}"/>
56

    
57
      <property name="oracle_home" 
58
                value="/oracle01/app/oracle/product/8.1.6" />
59
      <property name="toolsdir" 
60
                value="/usr/local/devtools" />
61
      <property name="xmlp" 
62
                value="${toolsdir}/OracleXSU111/lib/xmlparserv2.jar" />
63
      <property name="xmlp2" 
64
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
65
      <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
                value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
71
      <property name="srb" 
72
                value="lib/srbrmi" />
73
      <property name="cpath" 
74
                value="${xmlp2}:${xmlp}:${jdbc}:${jserv}:${jsdk}:${srb}"/>
75
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
76

    
77
   </target>
78
   
79
   <target name="prepare" depends="init">
80
      <mkdir dir="${build.dir}"/>
81
      <mkdir dir="${build.src}"/>
82
      <mkdir dir="${build.dest}"/>
83
      <mkdir dir="${build.javadocs}"/>
84

    
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
              classpath="${cpath}" 
97
              excludes="**/*.sql" /> 
98
       <copyfile src="lib/metacat.properties" 
99
                 dest="${build.dest}/${package.home}/metacat.properties" 
100
                 filtering="yes" />
101
       <copyfile src="lib/srbProps.properties" 
102
                 dest="${build.dest}/${package.home}/srbProps.properties"/>
103
   </target> 
104

    
105
   <target name="jar" depends="compile">
106
       <delete file="${build.dir}/${name}.jar" />
107
       <copydir src="lib/srbrmi" dest="${build.dest}" />
108
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
109
            excludes="**/protocols/" />
110
   </target> 
111
 
112
   <target name="protocol" depends="compile">
113
       <delete file="${build.dir}/protocol.jar" />
114
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
115
            includes="**/protocols/" />
116
   </target> 
117

    
118
   <target name="install" depends="jar">
119
       <mkdir dir="${installdir}/WEB-INF/lib" />
120
       <copyfile src="${build.dir}/${name}.jar" 
121
                 dest="${installdir}/WEB-INF/lib/${name}.jar" />
122
       <copyfile src="${xmlp2}" 
123
                 dest="${installdir}/WEB-INF/lib/xerces.jar" />
124
       <copyfile src="${xmlp}" 
125
                 dest="${installdir}/WEB-INF/lib/xmlparserv2.jar" />
126
       <copyfile src="${jdbc}" 
127
                 dest="${installdir}/WEB-INF/lib/oracle-jdbc111.jar" />
128
       <copyfile src="lib/web.xml" 
129
                 dest="${installdir}/WEB-INF/web.xml" />
130
       <copydir src="lib"
131
                dest="${build.img}"
132
                includes="*.jpg,*.png,*.gif,**/marine/*.jpg, **/marine/*.png, **/marine/*.gif"/>
133
       <copydir src="lib" dest="${installdir}"
134
                filtering="yes"
135
                excludes="*.jar,*.properties,web.xml,**/srbrmi/*" />
136
       <mkdir dir="${installdir}/dtd" />
137
       <copydir src="../dtd" dest="${installdir}/dtd"
138
                filtering="yes"
139
                includes="*.dtd" />
140
       <copydir src="images" dest="${installdir}" />
141
   </target> 
142

    
143
   <target name="clean" depends="init">
144
       <deltree dir="${build.dir}" />
145
   </target>
146

    
147
   <target name="jdoc" depends="prepare">
148
       <javadoc packagenames="edu.ucsb.nceas.metacat"
149
           sourcepath="${build.src}"
150
           destdir="${build.javadocs}"
151
           author="true"
152
           version="true"
153
           use="true"
154
           windowtitle="${Name} API"
155
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
156
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
157
       />
158
   </target>
159

    
160
</project>
(2-2/4)