Ignore:
Timestamp:
2009-08-12T13:25:22+12:00 (15 years ago)
Author:
oranfry
Message:
  • build.xml: fail if user tries to combine tomcat6 and java1.4
  • gs3-setup.sh: if search4j not present, warn they may need java 1.5
File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/build.xml

    r20215 r20233  
    8585    <equals arg1="1.4" arg2="${ant.java.version}"/>
    8686  </condition>
     87
     88  <!--
     89    the next block checks if tomcat is present in the 'packages' directory, and if so, figures
     90    out its major version number (5, 6, etc.)
     91    then it checks if your java is new enough to run that tomcat and if not fails with an explanation
     92  -->
     93  <condition property="packages.tomcat.ispresent" value="true" else="false">
     94    <available file="packages/tomcat"/>
     95  </condition>
     96
     97  <if><bool><istrue value="${packages.tomcat.ispresent}"/></bool>
     98    <exec os="${os.unix}" outputproperty="packages.tomcat.detected.version" dir="packages/tomcat/bin" executable="sh">
     99      <arg value="-c"/>
     100      <arg value="./catalina.sh version | grep '^Server version: ' | sed 's@[^0-9]*\([0-9]\).*@\1@g'"/>
     101    </exec>
     102    <!--
     103    totally untested, so commented out for now
     104    <exec os="${os.windows}" outputproperty="packages.tomcat.detected.version" dir="packages/tomcat/bin" executable="cmd.exe">
     105      <arg value="/c"/>
     106      <arg value="catalina.bat version | grep '^Server version: ' | sed 's@[^0-9]*\([0-9]\).*@\1@g'"/>
     107    </exec>
     108    -->
     109    <property name="packages.tomcat.detected.version" value="unknown"/>
     110  </if>
     111
     112  <if>
     113    <bool>
     114      <and>
     115        <istrue value="${packages.tomcat.ispresent}"/>
     116        <equals arg1="${packages.tomcat.detected.version}" arg2="6"/>
     117        <equals arg1="1.4" arg2="${ant.java.version}"/>
     118      </and>
     119    </bool>
     120    <fail>Your java version (1.4) is too old to work with the bundled version of Apache Tomcat. Please upgrade your java to version 1.5 or greater. Alternatively, you may remove the bundled Apache Tomcat from the 'packages' folder and then run 'ant prepare-tomcat'.</fail>
     121  </if>
     122
     123
    87124  <property name="axis.zip.version" value="axis-bin-1_2_1.zip"/>
    88125  <property name="axis.dir.version" value="axis-1_2_1"/>
Note: See TracChangeset for help on using the changeset viewer.