i=1
while
      echo "Running attempt number  $i"
      i=`expr $i + 1`
      #: ${start=$i}              # capture the starting value of i
      ## some other commands      # needed for the loop
      mvn test
      (($? == 0 ))             # Place the loop ending test here.
do :; done
echo "The loop was executed $i times "
