Search code examples
javamacosmavenmvn-repo

Unable to get the maven installation path


I have installed maven 3.6.0 in my mac using homebrew. When I try

mvn --version 

in my terminal, I get the

Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T05:41:47+11:00)
Maven home: /usr/local/Cellar/maven/3.6.0/libexec
Java version: 11.0.2, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
Default locale: en_AU, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.3", arch: "x86_64", family: "mac"

But when I try ,

whereis mvn

I dont receive anything in return? Can someone let me know what I have done wrong in the installation


Solution

  • If you're looking for the installation folder, mvn --version shows you the path.

    Maven home: /usr/local/Cellar/maven/3.6.0/libexec

    Even better, try:

    which mvn

    Reason why whereis couldn't return is explained here.