You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2021/09/29 12:03:00 UTC

[jira] [Comment Edited] (MNG-7270) maven shell script wrapper (init) calls "which", which might not be installed

    [ https://issues.apache.org/jira/browse/MNG-7270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17422082#comment-17422082 ] 

Michael Osipov edited comment on MNG-7270 at 9/29/21, 12:02 PM:
----------------------------------------------------------------

I have just read my [{{sh}} manpage|https://www.freebsd.org/cgi/man.cgi?query=sh&sektion=1&manpath=freebsd-release-ports] and yes, {{command -v}} is the way to go.#

You came five days left, the vote for Maven 3.8.3 is already running...


was (Author: michael-o):
I have just read my [https://www.freebsd.org/cgi/man.cgi?query=sh&sektion=1&manpath=freebsd-release-ports|{{sh}} manpage] and yes, {{command -v}} is the way to go.#

You came five days left, the vote for Maven 3.8.3 is already running...

> maven shell script wrapper (init) calls "which", which might not be installed
> -----------------------------------------------------------------------------
>
>                 Key: MNG-7270
>                 URL: https://issues.apache.org/jira/browse/MNG-7270
>             Project: Maven
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.8.2
>         Environment: UNIX/POSIX, Linux
>            Reporter: Jonathan Dowland
>            Assignee: Michael Osipov
>            Priority: Minor
>             Fix For: 4.0.x-candidate, 3.8.x-candidate
>
>
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)