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 359 2000-08-15 19:48:39Z bojilova $'
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/xmltodb" />
19
      <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
      <property name="html-path" value="/xmltodb"/>
24

    
25
      <filter token="release" value="${release}"/>
26
      <filter token="servlet-path" value="${servlet-path}"/>
27
      <filter token="html-path" value="${html-path}"/>
28

    
29
      <property name="srcdir" value="./src" />
30

    
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
      <property name="oracle_home" 
41
                value="/oracle01/app/oracle/product/8.1.6" />
42
      <property name="toolsdir" 
43
                value="/usr/local/devtools" />
44
      <property name="xmlp" 
45
                value="${toolsdir}/OracleXSU111/lib/xmlparserv2.jar" />
46
      <property name="xmlp2" 
47
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
48
      <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
                value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
54
      <property name="srb" 
55
                value="lib/srbrmi" />
56
      <property name="cpath" 
57
                value="${xmlp2}:${xmlp}:${jdbc}:${jserv}:${jsdk}:${srb}"/>
58
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
59

    
60
   </target>
61
   
62
   <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
              classpath="${cpath}" 
84
              excludes="**/*.sql" /> 
85
       <copyfile src="lib/metacat.properties" 
86
                 dest="${build.dest}/${package.home}/metacat.properties" 
87
                 filtering="yes" />
88
       <copyfile src="lib/marine/marine.properties" 
89
                 dest="${build.dest}/${package.home}/marine/marine.properties"/>
90
   </target> 
91

    
92
   <target name="jar" depends="compile">
93
       <delete file="${build.dir}/${name}.jar" />
94
       <copydir src="lib/srbrmi" dest="${build.dest}" />
95
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}" />
96
   </target> 
97

    
98
   <target name="install" depends="jar">
99
       <mkdir dir="${installdir}/WEB-INF/lib" />
100
       <copyfile src="${build.dir}/${name}.jar" 
101
                 dest="${installdir}/WEB-INF/lib/${name}.jar" />
102
       <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
                filtering="yes"
112
                excludes="*.jar,*.properties,web.xml,**/srbrmi/*" />
113
       <copydir src="images" dest="${installdir}" />
114
   </target> 
115

    
116
   <target name="clean" depends="init">
117
       <deltree dir="${build.dir}" />
118
   </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
           windowtitle="${Name} API"
128
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
129
           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>
(2-2/4)