Project

General

Profile

« Previous | Next » 

Revision 931

Modified the build.xml file to make it easier to set up the configuration.
There is now a "config" target in which all of the properties that are usually
modified are located. Also, now one sets the location of tomcat and the
webapps dir, and chooses a name for the tomcat context, and everything else
is set relative to these. This means that only a few properties need to be
customized for a system (tomcat, webapps, context, username, password, and
the jdbc properties).

Finally, I also changed the pointer to xerces to use the locally present
version of the jar file, rather than an external one. Now the only external
jar file is the servlet.jar that ships with tomcat.

View differences:

build.xml
30 30
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
31 31
--> 
32 32
<project name="metacat" default="jar" basedir=".">
33

  
33 34
   <target name="oracle">
34
     <property name="jdbc-connect" value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
35
     <!-- Customize these properties if you are using oracle -->
36
     <property name="jdbc-connect"
37
               value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/>
35 38
     <property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/>
36 39
     <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.OracleAdapter"/>
37 40
     <property name="oracle_home" value="/oracle01/app/oracle/product/8.1.6" />
38 41
     <property name="jdbc" value="${oracle_home}/jdbc/lib/classes111.zip" />
39
     <property name="user" value="berkley"/>
40
     <property name="password" value=""/>
41 42
   </target>
42 43
   
43 44
   <target name="postgresql">
44
     <property name="jdbc-connect" value="jdbc:postgresql://localhost/metacat"/>
45
     <!-- Customize these properties if you are using postgres -->
46
     <property name="jdbc-connect" 
47
               value="jdbc:postgresql://localhost/metacat"/>
45 48
     <property name="dbDriver" value="org.postgresql.Driver"/>
46
     <property name="dbAdapter" value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
49
     <property name="dbAdapter" 
50
               value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
47 51
     <property name="jdbc" value="lib/jdbc7.1-1.2.jar" />
48
     <property name="user" value="metacat"/>
49
     <property name="password" value=""/>
50 52
   </target>
51 53
   
52
   <target name="init" depends="oracle">
53
      <!--Change the 'depends' attribute above to 'postgresql' to install 
54
          metacat with postgres instead of oracle-->
55
      <property name="installdir" value="/opt/tomcat/webapps/berkley" />
54
   <target name="config" depends="oracle">
55
      <!-- Change the 'depends' attribute above to 'postgresql' to install 
56
           metacat with postgres instead of oracle -->
57

  
58
      <!-- Customize these properties for your system -->
59
      <property name="tomcat" value="/usr/local/devtools/jakarta-tomcat" />
60
      <property name="webapps" value="/opt/tomcat/webapps" />
61
      <property name="context" value="jones" />
62
      <property name="user" value="jones"/>
63
      <property name="password" value="yourpassword"/>
64
      <property name="server" value="dev.nceas.ucsb.edu"/>
65
      <property name="web-base-url" 
66
                value="http://knb.ecoinformatics.org"/>
67
      <property name="default-style" value="knb" />
68

  
69
      <!-- Make sure these paths match the location of the jar files
70
           on your system, the defaults should usually work -->
71
      <property name="jsdk" 
72
                value="${tomcat}/lib/common/servlet.jar" />
73
      <property name="xmlp" 
74
                value="lib/xerces.jar" />
75
      <property name="srb" 
76
                value="lib/srbrmi" />
77
      <property name="cos" 
78
                value="lib/cos.jar" />
79
      <property name="xalan"
80
                value="lib/xalan/xalan.jar" />
81
      <property name="apis"
82
                value="lib/xalan/xml-apis.jar" />
83
   </target>
84

  
85
   <target name="init" depends="config">
86
      <!-- It is less likely you'll need to make any changes from here down,
87
           but customization is possible -->
88
      <property name="installdir" value="${webapps}/${context}" />
56 89
      <property name="name" value="metacat"/>
57 90
      <property name="Name" value="MetaCat"/>
58 91
      <property name="release" value="1.0.3"/>
59
      <property name="web-base-url" 
60
                value="http://knb.ecoinformatics.org"/>
61

  
62
      <property name="replication-path" value="/berkley/servlet/replication"/>
63
      <property name="servlet-path" value="/berkley/servlet/metacat"/>
64
      <property name="html-path" value="/berkley"/>
65
      <property name="image-path" value="/img/berkley" />
66
      <property name="style-path" value="/berkley/style"/>
67
      <property name="server" value="dev.nceas.ucsb.edu"/>
92
      <property name="replication-path" 
93
                value="/${context}/servlet/replication"/>
94
      <property name="servlet-path" value="/${context}/servlet/metacat"/>
95
      <property name="html-path" value="/${context}"/>
96
      <property name="image-path" value="/img/${context}" />
97
      <property name="style-path" value="/${context}/style"/>
68 98
      <property name="replication-log" value="/tmp/metacatreplication.log"/>
69 99
      <property name="config-dir" value="${installdir}" />
70
      <property name="default-style" value="knb" />
71 100
      <property name="eml-module" value="eml" />
72 101
      <property name="eml-version" value="2.0.0beta6" />
73 102
      <property name="eml-tag" value="RELEASE_EML_2_0_0_BETA_6" />
74 103
      <property name="cvsroot" 
75
                value=":ext:berkley@cvs.ecoinformatics.org:/cvs" />
104
                value=":ext:jones@cvs.ecoinformatics.org:/cvs" />
76 105

  
106
      <property name="cpath" 
107
                value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${srb}:${cos}"/>
77 108

  
78 109
      <filter token="docrooturl" value="./" />
79 110
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
......
111 142
      <property name="ver.dir" value="${dist.dir}/${name}-${release}"/>
112 143
      <property name="ver.src" value="${ver.dir}/src"/>
113 144

  
114
      
115
      <property name="toolsdir" 
116
                value="/usr/local/devtools" />
117
      <property name="xmlp2" 
118
                value="${toolsdir}/xerces-1_1_3/xerces.jar" />
119
      <property name="jserv" 
120
                value="/usr/lib/apache/ApacheJServ.jar" />
121
      <property name="jsdk" 
122
                value="${toolsdir}/jakarta-tomcat/lib/common/servlet.jar" />
123
      <property name="srb" 
124
                value="lib/srbrmi" />
125
      <property name="cos" 
126
                value="lib/cos.jar" />
127
      <property name="xalan"
128
                value="lib/xalan/xalan.jar" />
129
      <property name="xalanxml-apis"
130
                value="lib/xalan/xml-apis.jar" />
131
      <property name="cpath" 
132
                value="${xmlp2}:${xalan}:${xalanxml-apis}:${jdbc}:${jserv}:${jsdk}:${srb}:${cos}"/>
133 145
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
134 146

  
135 147
   </target>
......
207 219
       <mkdir dir="${installdir}/WEB-INF/lib" />
208 220
       <copy file="${build.dir}/${name}.jar" 
209 221
             tofile="${installdir}/WEB-INF/lib/${name}.jar" />
210
       <copy file="${xmlp2}" 
222
       <copy file="${xmlp}" 
211 223
             tofile="${installdir}/WEB-INF/lib/xerces.jar" />
212 224
       <copy file="${xalan}" 
213 225
             tofile="${installdir}/WEB-INF/lib/xalan.jar" />
214
       <copy file="${xalanxml-apis}" 
226
       <copy file="${apis}" 
215 227
             tofile="${installdir}/WEB-INF/lib/xml-apis.jar" />
216 228
       <copy file="${jdbc}" 
217 229
             tofile="${installdir}/WEB-INF/lib/oracle-jdbc111.jar" />

Also available in: Unified diff