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 587 2000-12-07 22:13:01Z berkley $'
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="server" value="${server}"/>
34
      <filter token="replication-log" value="${replication-log}"/>
35
      <filter token="release" value="${release}"/>
36
      <filter token="servlet-path" value="${servlet-path}"/>
37
      <filter token="html-path" value="${html-path}"/>
38
      <filter token="user" value="${user}"/>
39
      <filter token="password" value="${password}"/>
40
      <filter token="image-path" value="${image-path}"/>
41
      <filter token="web-base-url" value="${web-base-url}"/>
42
      <filter token="replication-path" value="${replication-path}"/>
43
      <property name="srcdir" value="./src" />
44

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

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

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

    
83
      <copydir src="${srcdir}" 
84
               dest="${build.src}" 
85
               filtering="yes"
86
               includes="edu/**, com/**"
87
               excludes="**/CVS* **/.#* **/*.sql"/>
88

    
89
   </target>
90

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

    
103
   <target name="jar" depends="compile">
104
       <delete file="${build.dir}/${name}.jar" />
105
       <copydir src="lib/srbrmi" dest="${build.dest}" />
106
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}" />
107
   </target> 
108

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

    
134
   <target name="clean" depends="init">
135
       <deltree dir="${build.dir}" />
136
   </target>
137

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

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