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

Maven startup script (init) calls which(1) which is an external command

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.8.2
    • 3.8.4, 4.0.0-alpha-2, 4.0.0
    • Command Line
    • None
    • UNIX/POSIX, Linux

    Description

      The "init" shell wrapper script, that often ends up as /usr/bin/mvn in downstream distributions, calls the program "which" in the situation where JAVA_HOME is not defined.

      "which" is a separate binary program that may or may not be installed. Increasingly it may not be in environments which are trying to reduce their install footprint e.g. containers.

      A portable alternative is to use command -v with some defensive commands prior (unalias, unset: see https://pubs.opengroup.org/onlinepubs/009695399/utilities/command.html).--

      I've got a PR ready to go.

      Attachments

        Issue Links

          Activity

            People

              michael-o Michael Osipov
              jmtd Jonathan Dowland
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: