Ver la siguiente versión mvn. Me pregunto por qué el comando "which" no te da la información correcta.
LM-SIN-00676037:myproject haibliu$ mvn --version
Apache Maven 3.0.3 (r1075438; 2011-03-01 01:31:09+0800)
Maven home: /usr/share/maven
Java version: 1.6.0_37, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.8", arch: "x86_64", family: "mac"
LM-SIN-00676037:myproject haibliu$ which mvn
/usr/local/bin/mvn
LM-SIN-00676037:myproject haibliu$ /usr/local/bin/mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 16:44:56+0800)
Maven home: /usr/local/Cellar/maven/3.0.4/libexec
Java version: 1.6.0_37, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.8", arch: "x86_64", family: "mac"
Solo para aclarar: / usr / bin / mvn viene con mi Max OS X, Mountain Lion. Y utilicé Homebrew para instalar / usr / local / bin / mvn. Después de eso, cambié el orden de PATH en / etc / paths.
LM-SIN-00676037:myproject haibliu$ cat /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
LM-SIN-00676037:myproject haibliu$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Eso es todo lo que hice. Y estoy usando bash shell.