Changeset 35311


Ignore:
Timestamp:
2021-08-18T15:28:05+12:00 (3 years ago)
Author:
davidb
Message:

Now explicitly testing for minimum version of ant in build.xml, so 'warning' message in gs3-setup.sh no longer needed

Location:
main/trunk/greenstone3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r34608 r35311  
    88     ====================================================================== -->
    99<project name="greenstone3" default="usage" basedir=".">
    10   <echo>os.name: ${os.name}</echo>
     10  <echo>OS    : ${os.name}</echo>
    1111  <!--
    1212      <echo>os.arch: ${os.arch}</echo>
    1313      <echo>os.version: ${os.version}</echo>
    14       -->
     14  -->
     15 
     16  <antversion property="ant.version.running" />
     17  <fail message="Minimum of Ant v1.7.1 required to operate Greenstone3 (detected version ${ant.version.running})">
     18    <condition>
     19      <not><antversion atleast="1.7.1" /></not>
     20    </condition>
     21  </fail>
     22
    1523
    1624  <!-- ============ classpath =================== -->
  • main/trunk/greenstone3/gs3-setup.sh

    r34569 r35311  
    559559echo ""
    560560
    561 #ant
    562 ANT_VERSION=1.7.1
     561# Ant
    563562echo "Checking for Ant"
    564 if [ -x "$GSDL3SRCHOME/packages/ant/bin/ant" ]; then
     563#Note: No longer need to print out info about minimum version of Ant needed
     564#  for Greenstone3 (v1.7.1 at the time of writing this comment!), as this is
     565#  now explicitly tested for in the build.xml file, and an error message generated
     566#  if not new enough
     567
     568if [ -x "$GSDL3SRCHOME/packages/ant/bin/ant" ] ; then
    565569  ANT_HOME="$GSDL3SRCHOME/packages/ant"
    566570  export ANT_HOME
     
    568572  echo "  - Setup Greenstone ant ($GSDL3SRCHOME/packages/ant)"
    569573else
    570   if [ "$ANT_HOME" != "" ]; then
     574  if [ "x$ANT_HOME" != "x" ] ; then
    571575    addtopath PATH "$ANT_HOME/bin"
    572576    echo "  - `ant -version`"
    573     echo "  - Note that Greenstone requires Ant $ANT_VERSION or greater"
    574577  else
    575578    which ant &> /dev/null
    576     if [ "$?" = "0" ]; then
     579    if [ "$?" = "0" ] ; then
    577580      echo "  - System install ant detected"
    578581      echo "  - `ant -version`"
    579       echo "  - Note that Greenstone requires Ant $ANT_VERSION or greater"
    580582    else
    581583      echo "  - WARNING: Failed to find 'ant'"
Note: See TracChangeset for help on using the changeset viewer.