Changeset 9697
- Timestamp:
- 2005-04-15T15:47:34+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ant-install-branch/gsdl3/build.xml
r9693 r9697 157 157 <pathelement location="${mysql.home}/lib/mysql"/> 158 158 </path> 159 <!-- ==================== Primary Targets ============================= --> 160 159 160 <!-- ==================== Primary and Global Targets ============================= --> 161 161 162 162 <!-- add comments about using xxx-core, xxx-packages if only want certain parts?? --> … … 194 194 195 195 <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."/> 197 197 <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'. 199 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. 200 To log the output, use the -logfile=build.log option. 201 </echo> 199 202 </target> 200 203 … … 207 210 <!-- ====== initialization and setup targets ================== --> 208 211 209 <target name="accept-properties" >212 <target name="accept-properties" unless="properties.accepted"> 210 213 <input addproperty="properties.ok" validargs="y,n">The following properties (among others) are being used from a build.properties file found in this directory: 211 214 tomcat.server=${tomcat.server} 212 215 tomcat.port=${tomcat.port} 213 216 tomcat.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)217 gsdl2.installed.path=${gsdl2.installed.path} (this is the location of Greenstone 2 if you have it) 215 218 proxy.host=${proxy.host} 216 219 proxy.port=${proxy.port} 220 mysql.installed.path=${mysql.installed.path} (this is the location of mysql if it is already installed) 221 mysql.admin.user=${mysql.admin.user} 222 mysql.port=${mysql.port} 217 223 If these are not acceptable, please change them and rerun this target. Continue [y/n]?" /> 218 224 </input> … … 256 262 <or> 257 263 <not> 258 <isset property="gsdl .installed.path"/>264 <isset property="gsdl2.installed.path"/> 259 265 </not> 260 <equals arg1="" arg2="${gsdl .installed.path}"/>266 <equals arg1="" arg2="${gsdl2.installed.path}"/> 261 267 </or> 262 268 </condition> … … 278 284 </condition> 279 285 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> 281 287 <condition property="proxy.present"> 282 288 <not> … … 356 362 <!-- ======================= Tomcat Targets ========================== --> 357 363 358 <!-- this target sets up tomcat for t ehfirst time, or resets it any subsequent times -->364 <!-- this target sets up tomcat for the first time, or resets it any subsequent times --> 359 365 <target name="prepare-tomcat" depends="init,setup-proxy"> 360 366 <get src="http://www.greenstone.org/gs3files/jakarta-tomcat-5.5.7.zip" … … 476 482 <target name="prepare-mysql" depends="init,init-mysql-vars,install-mysql,startup-mysql,setup-mysql,shutdown-mysql"/> 477 483 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 504 484 <target name="init-mysql-vars"> 505 485 <condition property="mysql.islocal.linux"> … … 517 497 </condition> 518 498 </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"/> 520 501 521 502 <!-- install and set up the database --> … … 555 536 </target> 556 537 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 557 564 <!-- mysql targets --> 558 565 <!-- windows: … … 564 571 description="Startup only mysql"> 565 572 <exec executable="${mysql.home}/bin/mysqld_safe" dir="${mysql.home}" 566 spawn="true" >573 spawn="true" os="${os.linux}"> 567 574 <arg value="--user=root"/> 568 575 <arg value="--datadir=./data"/> … … 597 604 <echo>MYSQL database server shutdown successfully</echo> 598 605 </target> 606 599 607 <target name="restart-mysql" description="Shutdown and restart only mysql" depends="init,shutdown-mysql,startup-mysql"/> 600 608 … … 1040 1048 1041 1049 <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"/> 1044 1052 </target> 1045 1053
Note:
See TracChangeset
for help on using the changeset viewer.