Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5963

mvn.cmd does not return ERROR_CODE

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.9
    • Fix Version/s: 3.5.0-alpha-1, 3.5.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows 10

      Description

      mvn.cmd does not return an ERROR_CODE value to an enclosing script in WIndows. Running this script:
      @ECHO OFF
      CALL mvn clean install
      echo "%ERROR_CODE%"

      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%
      before
      exit /B %ERROR_CODE%

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael-o Michael Osipov
                Reporter:
                larry.singer Larry Singer
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: