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 367 2000-08-15 22:29:25Z jones $'
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/metadata" />
19
      <property name="name" value="metacat"/>
20
      <property name="Name" value="MetaCat"/>
21
      <property name="release" value="1.0a7"/>
22
      <property name="servlet-path" value="/metadata/servlet/metacat"/>
23
      <property name="html-path" value="/metadata"/>
24
      <property name="user" value="metadata"/>
25
      <property name="password" value="metadatapw"/>
26

    
27
      <filter token="release" value="${release}"/>
28
      <filter token="servlet-path" value="${servlet-path}"/>
29
      <filter token="html-path" value="${html-path}"/>
30
      <filter token="user" value="${user}"/>
31
      <filter token="password" value="${password}"/>
32

    
33
      <property name="srcdir" value="./src" />
34

    
35
      <property name="build.dir" value="./build"/>
36
      <property name="build.src" value="${build.dir}/src"/>
37
      <property name="build.dest" value="${build.dir}/classes"/>
38
      <property name="build.docs" value="${build.dir}/docs/html"/>
39
      <property name="build.samples" value="${build.dir}/samples"/>
40
      <property name="build.tests" value="${build.dir}/tests"/>
41
      <property name="build.data" value="${build.dir}/data"/>
42
      <property name="build.javadocs" value="${build.dir}/docs/apiDocs"/>
43

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

    
64
   </target>
65
   
66
   <target name="prepare" depends="init">
67
      <mkdir dir="${build.dir}"/>
68
      <mkdir dir="${build.src}"/>
69
      <mkdir dir="${build.dest}"/>
70

    
71
      <copydir src="${srcdir}" 
72
               dest="${build.src}" 
73
               filtering="yes"
74
               includes="edu/**, com/**"
75
               excludes="**/CVS* **/.#* **/*.sql"/>
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)