判断mvn命令是否成功

mvn clean test
rc=$?
if [[ $rc -ne '0' ]] ; then
  echo 'could not perform tests'; exit $rc
fi

你可能感兴趣的:(linux)