Details

    • Type: Improvement Improvement
    • Status: 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

      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

          Maciej Mazur created issue -
          Hide
          Maciej Mazur added a comment -

          patch

          Show
          Maciej Mazur added a comment - patch
          Maciej Mazur made changes -
          Field Original Value New Value
          Attachment MNG-5020-apache-maven.patch [ 53841 ]
          Hide
          Maciej Mazur added a comment -

          Improved patch

          Show
          Maciej Mazur added a comment - Improved patch
          Maciej Mazur made changes -
          Attachment MNG-5020-apache-maven.patch [ 53842 ]
          Hide
          Benjamin Bentmann added a comment -

          Applied in r1074273, thanks!

          Show
          Benjamin Bentmann added a comment - Applied in r1074273 , thanks!
          Benjamin Bentmann made changes -
          Assignee Benjamin Bentmann [ bentmann ]
          Fix Version/s 3.0.3 [ 17061 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MNG-5025 [ MNG-5025 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
          Mark Thomas made changes -
          Workflow jira [ 12715271 ] Default workflow, editable Closed status [ 12754848 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
          Mark Thomas made changes -
          Workflow jira [ 12951565 ] Default workflow, editable Closed status [ 12987858 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          2d 20h 28m 1 Benjamin Bentmann 24/Feb/11 13:48

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development