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

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

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

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

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

    
90
   </target>
91

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

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

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

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

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

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