Changeset 13925 for trunk/gsdl3/build.xml
- Timestamp:
- 2007-02-16T10:56:11+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/build.xml
r13921 r13925 397 397 <!-- ========== Web app Targets ================================ --> 398 398 399 <target name="prepare-web" depends="init ">399 <target name="prepare-web" depends="init,configure-java-version"> 400 400 <mkdir dir="${web.home}/applet"/> 401 401 <mkdir dir="${web.home}/logs"/> 402 <condition property="need.xml.jars"> 402 </target> 403 404 <!-- 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 --> 405 <target name="configure-java-version" depends="init" 406 description="Run this target if you have changed the default version of java since installing greenstone3"> 407 <condition property="need.xalan.jar"> 403 408 <equals arg1="1.5" arg2="${ant.java.version}"/> 404 409 </condition> 405 <antcall target="activate-xml-jars"/> 406 <antcall target="deactivate-xml-jars"/> 407 </target> 408 409 <target name="configure-java-version" depends="init" 410 description="Run this target if you have changed the default version of java since installing greenstone3"> 411 <condition property="need.xml.jars"> 412 <equals arg1="1.5" arg2="${ant.java.version}"/> 413 </condition> 414 <antcall target="activate-xml-jars"/> 415 <antcall target="deactivate-xml-jars"/> 416 <condition property="need.tomcat.compat"> 417 <equals arg1="1.5" arg2="${ant.java.version}"/> 418 </condition> 419 <antcall target="install-tomcat-compat"/> 420 <antcall target="uninstall-tomcat-compat"/> 421 </target> 422 423 <target name="activate-xml-jars" if="need.xml.jars"> 410 <antcall target="activate-xalan-jar"/> 411 <antcall target="deactivate-xalan-jar"/> 412 </target> 413 414 <target name="activate-xalan-jar" if="need.xalan.jar"> 424 415 <copy file="${web.lib}/xalan.jar.tmp" tofile="${web.lib}/xalan.jar"/> 425 <copy file="${web.lib}/xercesImpl.jar.tmp" tofile="${web.lib}/xercesImpl.jar"/> 426 </target> 427 428 <target name="deactivate-xml-jars" unless="need.xml.jars"> 416 </target> 417 418 <target name="deactivate-xalan-jar" unless="need.xalan.jar"> 429 419 <delete file="${web.lib}/xalan.jar"/> 430 <delete file="${web.lib}/xercesImpl.jar"/>431 420 </target> 432 421 … … 498 487 <!-- ======================= Tomcat Targets ========================== --> 499 488 500 <!-- this target sets up tomcat for the first time, or resets it any subsequent times --> 501 <target name="prepare-tomcat" depends="init,download-tomcat" if="tomcat.islocal"> 502 <condition property="need.tomcat.compat"> 503 <equals arg1="1.4" arg2="${ant.java.version}"/> 504 </condition> 505 <antcall target="install-tomcat-compat"/> 506 </target> 507 508 <target name="download-tomcat" depends="init,setup-proxy" if="tomcat.islocal"> 489 <!-- this target downloads and installs Tomcat --> 490 <!-- we download tomcat and the compat module - its needed for 1.4, and doesn't seem to harm 1.5 --> 491 <target name="prepare-tomcat" depends="init,setup-proxy" if="tomcat.islocal"> 492 509 493 <!-- check that packages dir is there --> 510 494 <mkdir dir="${packages.home}"/> … … 512 496 dest="${packages.home}/apache-tomcat-5.5.12.zip" 513 497 usetimestamp="true"/> 514 <delete dir="${packages.home}/tomcat.bak"/>515 <move todir="${packages.home}/tomcat.bak" failonerror="false">516 <fileset dir="${packages.home}/tomcat"/>517 </move>518 498 <unzip src="${packages.home}/apache-tomcat-5.5.12.zip" 519 499 dest="${packages.home}"/> 500 <get src="http://www.greenstone.org/gs3files/apache-tomcat-5.5.12-compat.zip" 501 dest="${packages.home}/apache-tomcat-5.5.12-compat.zip" 502 usetimestamp="true"/> 503 <unzip src="${packages.home}/apache-tomcat-5.5.12-compat.zip" 504 dest="${packages.home}"/> 505 <!-- delete any existing tomcat --> 506 <delete dir="${packages.home}/tomcat"/> 520 507 <move todir="${packages.home}/tomcat"> 521 508 <fileset dir="${packages.home}/apache-tomcat-5.5.12"/> … … 529 516 <!-- make sure we have execute permission for the .sh files --> 530 517 <chmod dir="${packages.home}/tomcat/bin" perm="ugo+rx" 531 includes="*.sh"/> 532 533 <!-- download the compat module but don't install it unless necessary --> 534 <get src="http://www.greenstone.org/gs3files/apache-tomcat-5.5.12-compat.zip" 535 dest="${packages.home}/apache-tomcat-5.5.12-compat.zip" 536 usetimestamp="true"/> 537 <unzip src="${packages.home}/apache-tomcat-5.5.12-compat.zip" 538 dest="${packages.home}"/> 539 <move todir="${packages.home}/tomcat-compat"> 540 <fileset dir="${packages.home}/apache-tomcat-5.5.12"/> 541 </move> 542 </target> 543 544 545 <target name="install-tomcat-compat" if="need.tomcat.compat"> 546 <copy file="${packages.home}/tomcat-compat/common/endorsed/xml-apis.jar" 547 tofile="${web.applet}/xml-apis.jar"/> 548 <copy file="${packages.home}/tomcat-compat/common/endorsed/xml-apis.jar" 549 tofile="${packages.home}/tomcat/common/endorsed/xml-apis.jar"/> 550 <copy file="${packages.home}/tomcat-compat/common/endorsed/xercesImpl.jar" 551 tofile="${web.applet}/xercesImpl.jar"/> 552 <copy file="${packages.home}/tomcat-compat/common/endorsed/xercesImpl.jar" 553 tofile="${packages.home}/tomcat/common/endorsed/xercesImpl.jar"/> 554 <copy file="${packages.home}/tomcat-compat/bin/jmx.jar" 555 tofile="${packages.home}/tomcat/bin/jmx.jar"/> 556 </target> 557 <target name="uninstall-tomcat-compat" unless="need.tomcat.compat"> 558 <delete file="${web.applet}/xml-apis.jar"/> 559 <delete file="${packages.home}/tomcat/common/endorsed/xml-apis.jar"/> 560 <delete file="${web.applet}/xercesImpl.jar"/> 561 <delete file="${packages.home}/tomcat/common/endorsed/xercesImpl.jar"/> 562 <delete file="${packages.home}/tomcat/bin/jmx.jar"/> 518 includes="*.sh"/> 563 519 </target> 564 520 … … 585 541 <!-- need to edit the config file, or do we get the user to do this???--> 586 542 </target> 587 588 <target name="reload" description="Reload web application" 589 depends="init,setup-catalina-ant-tasks"> 590 <reload url="http://${tomcat.server}:${tomcat.port}/manager" username="admin" password="admin" 591 path="${app.path}"/> 592 </target> 593 543 594 544 <target name="start-tomcat" description="Startup only Tomcat" depends="init" if="tomcat.islocal"> 595 545 <property name="tomcat.classpath" refid="local.tomcat.classpath"/> … … 844 794 </manifest> 845 795 </jar> 796 <mkdir dir="${web.applet}"/> 846 797 <copy file="${build.home}/phind.jar" todir="${web.applet}"/> 847 798 <jar destfile="${build.home}/anttasks.jar">
Note:
See TracChangeset
for help on using the changeset viewer.