Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.0.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux, Ubuntu
    • Complexity:
      Intermediate
    • Number of attachments :
      2

      Description

      When JAVA_HOME is not set (but java command is in the PATH) then bin/mvn script prints warning message "Warning: JAVA_HOME environment variable is not set."
      I don't want to explicitly set JAVA_HOME variable because I manage my JDK instances by update-java-alternatives in Ubuntu. It switches system wide JDK, but does not set the JAVA_HOME variable. If I would set JAVA_HOME manually then any changes made by update-java-alternatives would not be reflected in JAVA_HOME which is obviously incorrect.

      However mvn script can be improved, so that it can guess JAVA_HOME. Actually Groovy startup script does it very well, so I moved auto-discovery code from groovy script to mvn and attach patch here

      1. MNG-5020-apache-maven.patch
        0.9 kB
        Maciej Mazur
      2. MNG-5020-apache-maven.patch
        0.8 kB
        Maciej Mazur

        Issue Links

          Activity

          Hide
          Maciej Mazur added a comment -

          patch

          Show
          Maciej Mazur added a comment - patch
          Hide
          Maciej Mazur added a comment -

          Improved patch

          Show
          Maciej Mazur added a comment - Improved patch
          Hide
          Benjamin Bentmann added a comment -

          Applied in r1074273, thanks!

          Show
          Benjamin Bentmann added a comment - Applied in r1074273 , thanks!

            People

            • Assignee:
              Benjamin Bentmann
              Reporter:
              Maciej Mazur
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: