I am trying to download Maven on my mac OSX yosemite. I tried to download it manually and I wrote this in the .bash_profile
export M2_HOME=/usr/local/apache-maven-3.2.5
export PATH=$PATH:$M2_HOME/bin
I also used the source command and I still get this error when I try to execute mvn command:
-bash: mvn: command not found
I tried to use an alternative solution to solve the problem, which is: brew install maven
But the problem is that brew is actually using an deadlink URL to download maven, thus, I was unable to solve the problem using brew!
In addition, I tried to search for JAVA_HOME but I couldn't locate it even though I have java 6,7, and 8 installed on my mac.
can someone please help me with this?
I tried to execute sh mvn
and got this error message:
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247)