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 506 2000-10-31 01:12:16Z 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.0a8"/>
22
      <property name="servlet-path" value="/metadata/servlet/metacat"/>
23
      <property name="html-path" value="/metadata"/>
24
      <property name="image-path" value="/img/metadata" />
25
      <property name="user" value="metadata"/>
26
      <property name="password" value="your-pw-here"/>
27
      <property name="web-base-url" 
28
                value="http://www.nceas.ucsb.edu/collab/2840/knbweb"/>
29

    
30
      <filter token="release" value="${release}"/>
31
      <filter token="servlet-path" value="${servlet-path}"/>
32
      <filter token="html-path" value="${html-path}"/>
33
      <filter token="user" value="${user}"/>
34
      <filter token="password" value="${password}"/>
35
      <filter token="image-path" value="${image-path}"/>
36
      <filter token="web-base-url" value="${web-base-url}"/>
37
      <property name="srcdir" value="./src" />
38

    
39
      <property name="build.dir" value="./build"/>
40
      <property name="build.src" value="${build.dir}/src"/>
41
      <property name="build.dest" value="${build.dir}/classes"/>
42
      <property name="build.docs" value="${build.dir}/docs/html"/>
43
      <property name="build.samples" value="${build.dir}/samples"/>
44
      <property name="build.tests" value="${build.dir}/tests"/>
45
      <property name="build.data" value="${build.dir}/data"/>
46
      <property name="build.javadocs" value="${build.dir}/docs/apiDocs"/>
47
      <property name="build.img" value="/opt/httpd/html${image-path}"/>
48

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

    
69
   </target>
70
   
71
   <target name="prepare" depends="init">
72
      <mkdir dir="${build.dir}"/>
73
      <mkdir dir="${build.src}"/>
74
      <mkdir dir="${build.dest}"/>
75

    
76
      <copydir src="${srcdir}" 
77
               dest="${build.src}" 
78
               filtering="yes"
79
               includes="edu/**, com/**"
80
               excludes="**/CVS* **/.#* **/*.sql"/>
81

    
82
   </target>
83

    
84
   <target name="compile" depends="prepare">
85
       <javac srcdir="${build.src}" 
86
              destdir="${build.dest}" 
87
              classpath="${cpath}" 
88
              excludes="**/*.sql" /> 
89
       <copyfile src="lib/metacat.properties" 
90
                 dest="${build.dest}/${package.home}/metacat.properties" 
91
                 filtering="yes" />
92
       <copyfile src="lib/srbProps.properties" 
93
                 dest="${build.dest}/${package.home}/srbProps.properties"/>
94
   </target> 
95

    
96
   <target name="jar" depends="compile">
97
       <delete file="${build.dir}/${name}.jar" />
98
       <copydir src="lib/srbrmi" dest="${build.dest}" />
99
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}" />
100
   </target> 
101

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

    
127
   <target name="clean" depends="init">
128
       <deltree dir="${build.dir}" />
129
   </target>
130

    
131
   <target name="jdoc" depends="init">
132
       <javadoc packagenames="edu.ucsb.nceas.metacat"
133
           sourcepath="src"
134
           destdir="docs"
135
           author="true"
136
           version="true"
137
           use="true"
138
           windowtitle="${Name} API"
139
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
140
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
141
       />
142
   </target>
143

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