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 564 2000-11-23 02:23:42Z 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="installdir" value="/opt/tomcat/webapps/metadata" />
19
      <property name="name" value="metacat"/>
20
      <property name="Name" value="MetaCat"/>
21
      <property name="release" value="1.0a8"/>
22
      <property name="web-base-url" 
23
                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="user" value="metadata"/>
29
      <property name="password" value="your-pw-goes-here"/>
30

    
31
      <filter token="release" value="${release}"/>
32
      <filter token="servlet-path" value="${servlet-path}"/>
33
      <filter token="html-path" value="${html-path}"/>
34
      <filter token="user" value="${user}"/>
35
      <filter token="password" value="${password}"/>
36
      <filter token="image-path" value="${image-path}"/>
37
      <filter token="web-base-url" value="${web-base-url}"/>
38
      <filter token="replication-path" value="${replication-path}"/>
39
      <property name="srcdir" value="./src" />
40

    
41
      <property name="build.dir" value="./build"/>
42
      <property name="build.src" value="${build.dir}/src"/>
43
      <property name="build.dest" value="${build.dir}/classes"/>
44
      <property name="build.docs" value="${build.dir}/docs"/>
45
      <property name="build.samples" value="${build.dir}/samples"/>
46
      <property name="build.tests" value="${build.dir}/tests"/>
47
      <property name="build.data" value="${build.dir}/data"/>
48
      <property name="build.javadocs" value="${build.dir}/docs/apiDocs"/>
49
      <property name="build.img" value="/opt/httpd/html${image-path}"/>
50

    
51
      <property name="oracle_home" 
52
                value="/oracle01/app/oracle/product/8.1.6" />
53
      <property name="toolsdir" 
54
                value="/usr/local/devtools" />
55
      <property name="xmlp" 
56
                value="${toolsdir}/OracleXSU111/lib/xmlparserv2.jar" />
57
      <property name="xmlp2" 
58
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
59
      <property name="jdbc" 
60
                value="${oracle_home}/jdbc/lib/classes111.zip" />
61
      <property name="jserv" 
62
                value="/usr/lib/apache/ApacheJServ.jar" />
63
      <property name="jsdk" 
64
                value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
65
      <property name="srb" 
66
                value="lib/srbrmi" />
67
      <property name="cpath" 
68
                value="${xmlp2}:${xmlp}:${jdbc}:${jserv}:${jsdk}:${srb}"/>
69
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
70

    
71
   </target>
72
   
73
   <target name="prepare" depends="init">
74
      <mkdir dir="${build.dir}"/>
75
      <mkdir dir="${build.src}"/>
76
      <mkdir dir="${build.dest}"/>
77
      <mkdir dir="${build.javadocs}"/>
78

    
79
      <copydir src="${srcdir}" 
80
               dest="${build.src}" 
81
               filtering="yes"
82
               includes="edu/**, com/**"
83
               excludes="**/CVS* **/.#* **/*.sql"/>
84

    
85
   </target>
86

    
87
   <target name="compile" depends="prepare">
88
       <javac srcdir="${build.src}" 
89
              destdir="${build.dest}" 
90
              classpath="${cpath}" 
91
              excludes="**/*.sql" /> 
92
       <copyfile src="lib/metacat.properties" 
93
                 dest="${build.dest}/${package.home}/metacat.properties" 
94
                 filtering="yes" />
95
       <copyfile src="lib/srbProps.properties" 
96
                 dest="${build.dest}/${package.home}/srbProps.properties"/>
97
   </target> 
98

    
99
   <target name="jar" depends="compile">
100
       <delete file="${build.dir}/${name}.jar" />
101
       <copydir src="lib/srbrmi" dest="${build.dest}" />
102
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
103
            excludes="**/protocols/" />
104
   </target> 
105

    
106
   <target name="protocol" depends="compile">
107
       <delete file="${build.dir}/protocol.jar" />
108
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
109
            includes="**/protocols/" />
110
   </target> 
111

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

    
137
   <target name="clean" depends="init">
138
       <deltree dir="${build.dir}" />
139
   </target>
140

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

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