且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从shell脚本执行maven任务,并得到错误codeS

更新时间:2023-12-05 14:26:34

result_ code = MVN部署不是为了返回状态的方式。

result_code=mvn deploy is not the way to get return status

您可以尝试例如

#!/bin/bash
mvn deploy
STATUS=$?
if [ $STATUS -eq 0 ]; then
echo "Deployment Successful"
else
echo "Deployment Failed"
fi