-
-
Save SQiShER/2720113 to your computer and use it in GitHub Desktop.
defaults write ~/.MacOSX/environment.plist M2_HOME `brew --prefix maven`/libexec | |
defaults write ~/.MacOSX/environment.plist M2 `brew --prefix maven`/libexec/bin |
Thanks, this really saved me. I also did
export M2=brew --prefix maven
/libexec/bin
export M2_HOME=brew --prefix maven
/libexec
so that I could use maven in my open shell.
Thanks so much!
Thank you! I've been at this for too long. This fixed it
Thanks for your tips. @sanderson-sfdc
...and if like me you got
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
Then you need to set JAVA_HOME (check you are using the correct JDK version in the command):
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
Thanks! This just solved my problem!
I just downloaded maven zip file and extracted to my local folder in mac.
maven commands are not recognized in mac
Thank you, This was the only solution that worked.