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?

        Issue Links

          Activity

          Hide
          michael-o Michael Osipov added a comment -
          Show
          michael-o Michael Osipov added a comment - Fixed with 6c4627bd463dc080cb00c01a27b4ff830cbd5702 .
          Hide
          stephenc Stephen Connolly added a comment -

          Maven 3.4.0 has been dropped. See this thread for more details.

          This issue will need to be re-scheduled for a Maven release in the (hopefully near) future.

          Show
          stephenc Stephen Connolly added a comment - Maven 3.4.0 has been dropped. See this thread for more details. This issue will need to be re-scheduled for a Maven release in the (hopefully near) future.
          Hide
          michael-o Michael Osipov added a comment -
          Show
          michael-o Michael Osipov added a comment - Fixed with 2678388ea2cebc43f58009720609523ae09176f7 .

            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:

                Development