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 357 2000-08-15 19:14:30Z 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

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

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

    
30
      <property name="build.dir" value="./build"/>
31
      <property name="build.src" value="${build.dir}/src"/>
32
      <property name="build.dest" value="${build.dir}/classes"/>
33
      <property name="build.docs" value="${build.dir}/docs/html"/>
34
      <property name="build.samples" value="${build.dir}/samples"/>
35
      <property name="build.tests" value="${build.dir}/tests"/>
36
      <property name="build.data" value="${build.dir}/data"/>
37
      <property name="build.javadocs" value="${build.dir}/docs/apiDocs"/>
38

    
39
      <property name="oracle_home" 
40
                value="/oracle01/app/oracle/product/8.1.6" />
41
      <property name="toolsdir" 
42
                value="/usr/local/devtools" />
43
      <property name="xmlp" 
44
                value="${toolsdir}/OracleXSU111/lib/xmlparserv2.jar" />
45
      <property name="xmlp2" 
46
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
47
      <property name="jdbc" 
48
                value="${oracle_home}/jdbc/lib/classes111.zip" />
49
      <property name="jserv" 
50
                value="/usr/lib/apache/ApacheJServ.jar" />
51
      <property name="jsdk" 
52
                value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
53
      <property name="srb" 
54
                value="lib/srbrmi" />
55
      <property name="cpath" 
56
                value="${xmlp2}:${xmlp}:${jdbc}:${jserv}:${jsdk}:${srb}"/>
57
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
58

    
59
   </target>
60
   
61
   <target name="prepare" depends="init">
62
      <mkdir dir="${build.dir}"/>
63
      <mkdir dir="${build.src}"/>
64
      <mkdir dir="${build.dest}"/>
65

    
66
      <copydir src="${srcdir}" 
67
               dest="${build.src}" 
68
               filtering="yes"
69
               includes="edu/**, com/**"
70
               excludes="**/CVS* **/.#* **/*.sql"/>
71

    
72
      <!-- substitute tokens as needed -->
73
<!--
74
      <replace file="${build.src}/${version.file}" 
75
               token="@@version@@" value="${version}"/>
76
-->
77
   </target>
78

    
79
   <target name="compile" depends="prepare">
80
       <javac srcdir="${build.src}" 
81
              destdir="${build.dest}" 
82
              classpath="${cpath}" 
83
              excludes="**/*.sql" /> 
84
       <copyfile src="lib/metacat.properties" 
85
                 dest="${build.dest}/${package.home}/metacat.properties" 
86
                 filtering="yes" />
87
       <copyfile src="lib/marine/marine.properties" 
88
                 dest="${build.dest}/${package.home}/marine/marine.properties"/>
89
   </target> 
90

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

    
97
   <target name="install" depends="jar">
98
       <mkdir dir="${installdir}/WEB-INF/lib" />
99
       <copyfile src="${build.dir}/${name}.jar" 
100
                 dest="${installdir}/WEB-INF/lib/${name}.jar" />
101
       <copyfile src="${xmlp2}" 
102
                 dest="${installdir}/WEB-INF/lib/xerces.jar" />
103
       <copyfile src="${xmlp}" 
104
                 dest="${installdir}/WEB-INF/lib/xmlparserv2.jar" />
105
       <copyfile src="${jdbc}" 
106
                 dest="${installdir}/WEB-INF/lib/oracle-jdbc111.jar" />
107
       <copyfile src="lib/web.xml" 
108
                 dest="${installdir}/WEB-INF/web.xml" />
109
       <copydir src="lib" dest="${installdir}"
110
                filtering="yes"
111
                excludes="*.jar,*.properties,web.xml,**/srbrmi/*" />
112
       <copydir src="images" dest="${installdir}" />
113
   </target> 
114

    
115
   <target name="clean" depends="init">
116
       <deltree dir="${build.dir}" />
117
   </target>
118

    
119
   <target name="jdoc" depends="init">
120
       <javadoc packagenames="edu.ucsb.nceas.metacat"
121
           sourcepath="src"
122
           destdir="docs"
123
           author="true"
124
           version="true"
125
           use="true"
126
           windowtitle="${Name} API"
127
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
128
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
129
       />
130
   </target>
131

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