Changeset 15136


Ignore:
Timestamp:
2008-03-27T13:34:02+13:00 (14 years ago)
Author:
oranfry
Message:

made the configure-java-version execute quicker, and made it run every time tomcat starts - this way the user will never have to rename the xalan.jar(.tmp) files or remember to run configure-java-version explicitly - would be nice to hide the ugly output it creates though

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/build.xml

    r15124 r15136  
    152152    <isset property="disable.collection.building"/>
    153153  </condition>
     154
     155    <!-- where is search4j tool -->
     156    <condition property="search4j.exec" value="bin/search4j.exe">
     157        <isset property="current.os.iswindows"/>
     158  </condition>
     159  <property name="search4j.exec" value="bin/search4j"/>
     160
    154161   
    155162  <!-- ============= Base dirs for each package and component ============ -->
     
    439446  </target>
    440447 
    441   <!-- 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 -->
     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 -->
    442449  <target name="configure-java-version" depends="init"
    443450    description="Run this target if you have changed the default version of java since installing greenstone3">
     451
     452        <available property="have.xalan.jar" file="${web.lib}/xalan.jar"/>
    444453    <condition property="need.xalan.jar">
    445       <equals arg1="1.5" arg2="${ant.java.version}"/>
    446     </condition>
     454            <or>
     455                <equals arg1="1.5" arg2="${ant.java.version}"/>
     456                <equals arg1="1.6" arg2="${ant.java.version}"/>
     457            </or>
     458        </condition>
     459
     460        <condition property="do.deactivate.xalan.jar">
     461            <and>
     462                <isset property="have.xalan.jar"/>
     463                <not><isset property="need.xalan.jar"/></not>
     464            </and>
     465        </condition>
     466
     467        <condition property="do.activate.xalan.jar">
     468            <and>
     469                <not><isset property="have.xalan.jar"/></not>
     470                <isset property="need.xalan.jar"/>
     471            </and>
     472        </condition>
     473        <!--
     474        <echo>java version  : ${ant.java.version}</echo>
     475        <echo>have xalan.jar: ${hava.xalan.jar}</echo>
     476        <echo>need xalan.jar: ${need.xalan.jar}</echo>
     477        <echo>activate?     : ${do.activate.xalan.jar}</echo>
     478        <echo>deactivate?   : ${do.deactivate.xalan.jar}</echo>
     479        -->
     480
    447481    <antcall target="activate-xalan-jar"/>
    448482    <antcall target="deactivate-xalan-jar"/>
    449   </target>
    450  
    451   <target name="activate-xalan-jar" if="need.xalan.jar">
     483
     484  </target>
     485 
     486  <target name="activate-xalan-jar" if="do.activate.xalan.jar">
    452487    <copy file="${web.lib}/xalan.jar.tmp" tofile="${web.lib}/xalan.jar"/>
    453488    <antcall target="copy-xalan-for-mac" />
     
    455490
    456491  <target name="copy-xalan-for-mac" if="current.os.ismac">
    457        <copy file="${web.lib}/xalan.jar.tmp" tofile="${catalina.home}/common/endorsed/xalan.jar"/>
    458   </target>
    459 
    460   <target name="deactivate-xalan-jar" unless="need.xalan.jar">
     492        <echo>installing xalan.jar</echo>
     493        <copy file="${web.lib}/xalan.jar.tmp" tofile="${catalina.home}/common/endorsed/xalan.jar"/>
     494  </target>
     495
     496  <target name="deactivate-xalan-jar" if="do.deactivate.xalan.jar">
     497        <echo>uninstalling xalan.jar</echo>
    461498    <delete file="${web.lib}/xalan.jar"/>
    462499  </target>
     
    586623  </target>
    587624   
    588   <target name="start-tomcat" description="Startup only Tomcat" depends="init" if="tomcat.islocal">
     625  <target name="start-tomcat" description="Startup only Tomcat" depends="init,configure-java-version" if="tomcat.islocal">
    589626   <property name="tomcat.classpath" refid="local.tomcat.classpath"/>
    590627    <property name="tomcat.path" refid="local.tomcat.path"/>
Note: See TracChangeset for help on using the changeset viewer.