Ignore:
Timestamp:
2008-04-14T16:20:45+12:00 (16 years ago)
Author:
dmn
Message:

updating branch from trunk

File:
1 copied

Legend:

Unmodified
Added
Removed
  • greenstone3/branches/customizingGreenstone3/build.xml

    r15039 r15191  
    11<?xml version="1.0"?>
    2 
    32<!-- ======================================================================
    43     March 2005                                                   
    54
    65     Greenstone3 build and install script
    7                    
     6                 
    87     kjdon                                                               
    98     ====================================================================== -->
    109<project name="greenstone3" default="usage" basedir=".">
    1110
    12     <!-- ============ classpath =================== -->
    13     <path id="project.classpath">
    14        <fileset dir="lib/java">
    15           <include name="**/*.jar"/>
    16        </fileset>
    17     </path>
    18 
    19     <!-- ============ self defined tasks =================== -->
    20 
    21     <taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpath="${basedir}/lib/java/anttasks.jar"/>
    22     <taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpath="${basedir}/lib/java/anttasks.jar"/>
    23     <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
    24     <taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpath="${basedir}/lib/java/anttasks.jar"/>
    25 
    26 <!-- ===================== Property Definitions =========================== -->
    27 
    28 <!--
     11  <!-- ============ classpath =================== -->
     12  <path id="project.classpath">
     13    <fileset dir="lib/java">
     14      <include name="**/*.jar"/>
     15    </fileset>
     16  </path>
     17 
     18  <!-- ============ self defined tasks =================== -->
     19  <taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpathref="project.classpath"/>
     20  <taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpathref="project.classpath"/>
     21  <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
     22  <taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
     23  <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
     24  <taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
     25 
     26  <!-- ===================== Property Definitions =========================== -->
     27 
     28  <!--
    2929
    3030  Each of the following properties are used in the build script.
     
    3535
    3636  * Definitions from a "build.properties" file in the top level
    37     source directory of this application.
     37  source directory of this application.
    3838
    3939  * Definitions from a "build.properties" file in the user's
    40     home directory.
     40  home directory.
    4141
    4242  * Default definitions in this build.xml file.
     
    4848  "build.properties" files as well as in the "build.xml" script.
    4949
    50 -->
    51 
     50  -->
     51
     52 
     53  <!--the first two properties have to be put on the top to be used by build.properties-->
     54  <property name="src.packages.home" value="${basedir}/src/packages"/>
     55  <property name="gdbm.home" value="${src.packages.home}/gdbm-1.8.3"/>
    5256  <property file="build.properties"/>
    5357  <property file="${user.home}/build.properties"/>
     
    5559  <!-- get properties from the environment -->
    5660  <property environment="env"/>
     61
     62   
     63  <!-- version properties for external packages -->
     64  <property name="tomcat.version" value="apache-tomcat-5.5.25"/>
     65  <property name="axis.zip.version" value="axis-bin-1_2_1.zip"/>
     66  <property name="axis.dir.version" value="axis-1_2_1"/>
     67  <property name="gdbm.version" value="gdbm-1.8.3"/>
     68
    5769  <property name="build.home" value="${basedir}/build"/>
    5870  <property name="src.home" value="${basedir}/src/java"/>
    59   <property name="src.packages.home" value="${basedir}/src/packages"/>
    6071  <property name="packages.home" value="${basedir}/packages"/>
    6172  <!-- this may be set in build.properties, eg if you move the web dir to
     
    6879  <!-- other files needed by the servlet go here -->
    6980  <property name="web.classes" value="${web.home}/WEB-INF/classes"/>
     81  <!--- flax: the WordNet home -->
     82  <property name="wn.home" value="${web.home}/WEB-INF/classes/flax/WordNet"/>
     83
    7084  <!-- jni libraries and java wrappers go here -->
    7185  <property name="lib.jni" value="${basedir}/lib/jni"/>
    72    
     86 
    7387  <property name="javadocs" value="${basedir}/docs/javadoc"/>
    7488
     
    7791
    7892
    79   <!-- version number stuff -->
    80 
    81   <!-- app.version defaults to trunk -->
    82   <condition property="app.version" value="trunk">
    83     <not><isset property="app.version"/></not>
    84   </condition>
    85 
    86     <!-- determine the 'branch path' -->
    87   <condition property="branch.path" value="trunk">
    88     <equals arg1="${app.version}" arg2="trunk" />
    89   </condition>
    90   <condition property="branch.path" value="branches/${app.version}">
    91     <not><equals arg1="${app.version}" arg2="trunk" /></not>
    92   </condition>
    93 
    94 
     93  <!-- defaults - set these on the command line or in build.properties or they will take these default values-->
     94  <property name="app.version" value="trunk"/>
     95  <property name="branch.path" value="trunk"/>
     96  <property name="branch.revision" value="HEAD"/>
     97
     98  <!--constants -->
    9599  <property name="flax.svn.root" value="http://svn.greenstone.org/flax"/>
    96 
    97100  <property name="svn.root" value="http://svn.greenstone.org"/>
    98 <!--  <property name="cvs.root" value=":pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src"/> -->
     101
     102  <!--  <property name="cvs.root" value=":pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src"/> -->
    99103  <!-- catalina home is set to tomcat basedir is already installed, otherwise
    100104  use greenstone's tomcat -->
     
    159163    <isset property="disable.collection.building"/>
    160164  </condition>
    161    
     165
     166  <!-- where is search4j tool -->
     167  <condition property="search4j.exec" value="bin/search4j.exe">
     168    <isset property="current.os.iswindows"/>
     169  </condition>
     170  <property name="search4j.exec" value="bin/search4j"/>
     171
     172 
    162173  <!-- ============= Base dirs for each package and component ============ -->
    163174  <property name="src.applet.home" value="${src.home}/org/greenstone/applet"/>
     
    167178  <property name="gli.home" value="${basedir}/gli"/>
    168179  <property name="javagdbm.home" value="${src.packages.home}/javagdbm"/>
    169   <property name="gdbm.home" value="${src.packages.home}/gdbm-1.8.3"/>
    170 
     180 
    171181  <!--<property name="indexers.home" value="${basedir}/src/packages/indexers">-->
    172182  <condition property="indexers.home" value="${basedir}/src/packages/indexers">
     
    184194
    185195
    186 <!--  ==================== Compilation Control Options ==================== -->
    187 
    188 <!--
     196  <!--  ==================== Compilation Control Options ==================== -->
     197
     198  <!--
    189199
    190200  These properties control option settings on the Javac compiler when it
     
    197207  compile.optimize     Should compilation include the optimize option?
    198208
    199 -->
     209  -->
    200210
    201211  <property name="compile.debug"       value="true"/>
     
    203213  <property name="compile.optimize"    value="true"/>
    204214
    205 <!--
     215  <!--
    206216
    207217  Rather than relying on the CLASSPATH environment variable, Ant includes
     
    212222  that you explicitly added.
    213223
    214 -->
     224  -->
    215225
    216226  <path id="compile.classpath">
     
    228238    <!-- Include the axis jar files -->
    229239    <!--<fileset dir="${basedir}/comms/soap/axis/lib">
    230       <include name="*.jar"/>
    231     </fileset>-->
     240    <include name="*.jar"/>
     241  </fileset>-->
    232242   
    233243    <!-- include the jar files from the source packages -->
     
    265275    <pathelement path="${env.PATH}"/>
    266276    <pathelement path="${env.Path}"/>
     277    <pathelement path="${wn.home}/bin"/>
    267278  </path>
    268279
     
    275286    <echo>os.unix: ${os.unix}</echo>
    276287  </target>
    277 <!-- ==================== Primary and Global Targets ============================= -->
     288  <!-- ==================== Primary and Global Targets ============================= -->
    278289
    279290  <!-- add comments about using xxx-core, xxx-packages if only want certain parts?? -->
    280291
    281   <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections,prepare-gdbm"
     292  <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections,prepare-gdbm, prepare-flax"
    282293    description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional subversion checkouts and downloads, so you need to be online to run this.">
    283 <!--  <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections"
     294    <!--  <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections"
    284295    description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional cvs checkouts and downloads, so you need to be online to run this.">-->
    285296
     
    293304    description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare install'."/>
    294305 
    295 <!--  <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web"
    296     description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>-->
     306  <!--  <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web"
     307  description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>-->
    297308  <target name="svnupdate" depends="init,svnupdate-packages,svnupdate-core,svnupdate-gs2building,svnupdate-web"
    298309    description="Do a `svn update` for all sources. Doesn't recompile the code. You need to be online to run this."/>
     
    305316    description="Configure the installation. Includes setting up config files. Should be re-run if you change the build.properties file."/>
    306317
    307   <target name="clean" depends="init,clean-gdbm,clean-packages,clean-core,clean-gs2building"
     318  <target name="clean" depends="init,clean-packages,clean-core,clean-gs2building,clean-gdbm"
    308319    description="Remove all old compiled code. Includes core, packages and gs2building if necessary"/>
     320 
     321  <target name="distclean" depends="init,distclean-packages,clean-core,distclean-gs2building,distclean-gdbm"
     322    description="Remove all compiled code and also any Makefiles etc generated during configure-c++. Includes core, packages, gs2building as necessary"/>
    309323 
    310324  <target name="compile" depends="init,compile-web,compile-packages,compile-core,compile-gs2building"
    311325    description="Compile all the source code, includes core, packages and gs2building if necessary. Copy jar files and executables to their correct places."/>
    312    
     326 
    313327  <target name="update" depends="init,svnupdate,clean,configure,configure-c++,compile"
    314     description="Update (thru Subversion) all the source (including core, packages and gs2building), then clean, configure and recompile."/>
     328    description="Update (thru Subversion) all the source (including core, packages and gs2building), then clean, configure and recompile. To do this without any SVN updates, run it like 'ant -Dnosvn.mode=yes update'"/>
    315329
    316330  <target name="start" depends="init,start-tomcat"
    317331    description="Startup the Tomcat server." >
    318     <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo>
    319     <echo>Tomcat:   ${catalina.home}</echo>
    320     <echo>Java: ${java.home}</echo>
    321         <echo>URL:  http://${tomcat.server}:${tomcat.port}${app.path}/</echo>
    322         <!-- assuming that index.html is not needed here -->   
     332    <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo>
     333    <echo>Tomcat:   ${catalina.home}</echo>
     334    <echo>Java: ${java.home}</echo>
     335    <echo>URL:  http://${tomcat.server}:${tomcat.port}${app.path}/</echo>
     336    <!-- assuming that index.html is not needed here -->   
    323337  </target>
    324338
     
    329343
    330344
    331 <!-- =========== Help targets ===================================  -->
     345  <!-- =========== Help targets ===================================  -->
    332346 
    333347  <property name="install-command" value="ant [options] prepare install"/>
     
    337351    <echo message="  Execute 'ant -help' for Ant help."/>
    338352    <echo>To install Greenstone3, run '${install-command}'.
    339 There are properties defined in build.properties. The install process will ask you if these properties are set correctly. To avoid this prompt, use the '-Dproperties.accepted=yes' option.
    340 To log the output, use the '-logfile build.log' option.
    341 The README.txt file has more information about the ant targets and install process.
     353      There are properties defined in build.properties. The install process will ask you if these properties are set correctly. To avoid this prompt, use the '-Dproperties.accepted=yes' option.
     354      To log the output, use the '-logfile build.log' option.
     355      The README.txt file has more information about the ant targets and install process.
    342356    </echo>
    343357  </target>
     
    349363  </target>
    350364
    351 <!-- ====== initialization and setup targets ================== -->
     365  <!-- ====== initialization and setup targets ================== -->
    352366
    353367  <target name="accept-properties" unless="properties.accepted">
    354368    <input addproperty="properties.ok" validargs="y,n">The following properties (among others) are being used from a build.properties file found in this directory:
    355 tomcat.server=${tomcat.server}
    356 tomcat.port=${tomcat.port}
    357 tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed)
    358 proxy.host=${proxy.host}
    359 proxy.port=${proxy.port}
    360 If these are not acceptable, please change them and rerun this target. Continue [y/n]? />
     369      tomcat.server=${tomcat.server}
     370      tomcat.port=${tomcat.port}
     371      tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed)
     372      proxy.host=${proxy.host}
     373      proxy.port=${proxy.port}
     374      If these are not acceptable, please change them and rerun this target. Continue [y/n]? />
    361375    </input>
    362376    <condition property="do.abort">
     
    366380  </target>
    367381
    368 <!--  <target name="check-cvsroot">
    369     <condition property="svnroot.notset">
    370       <or>
    371             <not>
    372               <isset property="env.CVSROOT"/>
    373             </not>
    374             <equals arg1="" arg2="${env.CVSROOT}"/>
    375       </or>
    376     </condition>
    377     <fail if="cvsroot.notset" message="You need to set the CVSROOT variable"/>
    378   </target> -->
    379382
    380383  <!-- this sets up some initial properties -->
     
    403406    </condition>
    404407   
    405       <echo>tomcat.port = ${tomcat.port}</echo>
    406       <echo>gli.present = ${gli.present}</echo>
    407       <echo>gs2build.present = ${gs2build.present}</echo>
    408       <echo>gsdl2.installed.path = ${gsdl2.installed.path}</echo>
    409      <!-- gsdl2.installed.path appears not to be set? -->
     408    <echo>tomcat.port = ${tomcat.port}</echo>
     409    <echo>gli.present = ${gli.present}</echo>
     410    <echo>gs2build.present = ${gs2build.present}</echo>
     411    <echo>gsdl2.installed.path = ${gsdl2.installed.path}</echo>
     412    <!-- gsdl2.installed.path appears not to be set? -->
    410413
    411414    <condition property="proxy.present">
     
    438441    <mysetproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
    439442  </target>
    440      
    441  <!-- ========== Web app Targets ================================ -->
     443 
     444  <!-- ========== Web app Targets ================================ -->
    442445 
    443446  <target name="prepare-web" depends="init,configure-java-version">
     
    446449  </target>
    447450 
    448   <!-- if we are using java 1.5, we need the xalan.jar file in web/WEB-INF/lib,  but if we are using java 1.4, we can't have it there -->
     451  <!-- if we are using java 1.5+, we need the xalan.jar file in web/WEB-INF/lib,  but if we are using java 1.4, we can't have it there -->
    449452  <target name="configure-java-version" depends="init"
    450     description="Run this target if you have changed the default version of java since installing greenstone3">
     453    description="Activates or deactivates some jar libraries as needed depending on your java version">
     454
     455    <available property="have.xalan.jar" file="${web.lib}/xalan.jar"/>
    451456    <condition property="need.xalan.jar">
    452       <equals arg1="1.5" arg2="${ant.java.version}"/>
     457      <or>
     458    <equals arg1="1.5" arg2="${ant.java.version}"/>
     459    <equals arg1="1.6" arg2="${ant.java.version}"/>
     460      </or>
    453461    </condition>
    454     <antcall target="activate-xalan-jar"/>
    455     <antcall target="deactivate-xalan-jar"/>
    456   </target>
    457  
    458   <target name="activate-xalan-jar" if="need.xalan.jar">
     462
     463    <!-- if they have xalan.jar but dont need it -->
     464    <if>
     465      <bool>
     466    <and>
     467      <isset property="have.xalan.jar"/>
     468      <not><isset property="need.xalan.jar"/></not>
     469    </and>
     470      </bool>
     471      <antcall target="deactivate-xalan-jar"/>
     472    </if>
     473
     474    <!-- if they need xalan.jar but dont have it -->
     475    <if>
     476      <bool>
     477    <and>
     478      <not><isset property="have.xalan.jar"/></not>
     479      <isset property="need.xalan.jar"/>
     480    </and>
     481      </bool>
     482      <antcall target="activate-xalan-jar"/>
     483    </if>
     484
     485  </target>
     486 
     487  <target name="activate-xalan-jar">
     488    <echo>activating xalan.jar</echo>
    459489    <copy file="${web.lib}/xalan.jar.tmp" tofile="${web.lib}/xalan.jar"/>
    460     <antcall target="copy-xalan-for-mac" />
    461   </target>
    462 
    463   <target name="copy-xalan-for-mac" if="current.os.ismac">
    464        <copy file="${web.lib}/xalan.jar.tmp" tofile="${tomcat.installed.path}/common/endorsed/xalan.jar"/>
    465   </target>
    466 
    467   <target name="deactivate-xalan-jar" unless="need.xalan.jar">
     490    <if><bool><isset property="current.os.ismac"/></bool>
     491      <copy file="${web.lib}/xalan.jar.tmp" tofile="${catalina.home}/common/endorsed/xalan.jar"/>
     492    </if>
     493  </target>
     494
     495  <!-- to delete -->
     496  <target name="copy-xalan-for-mac"></target>
     497
     498  <target name="deactivate-xalan-jar">
     499    <echo>deactivating xalan.jar</echo>
    468500    <delete file="${web.lib}/xalan.jar"/>
    469501  </target>
    470502
     503<target name="prepare-collections" depends="init">
     504    <property name="collect.dir" value="${web.home}/sites/localsite/collect"/>
     505<echo message="installing collections..."/>
     506<antcall target="gs2mgdemo-install"/>
     507<antcall target="gs2mgppdemo-install"/>
     508<antcall target="gberg-install"/>
     509
     510</target>
     511
     512<target name="gs2mgdemo-prepare" if="collect.dir">
     513 <property name="gs2mgdemo.dir" value="${collect.dir}/gs2mgdemo"/>
     514 <property name="gs2mgdemo.import.zip" value="${gs2mgdemo.dir}/import.zip"/>
     515  <property name="gs2mgdemo.metadata.zip" value="${gs2mgdemo.dir}/metadata.zip"/>
     516  <property name="gs2mgdemo.index.zip" value="${gs2mgdemo.dir}/index.zip"/>
     517
     518<fileset id="gs2mgdemofiles" dir="${gs2mgdemo.dir}">
     519    <include name="${gs2mgdemo.import.zip}"/>
     520    <include name="${gs2mgdemo.metadata.zip}"/>
     521    <include name="${gs2mgdemo.index.zip}"/>
     522</fileset>
     523
     524<condition property="gs2mgdemo.present">
     525    <and>
     526    <available file="${gs2mgdemo.import.zip}"/>
     527    <available file="${gs2mgdemo.metadata.zip}"/>
     528        <available file="${gs2mgdemo.index.zip}"/>
     529    </and>
     530  </condition>
     531</target>
     532
     533<target name="gs2mgdemo-install" if="gs2mgdemo.present"  depends="gs2mgdemo-prepare">
     534<echo> installing gs2mgdemo</echo>
     535<unzip dest="${gs2mgdemo.dir}">
     536    <fileset refid="gs2mgdemofiles"/>
     537</unzip>
     538<delete>
     539    <fileset refid="gs2mgdemofiles"/>
     540</delete>
     541<echo>collection gs2mgdemo installed</echo>
     542</target>
     543
     544<target name="gs2mgppdemo-prepare" if="collect.dir">
     545 <property name="gs2mgppdemo.dir" value="${collect.dir}/gs2mgppdemo"/>
     546 <property name="gs2mgppdemo.import.zip" value="${gs2mgppdemo.dir}/import.zip"/>
     547  <property name="gs2mgppdemo.metadata.zip" value="${gs2mgppdemo.dir}/metadata.zip"/>
     548  <property name="gs2mgppdemo.index.zip" value="${gs2mgppdemo.dir}/index.zip"/>
     549
     550<fileset id="gs2mgppdemofiles" dir="${gs2mgppdemo.dir}">
     551        <include name="${gs2mgppdemo.import.zip}"/>
     552        <include name="${gs2mgppdemo.metadata.zip}"/>
     553        <include name="${gs2mgppdemo.index.zip}"/>
     554</fileset>
     555
     556<condition property="gs2mgppdemo.present">
     557    <and>
     558        <available file="${gs2mgppdemo.import.zip}"/>
     559        <available file="${gs2mgppdemo.metadata.zip}"/>
     560        <available file="${gs2mgppdemo.index.zip}"/>
     561    </and>
     562  </condition>
     563</target>
     564
     565<target name="gs2mgppdemo-install" if="gs2mgppdemo.present" depends="gs2mgppdemo-prepare">
     566<unzip dest="${gs2mgppdemo.dir}">
     567        <fileset refid="gs2mgppdemofiles"/>
     568</unzip>
     569<delete>
     570        <fileset refid="gs2mgppdemofiles"/>
     571</delete>
     572<echo>collection gs2mgppdemo installed</echo>
     573</target>   
     574
     575<target name="gberg-prepare" if="collect.dir">
     576 <property name="gberg.dir" value="${collect.dir}/gberg"/>
     577 <property name="gberg.index.zip" value="${gberg.dir}/index.zip"/>
     578
     579<fileset id="gbergfiles" dir="${gberg.dir}">
     580        <include name="${gberg.index.zip}"/>
     581</fileset>
     582<available file="${gberg.index.zip}" property="gberg.present"/>
     583</target>
     584
     585<target name="gberg-install" if="gberg.present" depends="gberg-prepare">
     586<unzip dest="${gberg.dir}">
     587        <fileset refid="gbergfiles"/>
     588</unzip>
     589<delete>
     590        <fileset refid="gbergfiles"/>
     591</delete>
     592<echo>collection gberg installed</echo>
     593</target>
     594
     595
     596
     597
     598
     599
     600
     601
     602
     603
     604
     605
     606
     607
     608
     609
     610
     611<!--
    471612  <target name="prepare-collections" depends="init">
    472613    <property name="collect.dir" value="${web.home}/sites/localsite/collect"/>
    473     <!-- gs2mgdemo -->
     614   
    474615    <unzip src="${collect.dir}/gs2mgdemo/import.zip"
    475616      dest="${collect.dir}/gs2mgdemo"/>
     
    481622    <delete file="${collect.dir}/gs2mgdemo/metadata.zip"/>
    482623    <delete file="${collect.dir}/gs2mgdemo/index/index.zip"/>
    483     <!-- gs2mgppdemo -->
     624   
    484625    <unzip src="${collect.dir}/gs2mgppdemo/import.zip"
    485626      dest="${collect.dir}/gs2mgppdemo"/>
     
    491632    <delete file="${collect.dir}/gs2mgppdemo/metadata.zip"/>
    492633    <delete file="${collect.dir}/gs2mgppdemo/index/index.zip"/>
    493     <!-- gberg -->
     634 
    494635    <unzip src="${collect.dir}/gberg/index/index.zip"
    495636      dest="${collect.dir}/gberg/index"/>
    496637    <delete file="${collect.dir}/gberg/index/index.zip"/>
    497638  </target>
    498 
     639-->
    499640 
    500641  <target name="configure-web" depends="init"
     
    526667  </target>
    527668
    528     <target name="svnupdate-web" unless="nosvn.mode">
    529         <svn>
    530             <update dir="${web.home}"/>
    531         </svn>
    532     </target>
     669  <target name="svnupdate-web" unless="nosvn.mode">
     670    <svn>
     671      <update dir="${web.home}"/>
     672    </svn>
     673  </target>
    533674
    534675  <target name="update-web" depends="init,svnupdate-web,configure-web"
     
    536677
    537678
    538 <!-- ======================= Tomcat Targets ========================== -->
     679  <!-- ======================= Tomcat Targets ========================== -->
    539680 
    540681  <!-- this target downloads and installs Tomcat -->
     
    544685    <!-- check that packages dir is there -->
    545686    <mkdir dir="${packages.home}"/>
    546     <get src="http://www.greenstone.org/gs3files/apache-tomcat-5.5.25.zip"
    547       dest="${packages.home}/apache-tomcat-5.5.25.zip"
     687    <get src="http://www.greenstone.org/gs3files/${tomcat.version}.zip"
     688      dest="${packages.home}/${tomcat.version}.zip"
    548689      usetimestamp="true"/>
    549     <unzip src="${packages.home}/apache-tomcat-5.5.25.zip"
     690    <unzip src="${packages.home}/${tomcat.version}.zip"
    550691      dest="${packages.home}"/>
    551     <get src="http://www.greenstone.org/gs3files/apache-tomcat-5.5.25-compat.zip"
    552       dest="${packages.home}/apache-tomcat-5.5.25-compat.zip"
     692    <get src="http://www.greenstone.org/gs3files/${tomcat.version}-compat.zip"
     693      dest="${packages.home}/${tomcat.version}-compat.zip"
    553694      usetimestamp="true"/>
    554     <unzip src="${packages.home}/apache-tomcat-5.5.25-compat.zip"
     695    <unzip src="${packages.home}/${tomcat.version}-compat.zip"
    555696      dest="${packages.home}"/>
    556697    <!-- delete any existing tomcat -->
    557698    <delete dir="${packages.home}/tomcat"/>
    558699    <move todir="${packages.home}/tomcat">
    559       <fileset dir="${packages.home}/apache-tomcat-5.5.25"/>
     700      <fileset dir="${packages.home}/${tomcat.version}"/>
    560701    </move>
    561702    <copy file="${basedir}/resources/tomcat/setclasspath.bat"
     
    592733    <!-- need to edit the config file, or do we get the user to do this???-->
    593734  </target>
    594    
    595   <target name="start-tomcat" description="Startup only Tomcat" depends="init" if="tomcat.islocal">
    596    <property name="tomcat.classpath" refid="local.tomcat.classpath"/>
     735 
     736  <target name="start-tomcat" description="Startup only Tomcat" depends="init,configure-java-version" if="tomcat.islocal">
     737    <property name="tomcat.classpath" refid="local.tomcat.classpath"/>
    597738    <property name="tomcat.path" refid="local.tomcat.path"/>
    598739    <property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"/>
     
    606747      <env key="LD_LIBRARY_PATH" path="${env.LD_LIBRARY_PATH}:${lib.jni}"/>
    607748      <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${lib.jni}:${gdbm.installed.path}/lib"/> <!-- for mac os -->
     749      <env key="WNHOME" path="${wn.home}"/>
    608750    </exec>
    609751    <exec executable="${catalina.home}/bin/startup.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="true">
     
    660802
    661803
    662 <!-- ======================= ant Targets ============================ -->
     804  <!-- ======================= ant Targets ============================ -->
    663805  <target name="prepare-ant" depends="init">
    664806    <get src="http://www.greenstone.org/gs3files/apache-ant-1.7.0-bin.zip"
     
    672814  </target>
    673815
    674 <!-- ======================= Axis Targets ============================ -->
     816  <!-- ======================= Axis Targets ============================ -->
    675817
    676818  <target name="prepare-axis" depends="init">
    677     <get src="http://www.greenstone.org/gs3files/axis-bin-1_2_1.zip"
    678       dest="${packages.home}/axis-bin-1_2_1.zip"
     819    <get src="http://www.greenstone.org/gs3files/${axis.zip.version}"
     820      dest="${packages.home}/${axis.zip.version}"
    679821      usetimestamp="true"/>
    680     <unzip src="${packages.home}/axis-bin-1_2_1.zip"
     822    <unzip src="${packages.home}/${axis.zip.version}"
    681823      dest="${packages.home}"/>
    682824    <move todir="${packages.home}/axis">
    683       <fileset dir="${packages.home}/axis-1_2_1"/>
     825      <fileset dir="${packages.home}/${axis.dir.version}"/>
    684826    </move>
    685827    <!-- install axis into greenstone web app -->
     
    752894      </and>
    753895    </condition>
    754    </target>
     896  </target>
    755897
    756898  <target name="create-deployment-files" depends="get-sitename,get-siteuri,check-deployment-files"
     
    761903      tofile="${basedir}/resources/soap/${axis.sitename}.wsdd"
    762904      filtering="true"/>
    763      <copy file="${basedir}/resources/soap/undeploy-site.wsdd.template"
     905    <copy file="${basedir}/resources/soap/undeploy-site.wsdd.template"
    764906      tofile="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"
    765907      filtering="true"/>
     
    780922    <copy file="${build.home}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" tofile="${web.classes}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" />
    781923  </target>
    782    
    783 
    784 <!-- ====================== Core targets ============================== -->
    785 <!-- core targets refer to the core gsdl3 java src -->
    786  
    787   <target name="prepare-core" unless="nocvs.mode">
     924 
     925
     926  <!-- ====================== Core targets ============================== -->
     927  <!-- core targets refer to the core gsdl3 java src -->
     928 
     929  <target name="prepare-core" unless="nosvn.mode">
    788930    <!-- just get rid of empty directories-->
    789931    <svn>
    790         <update dir="."/>
    791     </svn>
     932      <update dir="."/>
     933    </svn>
    792934  </target>
    793935 
     
    797939    description="Update only the Greenstone core" />
    798940 
    799   <target name="svnupdate-core" unless="nocvs.mode">
    800 
    801     <svn>
    802         <update dir="." recurse="false"/>
    803     </svn>
    804 
    805    <svn>
    806         <update dir="bin"/>
    807         <update dir="comms"/>
    808         <update dir="dist-resources"/>
    809         <update dir="docs"/>
    810         <update dir="lib"/>
    811         <update dir="resources"/>
    812         <update dir="src"/>
    813         <update dir="winutil"/>
    814     </svn>
     941  <target name="svnupdate-core" unless="nosvn.mode">
     942
     943    <svn>
     944      <update dir="." recurse="false"/>
     945    </svn>
     946
     947    <svn>
     948      <update dir="bin"/>
     949      <update dir="comms"/>
     950      <update dir="dist-resources"/>
     951      <update dir="docs"/>
     952      <update dir="lib"/>
     953      <update dir="resources"/>
     954      <update dir="src"/>
     955      <update dir="winutil"/>
     956    </svn>
    815957
    816958  </target>
     
    821963  </target>
    822964
    823    <target name="compile-core" depends="init"
     965  <target name="compile-core" depends="init"
    824966    description="Compile only the Greenstone core">
    825967    <mkdir dir="${build.home}"/>
     
    855997      </manifest>
    856998    </jar>
    857      
     999   
    8581000    <jar destfile="${build.home}/phind.jar">
    8591001      <fileset dir="${build.home}">
     
    8981040    <copy file="${build.home}/server.jar" todir="${basedir}"/>
    8991041  </target>
    900  
    901 <!-- ================== Packages targets ================================ -->
     1042  
     1043  <!-- ================== Packages targets ================================ -->
    9021044  <!-- these targets refer to the greenstone source packages - these need
    9031045  updating less often, so are in  separate targets to the core -->
    9041046  <target name="prepare-packages" depends="init,prepare-indexers"/>
    9051047 
    906   <target name="checkout-indexers" depends="init" if="independent-indexers" unless="nocvs.mode">
    907 <!--  <target name="checkout-indexers" depends="check-svnroot,init" if="independent-indexers" unless="nocvs.mode"> -->
     1048  <target name="checkout-indexers" depends="init" if="independent-indexers" unless="nosvn.mode">
    9081049    <svn>
    909         <checkout url="${svn.root}/indexers/${branch.path}" dest="${src.packages.home}/indexers"/>
    910     </svn>
     1050      <checkout url="${svn.root}/indexers/${branch.path}" dest="${src.packages.home}/indexers" revision="${branch.revision}"/>
     1051    </svn>
    9111052  </target>
    9121053 
     
    9181059    description="Update only the source packages"/>
    9191060
    920   <target name="svnupdate-packages" unless="nocvs.mode">
    921    <svn>
    922         <update dir="${src.packages.home}"/>
    923     </svn>
    924   </target>
    925  
    926   <target name="configure-packages" depends="init,configure-gdbm,configure-javagdbm,configure-indexers"
     1061  <target name="svnupdate-packages" unless="nosvn.mode">
     1062    <svn>
     1063      <update dir="${src.packages.home}"/>
     1064    </svn>
     1065  </target>
     1066 
     1067  <target name="configure-packages" depends="init,configure-javagdbm,configure-indexers"
    9271068    description="Configure only the packages."/>
    9281069 
     
    9401081      <arg value="--prefix=${basedir}"/>
    9411082      <arg value="--libdir=${lib.jni}"/>
    942      <arg value="--with-gdbm=${gdbm.installed.path}"/>
     1083      <arg value="--with-gdbm=${gdbm.installed.path}"/>
    9431084    </exec>   
    9441085  </target>
    9451086
    946 <!-- Message from oran. I removed the condition from this line becuase it meant
    947     the indexers would only be configured if collection building was DISabled.
    948     Shouldn't they be configured when collection building is ENabled? -->
    949 
    950 <!--    <target name="configure-indexers" depends="init" if="independent-indexers"> -->
    951 <target name="configure-indexers" depends="init">
    952         <echo>Configuring Indexers</echo>
    953         <exec executable="${indexers.home}/configure" os="${os.unix}" dir="${indexers.home}">
    954             <arg value="--prefix=${basedir}"/>
    955             <arg value="--libdir=${lib.jni}"/>
    956         </exec>         
    957     </target>
     1087  <!-- Message from oran. I removed the condition from this line becuase it meant
     1088  the indexers would only be configured if collection building was DISabled.
     1089  Shouldn't they be configured when collection building is ENabled? -->
     1090
     1091  <!--  <target name="configure-indexers" depends="init" if="independent-indexers"> -->
     1092  <target name="configure-indexers" depends="init">
     1093    <echo>Configuring Indexers</echo>
     1094    <exec executable="${indexers.home}/configure" os="${os.unix}" dir="${indexers.home}">
     1095      <arg value="--prefix=${basedir}"/>
     1096      <arg value="--libdir=${lib.jni}"/>
     1097    </exec>         
     1098  </target>
    9581099
    9591100  <target name="clean-packages" depends="init,clean-javagdbm,clean-indexers" description="Clean only the packages"/>
     
    9721113    </exec>
    9731114    <exec executable="${indexers.home}/winMake.bat" os="${os.windows}"
    974        dir="${indexers.home}">
    975        <arg value="clean"/>
    976     </exec>
    977 
    978   </target>
    979    
    980     <target name="compile-packages" description="Compile only the source packages">
    981          
    982                 <!-- gdbm -->
    983                 <antcall target="compile-gdbm" />
    984 
    985         <!-- javagdbm -->
    986         <echo>compile javagdbm</echo>
    987         <exec executable="make" os="${os.unix}" dir="${javagdbm.home}"/>
    988         <exec executable="make" os="${os.unix}" dir="${javagdbm.home}">
    989             <arg value="install"/>
    990         </exec>
    991 
    992         <!-- windows: just the java stuff. -->
    993         <echo>Windows: compile javagdbm (java only)</echo>
    994         <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}" dir="${javagdbm.home}">
    995             <arg value="compile"/>
    996             <arg value="javaonly"/>
    997         </exec>
    998 
    999         <!-- install the jar file -->
    1000         <echo>Install the javagdbm jar file</echo>
    1001         <copy file="${javagdbm.home}/javagdbm.jar" todir="${lib.jni}"/>
    1002 
    1003         <!-- Indexers -->
    1004 
    1005         <!-- this may be in gs2build - we will be recompiling, but never mind -->
    1006         <echo>Indexers: make (from ${indexers.home})</echo>
    1007         <exec executable="make" os="${os.unix}" dir="${indexers.home}"/>
    1008         <echo>Indexers: make install</echo>
    1009         <exec executable="make" os="${os.unix}" dir="${indexers.home}">
    1010             <arg value="install"/>
    1011         </exec>
    1012 
    1013         <echo>Indexers: make</echo>
    1014         <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}">
    1015             <arg value="all"/>
    1016         </exec>
    1017         <echo>Indexers: make install</echo>
    1018         <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}">
    1019             <arg value="install"/>
    1020         </exec>
    1021 
    1022         <!-- install the jar and jni files -->
    1023         <echo>Install the indexers' jar and jni files</echo>
    1024         <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/>
    1025         <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/>
    1026         <copy file="${lucene.home}/LuceneWrapper.jar" todir="${web.lib}"/>
    1027         <antcall target="install-jni-files"/>
    1028     </target>
     1115      dir="${indexers.home}">
     1116      <arg value="clean"/>
     1117    </exec>
     1118
     1119  </target>
     1120  <target name="distclean-packages" depends="init,distclean-javagdbm,distclean-indexers" description="Distclean only the packages"/>
     1121
     1122  <target name="distclean-javagdbm" depends="init">
     1123    <exec executable="make" os="${os.unix}"
     1124      dir="${javagdbm.home}">
     1125      <arg value="distclean"/>
     1126    </exec>
     1127  </target>
     1128 
     1129  <target name="distclean-indexers" depends="init" if="independent-indexers">
     1130    <exec executable="make" os="${os.unix}"
     1131      dir="${indexers.home}">
     1132      <arg value="distclean"/>
     1133    </exec>
     1134    <exec executable="${indexers.home}/winMake.bat" os="${os.windows}"
     1135      dir="${indexers.home}">
     1136      <arg value="clean"/>
     1137    </exec>
     1138
     1139  </target>
     1140 
     1141  <target name="compile-packages" description="Compile only the source packages">
     1142   
     1143    <!-- javagdbm -->
     1144    <echo>compile javagdbm</echo>
     1145    <exec executable="make" os="${os.unix}" dir="${javagdbm.home}"/>
     1146    <exec executable="make" os="${os.unix}" dir="${javagdbm.home}">
     1147      <arg value="install"/>
     1148    </exec>
     1149
     1150    <!-- windows: just the java stuff. -->
     1151    <echo>Windows: compile javagdbm (java only)</echo>
     1152    <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}" dir="${javagdbm.home}">
     1153      <arg value="compile"/>
     1154      <arg value="javaonly"/>
     1155    </exec>
     1156
     1157    <!-- install the jar file -->
     1158    <echo>Install the javagdbm jar file</echo>
     1159    <copy file="${javagdbm.home}/javagdbm.jar" todir="${lib.jni}"/>
     1160
     1161    <!-- Indexers -->
     1162
     1163    <!-- this may be in gs2build - we will be recompiling, but never mind -->
     1164    <echo>Indexers: make (from ${indexers.home})</echo>
     1165    <exec executable="make" os="${os.unix}" dir="${indexers.home}"/>
     1166    <echo>Indexers: make install</echo>
     1167    <exec executable="make" os="${os.unix}" dir="${indexers.home}">
     1168      <arg value="install"/>
     1169    </exec>
     1170
     1171    <echo>Indexers: make</echo>
     1172    <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}">
     1173      <arg value="all"/>
     1174    </exec>
     1175    <echo>Indexers: make install</echo>
     1176    <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}">
     1177      <arg value="install"/>
     1178    </exec>
     1179
     1180    <!-- install the jar and jni files -->
     1181    <echo>Install the indexers' jar and jni files</echo>
     1182    <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/>
     1183    <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/>
     1184    <copy file="${lucene.home}/LuceneWrapper.jar" todir="${web.lib}"/>
     1185    <antcall target="install-jni-files"/>
     1186  </target>
    10291187
    10301188  <target name="install-jni-files" depends="init,install-jni-files-linux,install-jni-files-windows,install-jni-files-macos"/>
    10311189
    1032     <target name="install-jni-files-linux" depends="init" if="current.os.isunixnotmac">
     1190  <target name="install-jni-files-linux" depends="init" if="current.os.isunixnotmac">
    10331191    <copy file="${mg.home}/jni/libmgretrievejni.so" todir="${lib.jni}"/>
    10341192    <copy file="${mg.home}/jni/libmgsearchjni.so" todir="${lib.jni}"/>
    1035      <copy file="${mg.home}/jni/libmgpassjni.so" todir="${lib.jni}"/>
     1193    <copy file="${mg.home}/jni/libmgpassjni.so" todir="${lib.jni}"/>
    10361194    <copy file="${mgpp.home}/jni/libmgppretrievejni.so" todir="${lib.jni}"/>
    10371195    <copy file="${mgpp.home}/jni/libmgppsearchjni.so" todir="${lib.jni}"/>
    1038      <copy file="${mgpp.home}/jni/libmgpppassjni.so" todir="${lib.jni}"/>
    1039    </target>
    1040    <target name="install-jni-files-windows" depends="init" if="current.os.iswindows">
     1196    <copy file="${mgpp.home}/jni/libmgpppassjni.so" todir="${lib.jni}"/>
     1197  </target>
     1198  <target name="install-jni-files-windows" depends="init" if="current.os.iswindows">
    10411199    <copy file="${mg.home}/jni/mgretrievejni.dll" todir="${lib.jni}"/>
    10421200    <copy file="${mg.home}/jni/mgsearchjni.dll" todir="${lib.jni}"/>
    1043      <copy file="${mg.home}/jni/mgpassjni.dll" todir="${lib.jni}"/>
     1201    <copy file="${mg.home}/jni/mgpassjni.dll" todir="${lib.jni}"/>
    10441202    <copy file="${mgpp.home}/jni/mgppretrievejni.dll" todir="${lib.jni}"/>
    10451203    <copy file="${mgpp.home}/jni/mgppsearchjni.dll" todir="${lib.jni}"/>
    1046      <copy file="${mgpp.home}/jni/mgpppassjni.dll" todir="${lib.jni}"/>
    1047    </target>
    1048    <target name="install-jni-files-macos" depends="init" if="current.os.ismac">
     1204    <copy file="${mgpp.home}/jni/mgpppassjni.dll" todir="${lib.jni}"/>
     1205  </target>
     1206  <target name="install-jni-files-macos" depends="init" if="current.os.ismac">
    10491207    <copy file="${mg.home}/jni/libmgretrievejni.jnilib" todir="${lib.jni}"/>
    10501208    <copy file="${mg.home}/jni/libmgsearchjni.jnilib" todir="${lib.jni}"/>
    1051      <copy file="${mg.home}/jni/libmgpassjni.jnilib" todir="${lib.jni}"/>
     1209    <copy file="${mg.home}/jni/libmgpassjni.jnilib" todir="${lib.jni}"/>
    10521210    <copy file="${mgpp.home}/jni/libmgppretrievejni.jnilib" todir="${lib.jni}"/>
    10531211    <copy file="${mgpp.home}/jni/libmgppsearchjni.jnilib" todir="${lib.jni}"/>
    1054      <copy file="${mgpp.home}/jni/libmgpppassjni.jnilib" todir="${lib.jni}"/>
    1055    </target>
    1056  
     1212    <copy file="${mgpp.home}/jni/libmgpppassjni.jnilib" todir="${lib.jni}"/>
     1213  </target>
     1214  
    10571215  <!-- ================== gs2building targets ===============-->
    10581216
     
    10621220    description="Update only the Greenstone 2 building components"/>
    10631221
    1064   <target name="svnupdate-gs2building" if="collection.building.enabled" depends="init,svnupdate-gs2build,svnupdate-gli" unless="nocvs.mode">
    1065   </target>
    1066   <target name="svnupdate-gs2build" if="collection.building.enabled" depends="init" unless="nocvs.mode">
    1067     <!-- Note: can't do a -d update here cos it will get all of gsdl
    1068      also, an update doesn't get new files, so we do a checkout instead. -->
    1069         <antcall target="checkout-gs2build"/>
    1070   </target>
    1071  
    1072   <target name="svnupdate-gli" if="collection.building.enabled" depends="init" unless="nocvs.mode">
     1222  <target name="svnupdate-gs2building" if="collection.building.enabled" depends="init,svnupdate-gs2build,svnupdate-gli" unless="nosvn.mode">
     1223  </target>
     1224
     1225  <target name="svnupdate-gs2build" if="collection.building.enabled" depends="init" unless="nosvn.mode">
     1226    <!-- please keep this function in sync with checkout-gs2build -->
     1227
     1228    <echo>updating gs2build</echo>
     1229    <!-- svn updates -->
    10731230    <svn>
    1074         <update dir="${gli.home}"/>
    1075     </svn>
     1231      <!-- perllib -->
     1232      <update dir="gs2build/perllib" revision="${branch.revision}"/>
     1233
     1234      <!-- selected packages -->
     1235      <update dir="gs2build/packages/cpan" revision="${branch.revision}" />
     1236      <update dir="gs2build/packages/expat" revision="${branch.revision}" />
     1237      <update dir="gs2build/packages/html-tidy" revision="${branch.revision}" />
     1238      <update dir="gs2build/packages/isis-gdl" revision="${branch.revision}" />
     1239      <update dir="gs2build/packages/kea" revision="${branch.revision}" />
     1240      <update dir="gs2build/packages/pdftohtml" revision="${branch.revision}" />
     1241      <update dir="gs2build/packages/rtftohtml" revision="${branch.revision}" />
     1242      <update dir="gs2build/packages/w3mir" revision="${branch.revision}" />
     1243      <update dir="gs2build/packages/wget" revision="${branch.revision}" />
     1244      <update dir="gs2build/packages/windows" revision="${branch.revision}" />
     1245      <update dir="gs2build/packages/wv" revision="${branch.revision}" />
     1246      <update dir="gs2build/packages/xlhtml" revision="${branch.revision}" />
     1247      <update dir="gs2build/packages/yaz" revision="${branch.revision}" />
     1248     
     1249      <!-- some of src (db2txt hashfile phind txt2db) -->
     1250      <update dir="gs2build/src/db2txt" revision="${branch.revision}" />
     1251      <update dir="gs2build/src/hashfile" revision="${branch.revision}" />
     1252      <update dir="gs2build/src/phind" revision="${branch.revision}" />
     1253      <update dir="gs2build/src/txt2db" revision="${branch.revision}" />
     1254
     1255      <!-- bin -->
     1256      <update dir="gs2build/bin/script" revision="${branch.revision}" />
     1257
     1258      <!-- mappings -->
     1259      <update dir="gs2build/mappings" revision="${branch.revision}"/>
     1260
     1261      <!-- etc/packages -->
     1262      <update dir="gs2build/etc/packages" revision="${branch.revision}"/>
     1263     
     1264      <!-- collect -->
     1265      <update dir="gs2build/collect/modelcol" revision="${branch.revision}"/>
     1266
     1267      <!-- gs2build-extra -->
     1268      <update dir="gs2build/gs2build-extra" revision="${branch.revision}"/>
     1269
     1270      <!-- indexers -->
     1271      <update dir="gs2build/indexers" revision="${branch.revision}"/>
     1272
     1273      <!-- single files -->
     1274     
     1275      <!-- some files from lib -->
     1276      <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/text_t.h" destPath="gs2build/lib/text_t.h"/>
     1277      <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/text_t.cpp" destPath="gs2build/lib/text_t.cpp"/>
     1278      <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/gsdlconf.h" destPath="gs2build/lib/gsdlconf.h"/>
     1279
     1280      <!-- some files from etc -->
     1281      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/marctodc.txt" destPath="gs2build/etc/marctodc.txt"/>
     1282      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc-mapping.xml" destPath="gs2build/etc/dc2marc-mapping.xml"/>
     1283      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc.xsl" destPath="gs2build/etc/dc2marc.xsl"/>
     1284      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/qdc2marc-mapping.xml" destPath="gs2build/etc/qdc2marc-mapping.xml"/>
     1285
     1286      <!-- some files from the gsdl root directory -->
     1287      <export srcUrl="${svn.root}/gsdl/${branch.path}/setup.bash" destPath="gs2build/setup.bash"/>
     1288      <export srcUrl="${svn.root}/gsdl/${branch.path}/config.sub" destPath="gs2build/config.sub"/>
     1289      <export srcUrl="${svn.root}/gsdl/${branch.path}/config.guess" destPath="gs2build/config.guess"/>
     1290      <export srcUrl="${svn.root}/gsdl/${branch.path}/config.h.in" destPath="gs2build/config.h.in"/>
     1291      <export srcUrl="${svn.root}/gsdl/${branch.path}/configtest.pl" destPath="gs2build/configtest.pl"/>
     1292      <export srcUrl="${svn.root}/gsdl/${branch.path}/install-sh" destPath="gs2build/install-sh"/>
     1293      <export srcUrl="${svn.root}/gsdl/${branch.path}/acconfig.h" destPath="gs2build/acconfig.h"/>
     1294      <export srcUrl="${svn.root}/gsdl/${branch.path}/aclocal.m4" destPath="gs2build/aclocal.m4"/>
     1295      <export srcUrl="${svn.root}/gsdl/${branch.path}/WIN32cfg.h" destPath="gs2build/WIN32cfg.h"/>
     1296    </svn>
     1297  </target>
     1298 
     1299  <target name="svnupdate-gli" if="collection.building.enabled" depends="init" unless="nosvn.mode">
     1300    <svn>
     1301      <update dir="${gli.home}" revision="${branch.revision}"/>
     1302    </svn>
    10761303  </target>
    10771304
    10781305  <target name="prepare-gs2building" depends="init,prepare-gs2build,prepare-gli" if="collection.building.enabled">
    10791306  </target>
    1080 
    1081   <target name="checkout-gs2build" depends="init" if="collection.building.enabled" unless="nocvs.mode">
     1307  <target name="checkout-gs2build" depends="init" if="collection.building.enabled" unless="nosvn.mode">
     1308    <!-- please keep this function in sync with update-gs2build -->
    10821309    <echo>checking out gs2build</echo>
    1083         <!-- svn checkouts -->
    1084         <svn>
    1085             <!-- perllib -->
    1086             <checkout url="${svn.root}/gsdl/${branch.path}/perllib" destPath="gs2build/perllib"/>
    1087 
    1088             <!-- selected packages -->
    1089             <checkout url="${svn.root}/gsdl/${branch.path}/packages/cpan" destPath="gs2build/packages/cpan"/>
    1090             <checkout url="${svn.root}/gsdl/${branch.path}/packages/expat" destPath="gs2build/packages/expat"/>
    1091             <checkout url="${svn.root}/gsdl/${branch.path}/packages/html-tidy" destPath="gs2build/packages/html-tidy"/>
    1092             <checkout url="${svn.root}/gsdl/${branch.path}/packages/isis-gdl" destPath="gs2build/packages/isis-gdl"/>
    1093             <checkout url="${svn.root}/gsdl/${branch.path}/packages/kea" destPath="gs2build/packages/kea"/>
    1094             <checkout url="${svn.root}/gsdl/${branch.path}/packages/pdftohtml" destPath="gs2build/packages/pdftohtml"/>
    1095             <checkout url="${svn.root}/gsdl/${branch.path}/packages/rtftohtml" destPath="gs2build/packages/rtftohtml"/>
    1096             <checkout url="${svn.root}/gsdl/${branch.path}/packages/w3mir" destPath="gs2build/packages/w3mir"/>
    1097             <checkout url="${svn.root}/gsdl/${branch.path}/packages/wget" destPath="gs2build/packages/wget"/>
    1098             <checkout url="${svn.root}/gsdl/${branch.path}/packages/windows" destPath="gs2build/packages/windows"/>
    1099             <checkout url="${svn.root}/gsdl/${branch.path}/packages/wv" destPath="gs2build/packages/wv"/>
    1100             <checkout url="${svn.root}/gsdl/${branch.path}/packages/xlhtml" destPath="gs2build/packages/xlhtml"/>
    1101             <checkout url="${svn.root}/gsdl/${branch.path}/packages/yaz" destPath="gs2build/packages/yaz"/>
    1102            
    1103             <!-- some of src (db2txt hashfile phind txt2db) -->
    1104             <checkout url="${svn.root}/gsdl/${branch.path}/src/db2txt" destPath="gs2build/src/db2txt"/>
    1105             <checkout url="${svn.root}/gsdl/${branch.path}/src/hashfile" destPath="gs2build/src/hashfile"/>
    1106             <checkout url="${svn.root}/gsdl/${branch.path}/src/phind" destPath="gs2build/src/phind"/>
    1107             <checkout url="${svn.root}/gsdl/${branch.path}/src/txt2db" destPath="gs2build/src/txt2db"/>
    1108 
    1109             <!-- bin -->
    1110             <checkout url="${svn.root}/gsdl/${branch.path}/bin/script" destPath="gs2build/bin/script"/>
    1111 
    1112             <!-- mappings -->
    1113             <checkout url="${svn.root}/gsdl/${branch.path}/mappings" destPath="gs2build/mappings"/>
    1114 
    1115             <!-- etc/packages -->
    1116             <checkout url="${svn.root}/gsdl/${branch.path}/etc/packages" destPath="gs2build/etc/packages"/>
    1117    
    1118             <!-- collect -->
    1119             <checkout url="${svn.root}/gsdl/${branch.path}/collect/modelcol" destPath="gs2build/collect/modelcol"/>
    1120 
    1121             <!-- gs2build-extra -->
    1122             <checkout url="${svn.root}/other-projects/trunk/gs2build-extra" destPath="gs2build/gs2build-extra"/>
    1123 
    1124             <!-- indexers -->
    1125             <checkout url="${svn.root}/indexers/${branch.path}" destPath="gs2build/indexers"/>
    1126 
    1127 
    1128         </svn>
    1129         <!-- regular downloads -->
    1130 
    1131         <!-- some files from lib -->
    1132         <mkdir dir="gs2build/lib"/>
    1133         <get src="${svn.root}/gsdl/${branch.path}/lib/text_t.h" dest="gs2build/lib/text_t.h"/>
    1134         <get src="${svn.root}/gsdl/${branch.path}/lib/text_t.cpp" dest="gs2build/lib/text_t.cpp"/>
    1135         <get src="${svn.root}/gsdl/${branch.path}/lib/gsdlconf.h" dest="gs2build/lib/gsdlconf.h"/>
    1136 
    1137         <!-- some files from etc -->
    1138         <get src="${svn.root}/gsdl/${branch.path}/etc/marctodc.txt" dest="gs2build/etc/marctodc.txt"/>
    1139         <get src="${svn.root}/gsdl/${branch.path}/etc/dc2marc-mapping.xml" dest="gs2build/etc/dc2marc-mapping.xml"/>
    1140         <get src="${svn.root}/gsdl/${branch.path}/etc/dc2marc.xsl" dest="gs2build/etc/dc2marc.xsl"/>
    1141         <get src="${svn.root}/gsdl/${branch.path}/etc/qdc2marc-mapping.xml" dest="gs2build/etc/qdc2marc-mapping.xml"/>
    1142 
    1143         <!-- some files from the gsdl root directory -->
    1144         <get src="${svn.root}/gsdl/${branch.path}/setup.bash" dest="gs2build/setup.bash"/>
    1145         <get src="${svn.root}/gsdl/${branch.path}/config.sub" dest="gs2build/config.sub"/>
    1146         <get src="${svn.root}/gsdl/${branch.path}/config.guess" dest="gs2build/config.guess"/>
    1147         <get src="${svn.root}/gsdl/${branch.path}/config.h.in" dest="gs2build/config.h.in"/>
    1148         <get src="${svn.root}/gsdl/${branch.path}/configtest.pl" dest="gs2build/configtest.pl"/>
    1149         <get src="${svn.root}/gsdl/${branch.path}/install-sh" dest="gs2build/install-sh"/>
    1150         <get src="${svn.root}/gsdl/${branch.path}/acconfig.h" dest="gs2build/acconfig.h"/>
    1151         <get src="${svn.root}/gsdl/${branch.path}/aclocal.m4" dest="gs2build/aclocal.m4"/>
    1152         <get src="${svn.root}/gsdl/${branch.path}/WIN32cfg.h" dest="gs2build/WIN32cfg.h"/>
    1153 
    1154     </target>
     1310
     1311    <!-- this has to be created first to avoid errors when trying to export to it later -->
     1312    <mkdir dir="${basedir}/gs2build/lib"/>
     1313
     1314    <!-- svn checkouts -->
     1315    <svn>
     1316      <!-- perllib -->
     1317      <checkout url="${svn.root}/gsdl/${branch.path}/perllib" destPath="gs2build/perllib" revision="${branch.revision}"/>
     1318
     1319      <!-- selected packages -->
     1320      <checkout url="${svn.root}/gsdl/${branch.path}/packages/cpan" destPath="gs2build/packages/cpan" revision="${branch.revision}" />
     1321      <checkout url="${svn.root}/gsdl/${branch.path}/packages/expat" destPath="gs2build/packages/expat" revision="${branch.revision}" />
     1322      <checkout url="${svn.root}/gsdl/${branch.path}/packages/html-tidy" destPath="gs2build/packages/html-tidy" revision="${branch.revision}" />
     1323      <checkout url="${svn.root}/gsdl/${branch.path}/packages/isis-gdl" destPath="gs2build/packages/isis-gdl" revision="${branch.revision}" />
     1324      <checkout url="${svn.root}/gsdl/${branch.path}/packages/kea" destPath="gs2build/packages/kea" revision="${branch.revision}" />
     1325      <checkout url="${svn.root}/gsdl/${branch.path}/packages/pdftohtml" destPath="gs2build/packages/pdftohtml" revision="${branch.revision}" />
     1326      <checkout url="${svn.root}/gsdl/${branch.path}/packages/rtftohtml" destPath="gs2build/packages/rtftohtml" revision="${branch.revision}" />
     1327      <checkout url="${svn.root}/gsdl/${branch.path}/packages/w3mir" destPath="gs2build/packages/w3mir" revision="${branch.revision}" />
     1328      <checkout url="${svn.root}/gsdl/${branch.path}/packages/wget" destPath="gs2build/packages/wget" revision="${branch.revision}" />
     1329      <checkout url="${svn.root}/gsdl/${branch.path}/packages/windows" destPath="gs2build/packages/windows" revision="${branch.revision}" />
     1330      <checkout url="${svn.root}/gsdl/${branch.path}/packages/wv" destPath="gs2build/packages/wv" revision="${branch.revision}" />
     1331      <checkout url="${svn.root}/gsdl/${branch.path}/packages/xlhtml" destPath="gs2build/packages/xlhtml" revision="${branch.revision}" />
     1332      <checkout url="${svn.root}/gsdl/${branch.path}/packages/yaz" destPath="gs2build/packages/yaz" revision="${branch.revision}" />
     1333     
     1334      <!-- some of src (db2txt hashfile phind txt2db) -->
     1335      <checkout url="${svn.root}/gsdl/${branch.path}/src/db2txt" destPath="gs2build/src/db2txt" revision="${branch.revision}" />
     1336      <checkout url="${svn.root}/gsdl/${branch.path}/src/hashfile" destPath="gs2build/src/hashfile" revision="${branch.revision}" />
     1337      <checkout url="${svn.root}/gsdl/${branch.path}/src/phind" destPath="gs2build/src/phind" revision="${branch.revision}" />
     1338      <checkout url="${svn.root}/gsdl/${branch.path}/src/txt2db" destPath="gs2build/src/txt2db" revision="${branch.revision}" />
     1339
     1340      <!-- bin -->
     1341      <checkout url="${svn.root}/gsdl/${branch.path}/bin/script" destPath="gs2build/bin/script" revision="${branch.revision}" />
     1342
     1343      <!-- mappings -->
     1344      <checkout url="${svn.root}/gsdl/${branch.path}/mappings" destPath="gs2build/mappings" revision="${branch.revision}"/>
     1345
     1346      <!-- etc/packages -->
     1347      <checkout url="${svn.root}/gsdl/${branch.path}/etc/packages" destPath="gs2build/etc/packages" revision="${branch.revision}"/>
     1348     
     1349      <!-- collect -->
     1350      <checkout url="${svn.root}/gsdl/${branch.path}/collect/modelcol" destPath="gs2build/collect/modelcol" revision="${branch.revision}"/>
     1351
     1352      <!-- gs2build-extra -->
     1353      <checkout url="${svn.root}/other-projects/trunk/gs2build-extra" destPath="gs2build/gs2build-extra" revision="${branch.revision}"/>
     1354
     1355      <!-- indexers -->
     1356      <checkout url="${svn.root}/indexers/${branch.path}" destPath="gs2build/indexers" revision="${branch.revision}"/>
     1357
     1358      <!-- single files -->
     1359     
     1360      <!-- some files from lib -->
     1361      <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/text_t.h" destPath="gs2build/lib/text_t.h"/>
     1362      <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/text_t.cpp" destPath="gs2build/lib/text_t.cpp"/>
     1363      <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/gsdlconf.h" destPath="gs2build/lib/gsdlconf.h"/>
     1364
     1365      <!-- some files from etc -->
     1366      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/marctodc.txt" destPath="gs2build/etc/marctodc.txt"/>
     1367      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc-mapping.xml" destPath="gs2build/etc/dc2marc-mapping.xml"/>
     1368      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc.xsl" destPath="gs2build/etc/dc2marc.xsl"/>
     1369      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/qdc2marc-mapping.xml" destPath="gs2build/etc/qdc2marc-mapping.xml"/>
     1370
     1371      <!-- some files from the gsdl root directory -->
     1372      <export srcUrl="${svn.root}/gsdl/${branch.path}/setup.bash" destPath="gs2build/setup.bash"/>
     1373      <export srcUrl="${svn.root}/gsdl/${branch.path}/config.sub" destPath="gs2build/config.sub"/>
     1374      <export srcUrl="${svn.root}/gsdl/${branch.path}/config.guess" destPath="gs2build/config.guess"/>
     1375      <export srcUrl="${svn.root}/gsdl/${branch.path}/config.h.in" destPath="gs2build/config.h.in"/>
     1376      <export srcUrl="${svn.root}/gsdl/${branch.path}/configtest.pl" destPath="gs2build/configtest.pl"/>
     1377      <export srcUrl="${svn.root}/gsdl/${branch.path}/install-sh" destPath="gs2build/install-sh"/>
     1378      <export srcUrl="${svn.root}/gsdl/${branch.path}/acconfig.h" destPath="gs2build/acconfig.h"/>
     1379      <export srcUrl="${svn.root}/gsdl/${branch.path}/aclocal.m4" destPath="gs2build/aclocal.m4"/>
     1380      <export srcUrl="${svn.root}/gsdl/${branch.path}/WIN32cfg.h" destPath="gs2build/WIN32cfg.h"/>
     1381    </svn>
     1382  </target>
    11551383
    11561384  <target name="prepare-gs2build" depends="init" if="collection.building.enabled" unless="gs2build.present">
     
    11651393
    11661394  <target name="checkout-winbin" depends="init" if="current.os.iswindows"
    1167     unless="nocvs.mode">
     1395    unless="nosvn.mode">
    11681396    <svn>
    1169         <checkout url="${svn.root}/other-projects/trunk/winbin" destPath="${basedir}/winbin"/>
    1170     </svn> 
    1171   </target>
    1172 
    1173   <target name="update-winbin" depends="init" if="current.os.iswindows" unless="nocvs.mode">
    1174         <svn>
    1175             <update dir="winbin"/>
    1176         </svn> 
    1177     </target>
     1397      <checkout url="${svn.root}/other-projects/trunk/winbin" destPath="${basedir}/winbin" revision="${branch.revision}"/>
     1398    </svn> 
     1399  </target>
     1400
     1401  <target name="update-winbin" depends="init" if="current.os.iswindows" unless="nosvn.mode">
     1402    <svn>
     1403      <update dir="winbin"/>
     1404    </svn> 
     1405  </target>
    11781406 
    11791407  <target name="get-windows-binaries" depends="init" if="collection.building.enabled.windows">
     
    11881416  <target name="unzip-windows-packages" depends="init" if="collection.building.enabled.windows"> 
    11891417    <unzip src="${gs2build.home}/packages/windows/gdbm/gdbm.zip"
    1190     dest="${gs2build.home}/packages/windows/gdbm"/>
    1191    <unzip src="${gs2build.home}/packages/windows/crypt/crypt.zip"
    1192     dest="${gs2build.home}/packages/windows/crypt"/>
    1193        <unzip src="${gs2build.home}/packages/windows/expat/expat.zip"
    1194     dest="${gs2build.home}/packages/windows/expat"/>
    1195    </target>
     1418      dest="${gs2build.home}/packages/windows/gdbm"/>
     1419    <unzip src="${gs2build.home}/packages/windows/crypt/crypt.zip"
     1420      dest="${gs2build.home}/packages/windows/crypt"/>
     1421    <unzip src="${gs2build.home}/packages/windows/expat/expat.zip"
     1422      dest="${gs2build.home}/packages/windows/expat"/>
     1423  </target>
    11961424 
    11971425  <!-- downloads a good XML-Parser -->
    11981426  <target name="get-macos-extra" depends="init" if="need.macos.extra"> 
    1199       <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz"
     1427    <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz"
    12001428      dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"
    12011429      usetimestamp="true"/>
     
    12321460      <filterset>
    12331461    <filter token="gsdlhome" value="${gs2build.home.windows}"/>
    1234      </filterset>
     1462      </filterset>
    12351463    </move> 
    12361464    <move file="${gs2build.home}/setup-tmp.bat" tofile="${gs2build.home}/setup.bat" />
     
    12601488  </target>
    12611489 
    1262 <!--  <target name="checkout-gli" depends="check-cvsroot,init" if="collection.building.enabled" unless="nocvs.mode"> -->
    1263   <target name="checkout-gli" depends="init" if="collection.building.enabled" unless="nocvs.mode">
     1490  <target name="checkout-gli" depends="init" if="collection.building.enabled" unless="nosvn.mode">
    12641491    <echo>checking out gli</echo>
    12651492    <svn>
    1266         <checkout url="${svn.root}/gli/${branch.path}" destPath="gli"/>
    1267     </svn>
    1268   </target>
    1269    
     1493      <checkout url="${svn.root}/gli/${branch.path}" destPath="gli" revision="${branch.revision}"/>
     1494    </svn>
     1495  </target>
     1496 
    12701497  <target name="configure-gs2building" depends="init" if="collection.building.enabled"
    12711498    description="Configure only the Greenstone 2 building components">
     
    13061533    <exec executable="${compile.windows.c++.setup}" os="${os.windows}" />
    13071534    <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}" >
    1308      <arg value="/f"/>
    1309      <arg value="win32.mak"/>
    1310      <arg value="clean"/>
    1311     </exec>
    1312   </target>
    1313  
     1535      <arg value="/f"/>
     1536      <arg value="win32.mak"/>
     1537      <arg value="clean"/>
     1538    </exec>
     1539  </target>
     1540 
     1541  <target name="distclean-gs2building" depends="init,clean-gli,clean-gs2build,distclean-gs2build"
     1542    description="Distclean only the Greenstone 2 building components"
     1543    if="collection.building.enabled"/>
     1544
    13141545  <target name="distclean-gs2build" depends="init" if="collection.building.enabled">
    1315     <!-- gs2build -->
    1316     <!--linux:  -->
    13171546    <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
    13181547      <arg value="distclean"/>
    13191548    </exec>
    1320     <!-- windows: -->   
    13211549  </target>
    13221550 
     
    13291557    <property name="gli.home" value="${basedir}/gli"/>
    13301558
    1331         <!-- change the version number -->
    1332         <rsr file="${gli.home}/src/org/greenstone/gatherer/Gatherer.java" pattern="^(.*)String\s*PROGRAM_VERSION\s*=\s*&quot;(.*)&quot;" replacement="$1String PROGRAM_VERSION = &quot;${app.version}&quot;"/>
     1559    <!-- change the version number -->
     1560    <rsr file="${gli.home}/src/org/greenstone/gatherer/Gatherer.java" pattern="^(.*)String\s*PROGRAM_VERSION\s*=\s*&quot;(.*)&quot;" replacement="$1String PROGRAM_VERSION = &quot;${app.version}&quot;"/>
    13331561    <!-- linux -->
    13341562    <exec executable="makegli.sh" os="${os.unix}" dir="${gli.home}" resolveExecutable="true"/>
    1335      <!--remote gli-->
    1336      <exec executable="makejar.sh" os="${os.unix}" dir="${gli.home}"
     1563    <!--remote gli-->
     1564    <exec executable="makejar.sh" os="${os.unix}" dir="${gli.home}"
    13371565      resolveExecutable="true"/>
    13381566    <!-- windows -->
    13391567    <exec executable="makegli.bat" os="${os.windows}" dir="${gli.home}" resolveExecutable="true"/>
    13401568    <!--remote gli-->
    1341      <exec executable="makejar.bat" os="${os.windows}" dir="${gli.home}"
     1569    <exec executable="makejar.bat" os="${os.windows}" dir="${gli.home}"
    13421570      resolveExecutable="true"/>
    1343      <copy file="${gli.home}/GLIServer.jar" todir="${gs2build.home}/bin/java" />
     1571    <copy file="${gli.home}/GLIServer.jar" todir="${gs2build.home}/bin/java" />
    13441572  </target>
    13451573 
     
    13551583    <exec executable="${compile.windows.c++.setup}" os="${os.windows}"/>
    13561584    <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}">
    1357      <arg value="/f"/>
    1358      <arg value="win32.mak"/>
     1585      <arg value="/f"/>
     1586      <arg value="win32.mak"/>
    13591587    </exec>
    13601588    <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}">
    1361      <arg value="/f"/>
    1362      <arg value="win32.mak"/>
    1363      <arg value="install"/>
     1589      <arg value="/f"/>
     1590      <arg value="win32.mak"/>
     1591      <arg value="install"/>
    13641592    </exec>
    13651593    <!-- LuceneWrapper jar file not installed by default -->
     
    13951623    </echo>
    13961624  </target>
    1397  
    1398 
    1399 <!-- ======================== TESTING Targets ========================= -->
     1625  
     1626
     1627  <!-- ======================== TESTING Targets ========================= -->
    14001628 
    14011629  <target name="test" description="Run the (incomplete) JUnit test suite "
     
    14201648    <echo>
    14211649      *********************************************
    1422        Test output can be found in directory 'test'
     1650      Test output can be found in directory 'test'
    14231651      *********************************************
    14241652    </echo>
    14251653  </target>
    1426   <target name="checkout-flax" description="check out flax source code from another repository">
     1654
     1655  <!-- ======================== FLAX Targets ========================= -->
     1656  <target name="prepare-flax" description="check out flax source code from another repository" if="install.flax">
    14271657    <echo>checking out flax ...</echo>
    14281658    <mkdir dir="${basedir}/src/java/org/flax"/>
    14291659    <mkdir dir="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
    1430     <mkdir dir="${basedir}/web/WEB-INF/classes/flax"/>
    1431     <mkdir dir="${basedir}/web/interfaces/flax"/>
    1432     <mkdir dir="${basedir}/web/sites/flax"/>
     1660    <mkdir dir="${web.home}/WEB-INF/classes/flax"/>
     1661    <mkdir dir="${web.home}/interfaces/flax"/>
     1662    <mkdir dir="${web.home}/sites/flax"/>
     1663    <mkdir dir="${basedir}/flax-resources"/>
     1664    <mkdir dir="${basedir}/flax-lib"/>
    14331665    <svn>
    14341666      <checkout url="${flax.svn.root}/flax1.0/trunk/src/java/org/flax/" 
    1435                 destPath="${basedir}/src/java/org/flax"/>
     1667    destPath="${basedir}/src/java/org/flax"/>
    14361668      <checkout url="${flax.svn.root}/flax1.0/trunk/src/java/org/greenstone/gsdl3/flax/"
    1437                 destPath="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
     1669    destPath="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
    14381670      <checkout url="${flax.svn.root}/flax1.0/trunk/web/WEB-INF/classes/flax/"
    1439                 destPath="${basedir}/web/WEB-INF/classes/flax"/>
     1671    destPath="${web.home}/WEB-INF/classes/flax"/>
    14401672      <checkout url="${flax.svn.root}/flax1.0/trunk/web/interfaces/flax/"
    1441                 destPath="${basedir}/web/interfaces/flax"/>
     1673    destPath="${web.home}/interfaces/flax"/>
    14421674      <checkout url="${flax.svn.root}/flax1.0/trunk/web/sites/flax/"
    1443                 destPath="${basedir}/web/sites/flax"/>
     1675    destPath="${web.home}/sites/flax"/>
    14441676      <checkout url="${flax.svn.root}/flax1.0/trunk/flax-resources"
    1445                 destPath="${basedir}"/>
     1677    destPath="${basedir}/flax-resources"/>
     1678      <checkout url="${flax.svn.root}/flax1.0/trunk/lib"
     1679    destPath="${basedir}/flax-lib"/>
    14461680    </svn>
    1447     <move file="${basedir}/web/WEB-INF/web.xml" tofile="${basedir}/web/WEB-INF/web.xml.greenstone3backup"/>
    1448     <svncall target="flax-copy-files" />
    1449 
    1450     <property name="coll.dir" value="${basedir}/web/sites/flax/collect"/>
     1681    <echo>prepare flax files...</echo>
     1682    <move file="${web.home}/WEB-INF/web.xml" tofile="${web.home}/WEB-INF/web.xml.greenstone3backup"/>
     1683    <antcall target="flax-copy-files" />
     1684    <antcall target="unzip-flax-collections" />
     1685    <antcall target="unzip-flax-resources" />
     1686  </target>
     1687
     1688  <target name="update-flax" description="update flax from repository">
     1689    <echo>updating flax ...</echo>
     1690    <svn>
     1691      <update dir="${basedir}/src/java/org/flax"/>
     1692      <update dir="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
     1693      <update dir="${web.home}/WEB-INF/classes/flax"/>
     1694      <update dir="${web.home}/interfaces/flax"/>
     1695      <update dir="${web.home}/sites/flax"/>
     1696    </svn>
     1697    <antcall target="flax-copy-files" />
     1698    <antcall target="unzip-flax-collections" />       
     1699  </target>
     1700
     1701  <target name="unzip-flax-collections" >
     1702    <property name="coll.dir" value="${web.home}/sites/flax/collect"/>
    14511703    <unzip dest="${coll.dir}"> 
    1452        <fileset dir="${coll.dir}">
    1453           <include name="*.zip"/>
    1454        </fileset>   
     1704      <fileset dir="${coll.dir}">
     1705    <include name="*.zip"/>
     1706      </fileset>   
    14551707    </unzip>   
    14561708    <delete>
    1457      <fileset dir="${coll.dir}" includes="*.zip"/>
     1709      <fileset dir="${coll.dir}" includes="*.zip"/>
    14581710    </delete>
    14591711  </target>
    1460     <target name="update-flax" description="update flax from repository">
    1461       <echo>updating flax ...</echo>
    1462       <svn>
    1463         <update dir="${basedir}/src/java/org/flax"/>
    1464         <update dir="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
    1465         <update dir="${basedir}/web/WEB-INF/classes/flax"/>
    1466         <update dir="${basedir}/web/interfaces/flax"/>
    1467         <update dir="${basedir}/web/sites/flax"/>
    1468         <svncall target="flax-copy-files" />
    1469       </svn>
    1470     </target>
    1471     <target name="flax-copy-files" description="copy some flax files into the appropriate greenstone3 directories">
    1472       <echo>copying flax files ...</echo>
    1473       <copy file="${basedir}/web/WEB-INF/classes/flax/web.xml" todir="${basedir}/web/WEB-INF" overwrite="true" />
    1474       <!-- A configuration file containing web service binding information for the axis engine -->
    1475       <copy file="${basedir}/web/WEB-INF/classes/flax/server-config.wsdd" todir="${basedir}/web/WEB-INF" overwrite="true" />
    1476     </target>
    1477       <!--install gdbm stuff -->
    1478 
    1479   <!-- downloads the gdbm library -->
    1480   <target name="prepare-gdbm" depends="init" if="install.gdbm">
    1481       <get src="http://www.greenstone.org/gs3files/gdbm-1.8.3.tar.gz"
    1482        dest="${src.packages.home}/gdbm-1.8.3.tar.gz"  usetimestamp="true"/>
    1483       <untar compression= "gzip" src="${src.packages.home}/gdbm-1.8.3.tar.gz" dest="${src.packages.home}" /> 
    1484       <chmod dir="${src.packages.home}/gdbm-1.8.3" perm="ugo+wrx" includes="**" />
     1712
     1713  <target name="unzip-flax-resources" >
     1714    <property name="classes.dir" value="${web.home}/WEB-INF/classes/flax"/>
     1715    <unzip dest="${classes.dir}"> 
     1716      <fileset dir="${classes.dir}">
     1717    <include name="*.zip"/>
     1718      </fileset>   
     1719    </unzip>   
     1720    <delete>
     1721      <fileset dir="${classes.dir}" includes="*.zip"/>
     1722    </delete>
     1723  </target>
     1724 
     1725  <target name="flax-copy-files" description="copy some flax files into the appropriate greenstone3 directories">
     1726    <echo>copying flax files ...</echo>
     1727    <copy file="${web.home}/WEB-INF/classes/flax/web.xml" todir="${web.home}/WEB-INF" overwrite="true" />
     1728    <!-- A configuration file containing web service binding information for the axis engine -->
     1729    <copy file="${web.home}/WEB-INF/classes/flax/server-config.wsdd" todir="${web.home}/WEB-INF" overwrite="true" />
     1730    <copy file="${basedir}/flax-resources/flax-build.xml" todir="${basedir}" overwrite="true" />
     1731    <copy file="${basedir}/flax-lib/opennlp-tools-1.3.0.jar" todir="${web.home}/WEB-INF/lib" overwrite="true" />   
     1732  </target>
     1733
     1734
     1735  <!-- ======================== GDBM Targets ========================= -->
     1736
     1737  <target name="prepare-gdbm" depends="init" if="install.gdbm">
     1738    <get src="http://www.greenstone.org/gs3files/${gdbm.version}.tar.gz"
     1739      dest="${src.packages.home}/${gdbm.version}.tar.gz"  usetimestamp="true"/>
     1740    <untar compression= "gzip" src="${src.packages.home}/${gdbm.version}.tar.gz" dest="${src.packages.home}" /> 
     1741    <chmod dir="${src.packages.home}/${gdbm.version}" perm="ugo+wrx" includes="**" />
     1742    <antcall target="configure-gdbm" />
     1743    <antcall target="compile-gdbm" />
    14851744  </target> 
    14861745
    1487    <target name="configure-gdbm" if="install.gdbm">
     1746  <target name="configure-gdbm" if="install.gdbm">
    14881747    <echo>
    14891748      Configuring GDBM
     
    14931752      <arg value="--prefix=${gdbm.home}"/>
    14941753    </exec>   
    1495    </target>
    1496 
    1497  <target name="clean-gdbm" depends="init"  if="install.gdbm">   
     1754  </target>
     1755
     1756  <target name="clean-gdbm" depends="init"  if="install.gdbm">   
    14981757    <echo>clean GDBM</echo>
    1499     <exec executable="make" os="${os.unix},${os.mac}" dir="${gdbm.home}" >
    1500      <arg value="clean"/>
     1758    <exec executable="make" os="${os.unix}" dir="${gdbm.home}" >
     1759      <arg value="clean"/>
     1760    </exec>
     1761  </target>
     1762
     1763  <target name="distclean-gdbm" depends="init"  if="install.gdbm">   
     1764    <echo>distclean GDBM</echo>
     1765    <exec executable="make" os="${os.unix}" dir="${gdbm.home}" >
     1766      <arg value="distclean"/>
    15011767    </exec>
    15021768  </target>
     
    15041770  <target name="compile-gdbm" depends="init"  if="install.gdbm">   
    15051771    <echo>compile GDBM</echo>
    1506     <exec executable="make" os="${os.unix},${os.mac}" dir="${gdbm.home}"/>
    1507     <exec executable="make" os="${os.unix},${os.mac}" dir="${gdbm.home}">
     1772    <exec executable="make" os="${os.unix}" dir="${gdbm.home}"/>
     1773    <exec executable="make" os="${os.unix}" dir="${gdbm.home}">
    15081774      <arg value="install"/>
    15091775    </exec>
    15101776  </target>
    15111777
    1512 
    1513 
    15141778</project>
    15151779
Note: See TracChangeset for help on using the changeset viewer.