You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Glen Peterson (Jira)" <ji...@apache.org> on 2023/02/13 23:18:00 UTC

[jira] [Created] (MNGSITE-508) Maven Install Instructions could set an alias instead of altering the path on Unix-based OS's

Glen Peterson created MNGSITE-508:
-------------------------------------

             Summary: Maven Install Instructions could set an alias instead of altering the path on Unix-based OS's
                 Key: MNGSITE-508
                 URL: https://issues.apache.org/jira/browse/MNGSITE-508
             Project: Maven Project Web Site
          Issue Type: Improvement
            Reporter: Glen Peterson


At the bottom of this page:

[https://maven.apache.org/install.html]

It suggests adding to PATH:

 
{code:java}
export PATH=/opt/apache-maven-3.9.0/bin:$PATH{code}
 

I'm only familiar with Linux, but is it really necessary to make mvn the first thing on the path?  I'd suggest instead:
{code:java}
# in ~/.profile
export MVN_HOME=/opt/apache-maven-3.9.0/bin{code}
and

 
{code:java}
# in ~/.bash_aliases
alias mvn='$MVN_HOME/bin/mvn'{code}
 

This should have a very similar effect for CLI usage but not force every bash command to search the mvn bin directory before any other directories.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)