Changeset 9697


Ignore:
Timestamp:
2005-04-15T15:47:34+12:00 (19 years ago)
Author:
kjdon
Message:

small chanegs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ant-install-branch/gsdl3/build.xml

    r9693 r9697  
    157157    <pathelement location="${mysql.home}/lib/mysql"/>
    158158  </path>
    159 <!-- ==================== Primary Targets ============================= -->
    160 
     159
     160<!-- ==================== Primary and Global Targets ============================= -->
    161161
    162162  <!-- add comments about using xxx-core, xxx-packages if only want certain parts?? -->
     
    194194 
    195195  <target name="usage" description="Print a help message">
    196     <echo message="  Execute 'ant -projecthelp' for build file help."/>
     196    <echo message="  Execute 'ant -projecthelp' for a list of targets."/>
    197197    <echo message="  Execute 'ant -help' for Ant help."/>
    198     <echo>put the primary targets in here</echo>
     198    <echo>To install Greenstone, run 'ant [options] install'.
     199There 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.
     200To log the output, use the -logfile=build.log option.
     201    </echo>
    199202  </target>
    200203 
     
    207210<!-- ====== initialization and setup targets ================== -->
    208211
    209   <target name="accept-properties">
     212  <target name="accept-properties" unless="properties.accepted">
    210213    <input addproperty="properties.ok" validargs="y,n">The following properties (among others) are being used from a build.properties file found in this directory:
    211214tomcat.server=${tomcat.server}
    212215tomcat.port=${tomcat.port}
    213216tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed)
    214 gsdl.installed.path=${gsdl.installed.path} (this is the location of Greenstone 2 if you have it)
     217gsdl2.installed.path=${gsdl2.installed.path} (this is the location of Greenstone 2 if you have it)
    215218proxy.host=${proxy.host}
    216219proxy.port=${proxy.port}
     220mysql.installed.path=${mysql.installed.path} (this is the location of mysql if it is already installed)
     221mysql.admin.user=${mysql.admin.user}
     222mysql.port=${mysql.port}
    217223If these are not acceptable, please change them and rerun this target. Continue [y/n]?" />
    218224    </input>
     
    256262      <or>
    257263    <not>
    258       <isset property="gsdl.installed.path"/>
     264      <isset property="gsdl2.installed.path"/>
    259265    </not>
    260     <equals arg1="" arg2="${gsdl.installed.path}"/>
     266    <equals arg1="" arg2="${gsdl2.installed.path}"/>
    261267      </or>
    262268    </condition>
     
    278284    </condition>
    279285   
    280       <echo>tomcat.port:${tomcat.port}, gli.present:${gli.present} gsdlislocal=${gsdl2.islocal} gs2build.present=${gs2build.present} gsdl.path = ${gsdl.path}</echo>
     286      <echo>tomcat.port:${tomcat.port}, gli.present:${gli.present} gsdlislocal=${gsdl2.islocal} gs2build.present=${gs2build.present} gsdl2.installed.path = ${gsdl2.installed.path}</echo>
    281287    <condition property="proxy.present">
    282288      <not>
     
    356362<!-- ======================= Tomcat Targets ========================== -->
    357363
    358   <!-- this target sets up tomcat for teh first time, or resets it any subsequent times -->
     364  <!-- this target sets up tomcat for the first time, or resets it any subsequent times -->
    359365  <target name="prepare-tomcat" depends="init,setup-proxy">
    360366    <get src="http://www.greenstone.org/gs3files/jakarta-tomcat-5.5.7.zip"
     
    476482  <target name="prepare-mysql" depends="init,init-mysql-vars,install-mysql,startup-mysql,setup-mysql,shutdown-mysql"/>
    477483
    478   <!-- is this just linux or both??-->
    479   <target name="setup-mysql" if="mysql.islocal" unless="mysql.present">
    480     <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
    481       <arg value="--user=root"/>
    482       <arg value="--execute=GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@localhost;"/>
    483     </exec>
    484     <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
    485       <arg value="--user=root"/>
    486       <arg value="--execute=GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@'%'"/>
    487     </exec>
    488     <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
    489       <arg value="--user=root"/>
    490       <arg value="--execute=GRANT SELECT ON *.* TO gsdl3reader@localhost;"/>
    491     </exec>
    492     <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
    493       <arg value="--user=root"/>
    494       <arg value="--execute=create database localsite_gs3mgdemo;"/>
    495     </exec>
    496     <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}"
    497       input="${basedir}/web/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql">
    498       <arg value="--user=root"/>
    499       <arg value="localsite_gs3mgdemo"/>
    500     </exec>
    501     <antcall target="shutdown-mysql"/>
    502   </target>
    503 
    504484  <target name="init-mysql-vars">
    505485    <condition property="mysql.islocal.linux">
     
    517497    </condition>
    518498  </target>
    519   <target name="install-mysql" depends="init,install-mysql-linux,install-mysql-windows"/>
     499 
     500 <target name="install-mysql" depends="init,install-mysql-linux,install-mysql-windows"/>
    520501 
    521502  <!-- install and set up the database -->
     
    555536  </target>
    556537
     538  <!-- is this just linux or both??. also we probably need to do this for external mysql -->
     539  <target name="setup-mysql" if="mysql.islocal" unless="mysql.present">
     540    <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
     541      <arg value="--user=root"/>
     542      <arg value="--execute=GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@localhost;"/>
     543    </exec>
     544    <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
     545      <arg value="--user=root"/>
     546      <arg value="--execute=GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@'%'"/>
     547    </exec>
     548    <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
     549      <arg value="--user=root"/>
     550      <arg value="--execute=GRANT SELECT ON *.* TO gsdl3reader@localhost;"/>
     551    </exec>
     552    <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
     553      <arg value="--user=root"/>
     554      <arg value="--execute=create database localsite_gs3mgdemo;"/>
     555    </exec>
     556    <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}"
     557      input="${basedir}/web/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql">
     558      <arg value="--user=root"/>
     559      <arg value="localsite_gs3mgdemo"/>
     560    </exec>
     561  </target>
     562
     563
    557564  <!-- mysql targets -->
    558565  <!-- windows:
     
    564571    description="Startup only mysql">
    565572    <exec executable="${mysql.home}/bin/mysqld_safe" dir="${mysql.home}"
    566       spawn="true">
     573      spawn="true" os="${os.linux}">
    567574      <arg value="--user=root"/>
    568575      <arg value="--datadir=./data"/>
     
    597604    <echo>MYSQL database server shutdown successfully</echo>
    598605  </target>
     606
    599607  <target name="restart-mysql" description="Shutdown and restart only mysql" depends="init,shutdown-mysql,startup-mysql"/>
    600608
     
    10401048 
    10411049  <target name="gli-external" depends="init" unless="gsdl2.islocal">
    1042     <exec executable="${gsdl.path}/gli/gli4gs3.sh" os="${os.linux}" dir="${gsdl.path}/gli"/>
    1043     <exec executable="${gsdl.path}/gli/gli4gs3.bat" os="${os.windows}" dir="${gsdl.path}/gli"/>
     1050    <exec executable="${gsdl2.installed.path}/gli/gli4gs3.sh" os="${os.linux}" dir="${gsdl2.installed.path}/gli"/>
     1051    <exec executable="${gsdl2.installed.path}/gli/gli4gs3.bat" os="${os.windows}" dir="${gsdl2.installed.path}/gli"/>
    10441052  </target>
    10451053
Note: See TracChangeset for help on using the changeset viewer.