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 410 berkley
      <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 564 jones
      <property name="web-base-url"
23
                value="http://www.nceas.ucsb.edu/collab/2840/knbweb"/>
24 525 berkley
      <property name="replication-path" value="/metadata/servlet/replication"/>
25 412 berkley
      <property name="servlet-path" value="/metadata/servlet/metacat"/>
26 410 berkley
      <property name="html-path" value="/metadata"/>
27
      <property name="image-path" value="/img/metadata" />
28 412 berkley
      <property name="user" value="metadata"/>
29 525 berkley
      <property name="password" value="your-pw-goes-here"/>
30 348 jones
31
      <filter token="release" value="${release}"/>
32
      <filter token="servlet-path" value="${servlet-path}"/>
33 359 bojilova
      <filter token="html-path" value="${html-path}"/>
34 362 jones
      <filter token="user" value="${user}"/>
35
      <filter token="password" value="${password}"/>
36 409 berkley
      <filter token="image-path" value="${image-path}"/>
37 506 jones
      <filter token="web-base-url" value="${web-base-url}"/>
38 525 berkley
      <filter token="replication-path" value="${replication-path}"/>
39 254 jones
      <property name="srcdir" value="./src" />
40 348 jones
41
      <property name="build.dir" value="./build"/>
42
      <property name="build.src" value="${build.dir}/src"/>
43
      <property name="build.dest" value="${build.dir}/classes"/>
44 516 jones
      <property name="build.docs" value="${build.dir}/docs"/>
45 348 jones
      <property name="build.samples" value="${build.dir}/samples"/>
46
      <property name="build.tests" value="${build.dir}/tests"/>
47
      <property name="build.data" value="${build.dir}/data"/>
48
      <property name="build.javadocs" value="${build.dir}/docs/apiDocs"/>
49 409 berkley
      <property name="build.img" value="/opt/httpd/html${image-path}"/>
50 348 jones
51 113 jones
      <property name="oracle_home"
52 329 jones
                value="/oracle01/app/oracle/product/8.1.6" />
53
      <property name="toolsdir"
54
                value="/usr/local/devtools" />
55 113 jones
      <property name="xmlp"
56 329 jones
                value="${toolsdir}/OracleXSU111/lib/xmlparserv2.jar" />
57 185 jones
      <property name="xmlp2"
58 329 jones
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
59 113 jones
      <property name="jdbc"
60
                value="${oracle_home}/jdbc/lib/classes111.zip" />
61
      <property name="jserv"
62
                value="/usr/lib/apache/ApacheJServ.jar" />
63
      <property name="jsdk"
64 329 jones
                value="${toolsdir}/jakarta-tomcat/lib/servlet.jar" />
65 213 jones
      <property name="srb"
66
                value="lib/srbrmi" />
67 113 jones
      <property name="cpath"
68 319 jones
                value="${xmlp2}:${xmlp}:${jdbc}:${jserv}:${jsdk}:${srb}"/>
69 254 jones
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
70 348 jones
71 113 jones
   </target>
72
73 348 jones
   <target name="prepare" depends="init">
74
      <mkdir dir="${build.dir}"/>
75
      <mkdir dir="${build.src}"/>
76
      <mkdir dir="${build.dest}"/>
77 516 jones
      <mkdir dir="${build.javadocs}"/>
78 348 jones
79
      <copydir src="${srcdir}"
80
               dest="${build.src}"
81
               filtering="yes"
82
               includes="edu/**, com/**"
83
               excludes="**/CVS* **/.#* **/*.sql"/>
84
85
   </target>
86
87
   <target name="compile" depends="prepare">
88
       <javac srcdir="${build.src}"
89
              destdir="${build.dest}"
90 257 jones
              classpath="${cpath}"
91
              excludes="**/*.sql" />
92 116 jones
       <copyfile src="lib/metacat.properties"
93 356 bojilova
                 dest="${build.dest}/${package.home}/metacat.properties"
94
                 filtering="yes" />
95 481 bojilova
       <copyfile src="lib/srbProps.properties"
96
                 dest="${build.dest}/${package.home}/srbProps.properties"/>
97 113 jones
   </target>
98
99 204 jones
   <target name="jar" depends="compile">
100 353 jones
       <delete file="${build.dir}/${name}.jar" />
101 348 jones
       <copydir src="lib/srbrmi" dest="${build.dest}" />
102 564 jones
       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
103
            excludes="**/protocols/" />
104 113 jones
   </target>
105
106 564 jones
   <target name="protocol" depends="compile">
107
       <delete file="${build.dir}/protocol.jar" />
108
       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
109
            includes="**/protocols/" />
110
   </target>
111
112 204 jones
   <target name="install" depends="jar">
113 329 jones
       <mkdir dir="${installdir}/WEB-INF/lib" />
114 353 jones
       <copyfile src="${build.dir}/${name}.jar"
115 348 jones
                 dest="${installdir}/WEB-INF/lib/${name}.jar" />
116 329 jones
       <copyfile src="${xmlp2}"
117
                 dest="${installdir}/WEB-INF/lib/xerces.jar" />
118
       <copyfile src="${xmlp}"
119
                 dest="${installdir}/WEB-INF/lib/xmlparserv2.jar" />
120
       <copyfile src="${jdbc}"
121
                 dest="${installdir}/WEB-INF/lib/oracle-jdbc111.jar" />
122
       <copyfile src="lib/web.xml"
123
                 dest="${installdir}/WEB-INF/web.xml" />
124 409 berkley
       <copydir src="lib"
125 410 berkley
                dest="${build.img}"
126
                includes="*.jpg,*.png,*.gif,**/marine/*.jpg, **/marine/*.png, **/marine/*.gif"/>
127 329 jones
       <copydir src="lib" dest="${installdir}"
128 348 jones
                filtering="yes"
129 329 jones
                excludes="*.jar,*.properties,web.xml,**/srbrmi/*" />
130 391 jones
       <mkdir dir="${installdir}/dtd" />
131
       <copydir src="../dtd" dest="${installdir}/dtd"
132
                filtering="yes"
133
                includes="*.dtd" />
134 329 jones
       <copydir src="images" dest="${installdir}" />
135 204 jones
   </target>
136
137 113 jones
   <target name="clean" depends="init">
138 348 jones
       <deltree dir="${build.dir}" />
139 113 jones
   </target>
140
141 516 jones
   <target name="jdoc" depends="prepare">
142 113 jones
       <javadoc packagenames="edu.ucsb.nceas.metacat"
143 516 jones
           sourcepath="${build.src}"
144
           destdir="${build.javadocs}"
145 113 jones
           author="true"
146
           version="true"
147
           use="true"
148 348 jones
           windowtitle="${Name} API"
149
           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
150 113 jones
           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;"
151
       />
152
   </target>
153
154
</project>