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

Unify error output/check logic from shell and batch scripts

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.5.0-alpha-1, 3.5.0
    • Component/s: Command Line
    • Labels:
      None

      Description

      Currently,

      both output two different messages.

      Shell:

      Error: JAVA_HOME is not defined correctly.
      We cannot execute $JAVACMD

      while batch says:

      Error: JAVA_HOME not found in your environment.
      Please set the JAVA_HOME variable in your environment to match the
      location of your Java installation.

      Same applies for M2_HOME. Additionally, testing for the Java command is handled different in both scripts. The batch script relies on JAVA_HOME while the shell script can ignore it. Both should require JAVA_HOME or warn about and use which java, respectively java in PATH (for %%X in (java.exe) do (set JAVACMD=%%~$PATH:X)) on Windows. After that should proceed to checking M2_HOME.

      Any thoughts?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael-o Michael Osipov
                Reporter:
                michael-o Michael Osipov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: