mvn.cmd does not return an ERROR_CODE value to an enclosing script in WIndows. Running this script:
CALL mvn clean install
Now shows "". Previously it showed "0" for success and "1" for error.
It appears that there is an @endlocal missing. A possible fix is to add
@endlocal & set ERROR_CODE=%ERROR_CODE%
exit /B %ERROR_CODE%