Mac OSX, the environment variables defined in .bashrc or .bash_profile are only exported to terminal environments.
A bundled GUI app like Eclipse does not see them,
解決方案
1.命令行啟動GUI
open /Application/Eclipse.app
2.修改/etc/launchd.conf
setenv MAVEN_HOME ~/maven