Project

General

Profile

1 113 jones
<?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$'
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 303 jones
  * usage: ant [compile|jar|install|jdoc]
15 113 jones
-->
16 329 jones
<project name="metacat" default="jar" basedir=".">
17 113 jones
   <target name="init">
18 329 jones
      <property name="installdir" value="/opt/tomcat/webapps/xmltodb" />
19 348 jones
      <property name="name" value="metacat"/>
20
      <property name="Name" value="MetaCat"/>
21
      <property name="release" value="1.0a6"/>
22
      <property name="servlet-path" value="/xmltodb/servlet/metacat"/>
23 359 bojilova
      <property name="html-path" value="/xmltodb"/>
24 348 jones
25
      <filter token="release" value="${release}"/>
26
      <filter token="servlet-path" value="${servlet-path}"/>
27 359 bojilova
      <filter token="html-path" value="${html-path}"/>
28 348 jones
29 254 jones
      <property name="srcdir" value="./src" />
30 348 jones
31
      <property name="build.dir" value="./build"/>
32
      <property name="build.src" value="${build.dir}/src"/>
33
      <property name="build.dest" value="${build.dir}/classes"/>
34
      <property name="build.docs" value="${build.dir}/docs/html"/>
35
      <property name="build.samples" value="${build.dir}/samples"/>
36
      <property name="build.tests" value="${build.dir}/tests"/>
37
      <property name="build.data" value="${build.dir}/data"/>
38
      <property name="build.javadocs" value="${build.dir}/docs/apiDocs"/>
39
40 113 jones
      <property name="oracle_home"
41 329 jones
                value="/oracle01/app/oracle/product/8.1.6" />
42
      <property name="toolsdir"
43
                value="/usr/local/devtools" />
44 113 jones
      <property name="xmlp"
45 329 jones
                value="${toolsdir}/OracleXSU111/lib/xmlparserv2.jar" />
46 185 jones
      <property name="xmlp2"
47 329 jones
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
48 113 jones
      <property name="jdbc"
49
                value="${oracle_home}/jdbc/lib/classes111.zip" />
50
      <property name="jserv"
51
                value="/usr/lib/apache/ApacheJServ.jar" />
52
      <property name="jsdk"
53 329 jones
                value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
54 213 jones
      <property name="srb"
55
                value="lib/srbrmi" />
56 113 jones
      <property name="cpath"
57 319 jones
                value="${xmlp2}:${xmlp}:${jdbc}:${jserv}:${jsdk}:${srb}"/>
58 254 jones
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
59 348 jones
60 113 jones
   </target>
61
62 348 jones
   <target name="prepare" depends="init">
63
      <mkdir dir="${build.dir}"/>
64
      <mkdir dir="${build.src}"/>
65
      <mkdir dir="${build.dest}"/>
66
67
      <copydir src="${srcdir}"
68
               dest="${build.src}"
69
               filtering="yes"
70
               includes="edu/**, com/**"
71
               excludes="**/CVS* **/.#* **/*.sql"/>
72
73
      <!-- substitute tokens as needed -->
74
<!--
75
      <replace file="${build.src}/${version.file}"
76
               token="@@version@@" value="${version}"/>
77
-->
78
   </target>
79
80
   <target name="compile" depends="prepare">
81
       <javac srcdir="${build.src}"
82
              destdir="${build.dest}"
83 257 jones
              classpath="${cpath}"
84
              excludes="**/*.sql" />
85 116 jones
       <copyfile src="lib/metacat.properties"
86 356 bojilova
                 dest="${build.dest}/${package.home}/metacat.properties"
87
                 filtering="yes" />
88 306 berkley
       <copyfile src="lib/marine/marine.properties"
89 348 jones
                 dest="${build.dest}/${package.home}/marine/marine.properties"/>
90 113 jones
   </target>
91
92 204 jones
   <target name="jar" depends="compile">
93 353 jones
       <delete file="${build.dir}/${name}.jar" />
94 348 jones
       <copydir src="lib/srbrmi" dest="${build.dest}" />
95 353 jones
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}" />
96 113 jones
   </target>
97
98 204 jones
   <target name="install" depends="jar">
99 329 jones
       <mkdir dir="${installdir}/WEB-INF/lib" />
100 353 jones
       <copyfile src="${build.dir}/${name}.jar"
101 348 jones
                 dest="${installdir}/WEB-INF/lib/${name}.jar" />
102 329 jones
       <copyfile src="${xmlp2}"
103
                 dest="${installdir}/WEB-INF/lib/xerces.jar" />
104
       <copyfile src="${xmlp}"
105
                 dest="${installdir}/WEB-INF/lib/xmlparserv2.jar" />
106
       <copyfile src="${jdbc}"
107
                 dest="${installdir}/WEB-INF/lib/oracle-jdbc111.jar" />
108
       <copyfile src="lib/web.xml"
109
                 dest="${installdir}/WEB-INF/web.xml" />
110
       <copydir src="lib" dest="${installdir}"
111 348 jones
                filtering="yes"
112 329 jones
                excludes="*.jar,*.properties,web.xml,**/srbrmi/*" />
113
       <copydir src="images" dest="${installdir}" />
114 204 jones
   </target>
115
116 113 jones
   <target name="clean" depends="init">
117 348 jones
       <deltree dir="${build.dir}" />
118 113 jones
   </target>
119
120
   <target name="jdoc" depends="init">
121
       <javadoc packagenames="edu.ucsb.nceas.metacat"
122
           sourcepath="src"
123
           destdir="docs"
124
           author="true"
125
           version="true"
126
           use="true"
127 348 jones
           windowtitle="${Name} API"
128
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
129 113 jones
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
130
       />
131
   </target>
132
133
</project>