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