Changeset 20233 for greenstone3

Show
Ignore:
Timestamp:
12.08.2009 13:25:22 (11 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

Location:
greenstone3/trunk
Files:
2 modified

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"/> 
  • greenstone3/trunk/gs3-setup.sh

    r20219 r20233  
    9090  
    9191  #CLASSPATH 
     92  addtopath CLASSPATH "." 
    9293  addtopath CLASSPATH "$GSDL3HOME/WEB-INF/classes" 
    9394  addtopath CLASSPATH "$GSDL3SRCHOME/resources/java" 
     
    164165  elif [ "$JAVA_HOME" != "" ] && [ "`which java`" == "$JAVA_HOME/bin/java" ]; then 
    165166    echo "  - Using java at $JAVA_HOME" 
     167    echo "  - WARNING: Greenstone has not checked the version number of this java installation" 
     168    echo "             The source distribution of Greenstone3 requires java 1.5 or greater" 
     169    echo "             (SVN users may still use java 1.4)" 
    166170  elif [ "$JRE_HOME" != "" ] && [ "`which java`" == "$JRE_HOME/bin/java" ]; then 
    167171    echo "  - Using java at $JRE_HOME" 
     172    echo "  - WARNING: Greenstone has not checked the version number of this java installation" 
     173    echo "             The source distribution of Greenstone3 requires java 1.5 or greater" 
     174    echo "             (SVN users may still use java 1.4)" 
     175 
    168176  #failing all that, print a warning 
    169177  else