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 362 jones
      <property name="installdir" value="/opt/tomcat/webapps/metadata" />
19 348 jones
      <property name="name" value="metacat"/>
20
      <property name="Name" value="MetaCat"/>
21 378 jones
      <property name="release" value="1.0a8"/>
22 362 jones
      <property name="servlet-path" value="/metadata/servlet/metacat"/>
23
      <property name="html-path" value="/metadata"/>
24
      <property name="user" value="metadata"/>
25 367 jones
      <property name="password" value="metadatapw"/>
26 348 jones
27
      <filter token="release" value="${release}"/>
28
      <filter token="servlet-path" value="${servlet-path}"/>
29 359 bojilova
      <filter token="html-path" value="${html-path}"/>
30 362 jones
      <filter token="user" value="${user}"/>
31
      <filter token="password" value="${password}"/>
32 348 jones
33 254 jones
      <property name="srcdir" value="./src" />
34 348 jones
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 113 jones
      <property name="oracle_home"
45 329 jones
                value="/oracle01/app/oracle/product/8.1.6" />
46
      <property name="toolsdir"
47
                value="/usr/local/devtools" />
48 113 jones
      <property name="xmlp"
49 329 jones
                value="${toolsdir}/OracleXSU111/lib/xmlparserv2.jar" />
50 185 jones
      <property name="xmlp2"
51 329 jones
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
52 113 jones
      <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 329 jones
                value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
58 213 jones
      <property name="srb"
59
                value="lib/srbrmi" />
60 113 jones
      <property name="cpath"
61 319 jones
                value="${xmlp2}:${xmlp}:${jdbc}:${jserv}:${jsdk}:${srb}"/>
62 254 jones
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
63 348 jones
64 113 jones
   </target>
65
66 348 jones
   <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 257 jones
              classpath="${cpath}"
83
              excludes="**/*.sql" />
84 116 jones
       <copyfile src="lib/metacat.properties"
85 356 bojilova
                 dest="${build.dest}/${package.home}/metacat.properties"
86
                 filtering="yes" />
87 306 berkley
       <copyfile src="lib/marine/marine.properties"
88 348 jones
                 dest="${build.dest}/${package.home}/marine/marine.properties"/>
89 113 jones
   </target>
90
91 204 jones
   <target name="jar" depends="compile">
92 353 jones
       <delete file="${build.dir}/${name}.jar" />
93 348 jones
       <copydir src="lib/srbrmi" dest="${build.dest}" />
94 353 jones
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}" />
95 113 jones
   </target>
96
97 204 jones
   <target name="install" depends="jar">
98 329 jones
       <mkdir dir="${installdir}/WEB-INF/lib" />
99 353 jones
       <copyfile src="${build.dir}/${name}.jar"
100 348 jones
                 dest="${installdir}/WEB-INF/lib/${name}.jar" />
101 329 jones
       <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 348 jones
                filtering="yes"
111 329 jones
                excludes="*.jar,*.properties,web.xml,**/srbrmi/*" />
112 391 jones
       <mkdir dir="${installdir}/dtd" />
113
       <copydir src="../dtd" dest="${installdir}/dtd"
114
                filtering="yes"
115
                includes="*.dtd" />
116 329 jones
       <copydir src="images" dest="${installdir}" />
117 204 jones
   </target>
118
119 113 jones
   <target name="clean" depends="init">
120 348 jones
       <deltree dir="${build.dir}" />
121 113 jones
   </target>
122
123
   <target name="jdoc" depends="init">
124
       <javadoc packagenames="edu.ucsb.nceas.metacat"
125
           sourcepath="src"
126
           destdir="docs"
127
           author="true"
128
           version="true"
129
           use="true"
130 348 jones
           windowtitle="${Name} API"
131
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
132 113 jones
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
133
       />
134
   </target>
135
136
</project>