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

Unify error output/check logic from shell and batch scripts

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1.1
    • 3.5.0-alpha-1, 3.5.0
    • Command Line
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: