greenstone.org greenstone wiki greenstone trac planet greenstone

Changeset 15787

Show
Ignore:
Timestamp:
2008-05-29 13:29:54 (6 months ago)
Author:
oranfry
Message:

updating from trunk: brought in trunk changes from r15191 to r15785

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • greenstone3/branches/customizingGreenstone3/build.properties

    r15191 r15787  
    1111 
    1212## windows c++ compilation 
    13 compile.windows.c++.setup=C:/Program Files/Microsoft Visual Studio/VC98/Bin/VCVARS32.BAT 
     13# The following property does not help in build.xml.  
     14# The user needs to run Visual Studio's vcvars32.bat script from the 
     15# MSDOS prompt before compiling Greenstone3 (before "ant prepare install") 
     16#compile.windows.c++.setup=C:/Program Files/Microsoft Visual Studio/VC98/Bin/VCVARS32.BAT 
    1417 
    1518## Tomcat installation 
     
    4851proxy.password= 
    4952 
    50 ## Mac OS X specific stuff 
    51 # set the path to your GDBM here 
    52 #install.gdbm=true 
    53 #gdbm.installed.path=${gdbm.home} 
     53# Not all unix systems (for example MacOS) come with GDBM pre-installed 
     54# To keep things simple, instruct Greenstone3 to download a GDBM tar file 
     55# configure and install it. The location used by default is within the 
     56# Greenstone3 src/packages area 
     57install.gdbm=true 
     58gdbm.installed.path=${gdbm.home} 
    5459 
    5560##Flax stuff## 
    5661##uncomment if you want to install flax 
    5762#install.flax=true 
     63 
     64##Web services related constants## 
     65base.webservice.name=SOAPServer 
     66##listing and description of all the web services deployable on GS3## 
     67web.services.list=${base.webservice.name} for Greenstone3's core web services, QBR${base.webservice.name} for Query, Browse and Retrieve services 
  • greenstone3/branches/customizingGreenstone3/build.xml

    r15191 r15787  
    99<project name="greenstone3" default="usage" basedir="."> 
    1010 
    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   <!-- 
     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  
    52    
     50--> 
     51 
    5352  <!--the first two properties have to be put on the top to be used by build.properties--> 
    5453  <property name="src.packages.home" value="${basedir}/src/packages"/> 
     
    5958  <!-- get properties from the environment --> 
    6059  <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  
    6960  <property name="build.home" value="${basedir}/build"/> 
    7061  <property name="src.home" value="${basedir}/src/java"/> 
     
    8475  <!-- jni libraries and java wrappers go here --> 
    8576  <property name="lib.jni" value="${basedir}/lib/jni"/> 
    86    
     77     
    8778  <property name="javadocs" value="${basedir}/docs/javadoc"/> 
    8879 
     
    164155  </condition> 
    165156 
    166   <!-- where is search4j tool --> 
    167   <condition property="search4j.exec" value="bin/search4j.exe">  
    168     <isset property="current.os.iswindows"/> 
     157       <!-- where is search4j tool --> 
     158       <condition property="search4j.exec" value="bin/search4j.exe">  
     159               <isset property="current.os.iswindows"/> 
    169160  </condition> 
    170161  <property name="search4j.exec" value="bin/search4j"/> 
    171162 
    172    
     163     
    173164  <!-- ============= Base dirs for each package and component ============ --> 
    174165  <property name="src.applet.home" value="${src.home}/org/greenstone/applet"/> 
     
    178169  <property name="gli.home" value="${basedir}/gli"/> 
    179170  <property name="javagdbm.home" value="${src.packages.home}/javagdbm"/> 
    180    
     171  
    181172  <!--<property name="indexers.home" value="${basedir}/src/packages/indexers">--> 
    182173  <condition property="indexers.home" value="${basedir}/src/packages/indexers"> 
     
    193184  <property name="lucene.home" value="${indexers.home}/lucene-gs"/> 
    194185 
    195  
    196   <!--  ==================== Compilation Control Options ==================== --> 
    197  
    198   <!-- 
     186  
     187<!--  ==================== Compilation Control Options ==================== --> 
     188 
     189<!-- 
    199190 
    200191  These properties control option settings on the Javac compiler when it 
     
    207198  compile.optimize     Should compilation include the optimize option? 
    208199 
    209   --> 
     200--> 
    210201 
    211202  <property name="compile.debug"       value="true"/> 
     
    213204  <property name="compile.optimize"    value="true"/> 
    214205 
    215   <!-- 
     206<!-- 
    216207 
    217208  Rather than relying on the CLASSPATH environment variable, Ant includes 
     
    222213  that you explicitly added. 
    223214 
    224   --> 
     215--> 
    225216 
    226217  <path id="compile.classpath"> 
     
    238229    <!-- Include the axis jar files --> 
    239230    <!--<fileset dir="${basedir}/comms/soap/axis/lib"> 
    240     <include name="*.jar"/> 
    241   </fileset>--> 
     231      <include name="*.jar"/> 
     232    </fileset>--> 
    242233     
    243234    <!-- include the jar files from the source packages --> 
     
    286277    <echo>os.unix: ${os.unix}</echo> 
    287278  </target> 
    288   <!-- ==================== Primary and Global Targets ============================= --> 
     279<!-- ==================== Primary and Global Targets ============================= --> 
    289280 
    290281  <!-- add comments about using xxx-core, xxx-packages if only want certain parts?? --> 
     
    292283  <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" 
    293284    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."> 
    294     <!--  <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections" 
     285<!--  <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections" 
    295286    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.">--> 
    296287 
     
    304295    description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare install'."/> 
    305296   
    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."/>--> 
     297<!--  <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web" 
     298    description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>--> 
    308299  <target name="svnupdate" depends="init,svnupdate-packages,svnupdate-core,svnupdate-gs2building,svnupdate-web" 
    309300    description="Do a `svn update` for all sources. Doesn't recompile the code. You need to be online to run this."/> 
     
    316307    description="Configure the installation. Includes setting up config files. Should be re-run if you change the build.properties file."/> 
    317308 
    318   <target name="clean" depends="init,clean-packages,clean-core,clean-gs2building,clean-gdbm
     309  <target name="clean" depends="init,clean-packages,clean-core,clean-gs2building
    319310    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"/> 
    323311   
    324312  <target name="compile" depends="init,compile-web,compile-packages,compile-core,compile-gs2building" 
    325313    description="Compile all the source code, includes core, packages and gs2building if necessary. Copy jar files and executables to their correct places."/> 
    326    
     314     
    327315  <target name="update" depends="init,svnupdate,clean,configure,configure-c++,compile"  
    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'"/> 
     316    description="Update (thru Subversion) all the source (including core, packages and gs2building), then clean, configure and recompile."/> 
    329317 
    330318  <target name="start" depends="init,start-tomcat" 
    331319    description="Startup the Tomcat server." > 
    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 -->    
     320       <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo>  
     321       <echo>Tomcat:  ${catalina.home}</echo>  
     322       <echo>Java:    ${java.home}</echo> 
     323        <echo>URL:    http://${tomcat.server}:${tomcat.port}${app.path}/</echo> 
     324        <!-- assuming that index.html is not needed here -->    
    337325  </target> 
    338326 
     
    343331 
    344332 
    345   <!-- =========== Help targets ===================================  --> 
     333<!-- =========== Help targets ===================================  --> 
    346334   
    347335  <property name="install-command" value="ant [options] prepare install"/> 
     
    351339    <echo message="  Execute 'ant -help' for Ant help."/> 
    352340    <echo>To install Greenstone3, run '${install-command}'.  
    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. 
     341There 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. 
     342To log the output, use the '-logfile build.log' option. 
     343The README.txt file has more information about the ant targets and install process. 
    356344    </echo> 
    357345  </target> 
     
    363351  </target> 
    364352 
    365   <!-- ====== initialization and setup targets ================== --> 
     353<!-- ====== initialization and setup targets ================== --> 
    366354 
    367355  <target name="accept-properties" unless="properties.accepted"> 
    368356    <input addproperty="properties.ok" validargs="y,n">The following properties (among others) are being used from a build.properties file found in this directory: 
    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]? /> 
     357tomcat.server=${tomcat.server} 
     358tomcat.port=${tomcat.port}  
     359tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed) 
     360proxy.host=${proxy.host} 
     361proxy.port=${proxy.port} 
     362If these are not acceptable, please change them and rerun this target. Continue [y/n]? /> 
    375363    </input> 
    376364    <condition property="do.abort">  
     
    380368  </target> 
    381369 
     370<!--  <target name="check-cvsroot"> 
     371    <condition property="svnroot.notset"> 
     372      <or> 
     373                        <not> 
     374                          <isset property="env.CVSROOT"/> 
     375                        </not> 
     376                        <equals arg1="" arg2="${env.CVSROOT}"/> 
     377      </or> 
     378    </condition> 
     379    <fail if="cvsroot.notset" message="You need to set the CVSROOT variable"/> 
     380  </target> --> 
    382381 
    383382  <!-- this sets up some initial properties --> 
     
    406405    </condition> 
    407406     
    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? --> 
     407      <echo>tomcat.port = ${tomcat.port}</echo> 
     408      <echo>gli.present = ${gli.present}</echo>  
     409      <echo>gs2build.present = ${gs2build.present}</echo> 
     410     <!-- gsdl2.installed.path appears not to be set, so wrap in if block --> 
     411                <if> 
     412                        <bool><isset property="gsdl2.installed.path"/></bool> 
     413                        <echo>gsdl2.installed.path = ${gsdl2.installed.path}</echo> 
     414                </if> 
    413415 
    414416    <condition property="proxy.present"> 
     
    441443    <mysetproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/> 
    442444  </target> 
    443    
    444   <!-- ========== Web app Targets ================================ --> 
     445      
     446 <!-- ========== Web app Targets ================================ --> 
    445447   
    446448  <target name="prepare-web" depends="init,configure-java-version"> 
     
    453455    description="Activates or deactivates some jar libraries as needed depending on your java version"> 
    454456 
    455     <available property="have.xalan.jar" file="${web.lib}/xalan.jar"/> 
     457               <available property="have.xalan.jar" file="${web.lib}/xalan.jar"/> 
    456458    <condition property="need.xalan.jar"> 
    457       <or> 
    458         <equals arg1="1.5" arg2="${ant.java.version}"/> 
    459         <equals arg1="1.6" arg2="${ant.java.version}"/> 
    460       </or> 
    461     </condition> 
    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> 
     459                       <or> 
     460                               <equals arg1="1.5" arg2="${ant.java.version}"/> 
     461                               <equals arg1="1.6" arg2="${ant.java.version}"/> 
     462                       </or> 
     463               </condition> 
     464 
     465               <!-- if they have xalan.jar but dont need it --> 
     466               <if> 
     467                       <bool> 
     468                               <and> 
     469                                       <isset property="have.xalan.jar"/> 
     470                                       <not><isset property="need.xalan.jar"/></not> 
     471                               </and> 
     472                       </bool> 
     473                       <antcall target="deactivate-xalan-jar"/> 
     474               </if> 
     475 
     476               <!-- if they need xalan.jar but dont have it --> 
     477               <if> 
     478                       <bool> 
     479                               <and> 
     480                                       <not><isset property="have.xalan.jar"/></not> 
     481                                       <isset property="need.xalan.jar"/> 
     482                               </and> 
     483                       </bool> 
     484                       <antcall target="activate-xalan-jar"/> 
     485               </if> 
    484486 
    485487  </target> 
    486488   
    487489  <target name="activate-xalan-jar"> 
    488     <echo>activating xalan.jar</echo> 
     490               <echo>activating xalan.jar</echo> 
    489491    <copy file="${web.lib}/xalan.jar.tmp" tofile="${web.lib}/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 --> 
     492               <if><bool><isset property="current.os.ismac"/></bool> 
     493                       <copy file="${web.lib}/xalan.jar.tmp" tofile="${catalina.home}/common/endorsed/xalan.jar"/>  
     494               </if> 
     495  </target> 
     496 
     497       <!-- to delete --> 
    496498  <target name="copy-xalan-for-mac"></target> 
    497499 
    498500  <target name="deactivate-xalan-jar"> 
    499     <echo>deactivating xalan.jar</echo> 
     501               <echo>deactivating xalan.jar</echo> 
    500502    <delete file="${web.lib}/xalan.jar"/> 
    501503  </target> 
    502504 
    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 <!-- 
    612505  <target name="prepare-collections" depends="init"> 
    613506    <property name="collect.dir" value="${web.home}/sites/localsite/collect"/> 
    614     
     507    <!-- gs2mgdemo --> 
    615508    <unzip src="${collect.dir}/gs2mgdemo/import.zip"  
    616509      dest="${collect.dir}/gs2mgdemo"/> 
     
    622515    <delete file="${collect.dir}/gs2mgdemo/metadata.zip"/> 
    623516    <delete file="${collect.dir}/gs2mgdemo/index/index.zip"/> 
    624     
     517    <!-- gs2mgppdemo --> 
    625518    <unzip src="${collect.dir}/gs2mgppdemo/import.zip"  
    626519      dest="${collect.dir}/gs2mgppdemo"/> 
     
    632525    <delete file="${collect.dir}/gs2mgppdemo/metadata.zip"/> 
    633526    <delete file="${collect.dir}/gs2mgppdemo/index/index.zip"/> 
    634    
     527    <!-- gberg --> 
    635528    <unzip src="${collect.dir}/gberg/index/index.zip"  
    636529      dest="${collect.dir}/gberg/index"/> 
    637530    <delete file="${collect.dir}/gberg/index/index.zip"/> 
    638531  </target> 
    639 --> 
     532 
    640533   
    641534  <target name="configure-web" depends="init" 
     
    667560  </target> 
    668561 
    669   <target name="svnupdate-web" unless="nosvn.mode"> 
    670     <svn> 
    671       <update dir="${web.home}"/> 
    672     </svn> 
    673   </target> 
     562       <target name="svnupdate-web" unless="nosvn.mode"> 
     563               <svn> 
     564                       <update dir="${web.home}"/> 
     565               </svn> 
     566       </target> 
    674567 
    675568  <target name="update-web" depends="init,svnupdate-web,configure-web" 
     
    677570 
    678571 
    679   <!-- ======================= Tomcat Targets ========================== --> 
     572<!-- ======================= Tomcat Targets ========================== --> 
    680573   
    681574  <!-- this target downloads and installs Tomcat --> 
     
    685578    <!-- check that packages dir is there --> 
    686579    <mkdir dir="${packages.home}"/> 
    687     <get src="http://www.greenstone.org/gs3files/${tomcat.version}.zip" 
    688       dest="${packages.home}/${tomcat.version}.zip" 
     580    <get src="http://www.greenstone.org/gs3files/apache-tomcat-5.5.25.zip" 
     581      dest="${packages.home}/apache-tomcat-5.5.25.zip" 
    689582      usetimestamp="true"/> 
    690     <unzip src="${packages.home}/${tomcat.version}.zip"  
     583    <unzip src="${packages.home}/apache-tomcat-5.5.25.zip"  
    691584      dest="${packages.home}"/> 
    692     <get src="http://www.greenstone.org/gs3files/${tomcat.version}-compat.zip" 
    693       dest="${packages.home}/${tomcat.version}-compat.zip" 
     585    <get src="http://www.greenstone.org/gs3files/apache-tomcat-5.5.25-compat.zip" 
     586      dest="${packages.home}/apache-tomcat-5.5.25-compat.zip" 
    694587      usetimestamp="true"/> 
    695     <unzip src="${packages.home}/${tomcat.version}-compat.zip"  
     588    <unzip src="${packages.home}/apache-tomcat-5.5.25-compat.zip"  
    696589      dest="${packages.home}"/> 
    697590    <!-- delete any existing tomcat --> 
    698591    <delete dir="${packages.home}/tomcat"/> 
    699592    <move todir="${packages.home}/tomcat"> 
    700       <fileset dir="${packages.home}/${tomcat.version}"/> 
     593      <fileset dir="${packages.home}/apache-tomcat-5.5.25"/> 
    701594    </move> 
    702595    <copy file="${basedir}/resources/tomcat/setclasspath.bat" 
     
    733626    <!-- need to edit the config file, or do we get the user to do this???--> 
    734627  </target> 
    735    
     628     
    736629  <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"/> 
     630   <property name="tomcat.classpath" refid="local.tomcat.classpath"/> 
    738631    <property name="tomcat.path" refid="local.tomcat.path"/> 
    739632    <property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"/> 
     
    798691 
    799692 
    800  
    801  
    802  
    803  
    804   <!-- ======================= ant Targets ============================ -->  
     693<!-- ======================= ant Targets ============================ -->  
    805694  <target name="prepare-ant" depends="init"> 
    806695    <get src="http://www.greenstone.org/gs3files/apache-ant-1.7.0-bin.zip" 
     
    814703  </target> 
    815704 
    816   <!-- ======================= Axis Targets ============================ -->  
     705<!-- ======================= Axis Targets ============================ -->  
    817706 
    818707  <target name="prepare-axis" depends="init"> 
    819     <get src="http://www.greenstone.org/gs3files/${axis.zip.version}
    820       dest="${packages.home}/${axis.zip.version}
     708    <get src="http://www.greenstone.org/gs3files/axis-bin-1_2_1.zip
     709      dest="${packages.home}/axis-bin-1_2_1.zip
    821710      usetimestamp="true"/> 
    822     <unzip src="${packages.home}/${axis.zip.version}
     711    <unzip src="${packages.home}/axis-bin-1_2_1.zip
    823712      dest="${packages.home}"/> 
    824713    <move todir="${packages.home}/axis"> 
    825       <fileset dir="${packages.home}/${axis.dir.version}"/> 
     714      <fileset dir="${packages.home}/axis-1_2_1"/> 
    826715    </move> 
    827716    <!-- install axis into greenstone web app --> 
     
    845734  </target> 
    846735 
    847   <target name="soap-deploy-site" depends="init,get-sitename,get-siteuri,create-deployment-files,deploy-site" 
     736  <target name="soap-deploy-site" depends="init,get-sitename,get-siteuri,get-webservices,create-deployment-files,deploy-site" 
    848737    description="Deploy a SOAP web service for a local Greenstone site. Tomcat must be running for this to work."/> 
    849738   
     
    853742      <arg value="-l"/> 
    854743      <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/> 
    855       <arg file="${basedir}/resources/soap/${axis.sitename}.wsdd"/> 
    856     </java>     
    857   </target> 
    858    
    859   <target name="soap-undeploy-site" depends="get-sitename" 
     744      <arg file="${basedir}/resources/soap/deploy.wsdd"/> 
     745    </java> 
     746    <delete file="${basedir}/resources/soap/deploy.wsdd"/> <!--clean up, no longer used--> 
     747  </target> 
     748   
     749  <target name="soap-undeploy-site" depends="get-undeploy-service-name" 
    860750    description="Undeploy a SOAP web service for a local Greenstone site. Tomcat must be running for this to work."> 
     751    <filter token="servicesname" value="${axis.undeploy.servicename}"/> 
     752    <copy file="${basedir}/resources/soap/undeploy-site.wsdd.template" 
     753      tofile="${basedir}/resources/soap/undeploy.wsdd" 
     754      filtering="true" 
     755      overwrite="true"/> 
    861756    <java classname="org.apache.axis.client.AdminClient"> 
    862757      <classpath refid="compile.classpath"/> 
    863758      <arg value="-l"/> 
    864759      <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/> 
    865       <arg file="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"/> 
     760      <arg file="${basedir}/resources/soap/undeploy.wsdd"/> 
    866761    </java> 
    867   </target> 
    868  
    869   <!-- this target used to deploy the preprepared localsite server  --> 
     762    <delete file="${basedir}/resources/soap/undeploy.wsdd"/> <!--clean up, no longer used--> 
     763  </target> 
     764 
     765  <!-- this target used to deploy the default web service SOAPServer (base.webservice.name) on the localsite server 
     766with the default servicename of localsite--> 
    870767  <target name="deploy-localsite" depends="init"  
    871768    description="Deploy the SOAP server for localsite. Will start and stop Tomcat."> 
    872769    <antcall target="start-tomcat"/> 
     770    <echo>Deploying ${base.webservice.name} web services for localsite under service name: localsite</echo> 
     771    <antcall target="create-deployment-files"> 
     772      <param name="axis.sitename" value="localsite"/> 
     773      <param name="axis.servicesname" value="${base.webservice.name}"/> 
     774      <param name="axis.siteuri" value="localsite"/> 
     775    </antcall> 
    873776    <antcall target="deploy-site"> 
    874777      <param name="axis.sitename" value="localsite"/> 
     778      <param name="axis.servicesname" value="${base.webservice.name}"/> 
     779      <param name="axis.siteuri" value="localsite"/> 
    875780    </antcall> 
    876     <antcall target="stop-tomcat"/
     781    <echo>The Greenstone server has been started up. If you do not want it running, please type: ant stop.</echo
    877782  </target> 
    878783   
    879784  <target name="get-sitename" unless="axis.sitename"> 
    880     <input addproperty="axis.sitename" message="What site? (press enter for default:localsite)" defaultvalue="localsite"/> 
    881   </target> 
    882  
    883   <target name="get-siteuri" depends="get-sitename" unless="axis.siteuri"> 
    884     <input addproperty="axis.siteuri" message="What name do you want the service to have? (press enter for default:${axis.sitename})" defaultvalue="${axis.sitename}"/> 
    885     <echo>${axis.sitename}, ${axis.siteuri}</echo> 
    886   </target> 
    887  
    888   <target name="check-deployment-files" depends="get-sitename"> 
    889     <condition property="deploy.exists"> 
    890       <and> 
    891         <available file="${basedir}/resources/soap/${axis.sitename}.wsdd"/> 
    892         <available file="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"/> 
    893         <available file="${web.classes}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class"/> 
    894       </and> 
     785    <input addproperty="axis.sitename" defaultvalue="localsite">What site do you want to deploy services for? 
     786Press Enter for default:localsite</input> 
     787  </target> 
     788 
     789  <target name="get-undeploy-service-name" unless="axis.undeploy.servicename"> 
     790    <input addproperty="axis.undeploy.servicename" defaultvalue="localsite">Please enter the full name of the service you wish to undeploy. 
     791To find out which web services you've got deployed, point your browser to http://HOST:PORT/greenstone3/services  
     792Or press Enter for undeploying the default:localsite /></input> 
     793     <echo>Name of service to undeploy: ${axis.undeploy.servicename}</echo> 
     794  </target> 
     795 
     796  <target name="get-webservices" unless="axis.servicesname"> 
     797    <input addproperty="axis.servicesname" defaultvalue="${base.webservice.name}">Which set of web services do you want to deploy? 
     798Choose from: ${web.services.list} 
     799Or press Enter for default:${base.webservice.name} /></input> 
     800    <echo>${axis.servicesname}</echo> 
     801  </target> 
     802 
     803  <target name="get-siteuri" depends="get-sitename,get-webservices" unless="axis.siteuri"> 
     804    <input addproperty="axis.siteuri" defaultvalue="${axis.servicesname}${axis.sitename}">What name do you want the service to have? (Press Enter for default:${axis.servicesname}${axis.sitename})</input> 
     805    <echo>Site: ${axis.sitename}, services: ${axis.servicesname}, servicesname: ${axis.siteuri}</echo> 
     806  </target> 
     807 
     808  <target name="set-soapmethod" description="Determines whether the service in the wsdd should have the style attribute set to message or the provider attribute set to java:RPC"  if="axis.servicesname"> 
     809   <condition property="soap.method" value="provider='java:MSG' style='message' use='literal'"> 
     810      <equals arg1="${axis.servicesname}" arg2="${base.webservice.name}"/> 
    895811    </condition> 
    896   </target>  
    897  
    898   <target name="create-deployment-files" depends="get-sitename,get-siteuri,check-deployment-files"  
    899     if="axis.sitename" unless="deploy.exists"> 
     812    
     813   <!--everything else defaults to java:RPC at present--> 
     814   <condition property="soap.method" value="provider='java:RPC'"> 
     815     <not> 
     816      <equals arg1="${axis.servicesname}" arg2="${base.webservice.name}"/> 
     817    </not> 
     818    </condition> 
     819 </target> 
     820 
     821  <target name="create-deployment-files" depends="set-soapmethod" if="axis.sitename"> 
    900822    <filter token="sitename" value="${axis.sitename}"/> 
    901823    <filter token="siteuri" value="${axis.siteuri}"/> 
     824    <filter token="servicesname" value="${axis.servicesname}"/> 
     825    <filter token="soapmethod" value="${soap.method}"/> 
    902826    <copy file="${basedir}/resources/soap/site.wsdd.template" 
    903       tofile="${basedir}/resources/soap/${axis.sitename}.wsdd" 
    904       filtering="true"/> 
    905     <copy file="${basedir}/resources/soap/undeploy-site.wsdd.template" 
    906       tofile="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd" 
    907       filtering="true"/> 
     827      tofile="${basedir}/resources/soap/deploy.wsdd" 
     828      filtering="true" 
     829      overwrite="true"/> 
    908830    <!-- create the java files and compile them --> 
    909     <copy file="${basedir}/resources/java/SOAPServer.java.in" 
    910       tofile="${src.gsdl3.home}/SOAPServer${axis.sitename}.java" 
    911       filtering="true"/> 
     831    <copy file="${basedir}/resources/java/${axis.servicesname}.java.in" 
     832      tofile="${src.gsdl3.home}/${axis.servicesname}${axis.sitename}.java" 
     833      filtering="true" 
     834      overwrite="true"/> 
    912835    <mkdir dir="${build.home}"/> 
    913836    <javac srcdir="${src.home}" 
     
    917840      optimize="${compile.optimize}"> 
    918841      <classpath refid="compile.classpath"/> 
    919       <include name="org/greenstone/gsdl3/SOAPServer${axis.sitename}.java" /> 
     842      <include name="org/greenstone/gsdl3/${axis.servicesname}${axis.sitename}.java" /> 
    920843    </javac> 
    921844    <mkdir dir="${web.classes}/org/greenstone/gsdl3"/> 
    922     <copy file="${build.home}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" tofile="${web.classes}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" /> 
    923   </target> 
    924    
    925  
    926   <!-- ====================== Core targets ============================== --> 
    927   <!-- core targets refer to the core gsdl3 java src --> 
    928    
    929   <target name="prepare-core" unless="nosvn.mode"> 
     845    <copy file="${build.home}/org/greenstone/gsdl3/${axis.servicesname}${axis.sitename}.class"            tofile="${web.classes}/org/greenstone/gsdl3/${axis.servicesname}${axis.sitename}.class" 
     846          overwrite="true" /> 
     847  </target> 
     848     
     849 
     850<!-- ====================== Core targets ============================== --> 
     851<!-- core targets refer to the core gsdl3 java src --> 
     852   
     853  <target name="prepare-core" unless="nocvs.mode"> 
    930854    <!-- just get rid of empty directories--> 
    931855    <svn> 
    932       <update dir="."/> 
    933     </svn> 
     856               <update dir="."/> 
     857       </svn> 
    934858  </target> 
    935859   
     
    939863    description="Update only the Greenstone core" /> 
    940864   
    941   <target name="svnupdate-core" unless="nosvn.mode"> 
    942