I am facing a problem with maven.I am using MAC.
I installed the Maven 3.0.4 on my laptop.When i go to the Maven folder where i installed it and enter
/Users/rajesh/Documents/apache-maven-3.2.3/bin/mvn -version
I could see
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-12T02:28:10+05:30) Maven home: /Users/rajesh/Documents/apache-maven-3.2.3 Java version: 1.7.0_71, vendor: Oracle Corporation Java home:/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x" version: "10.8.5", arch: "x86_64" family: "mac"
Now I have modified the setting files in it which i need to get the dependencies from the server and added this in PATH variable using
A). sudo nano /etc/paths
B). Enter your password, when prompted.
C). Go to the bottom of the file, and enter the path you wish to add.
D). Hit control-x to quit.
and when i do echo $PATH. I could see my path set on a new terminal.
Now when i am trying to run the maven command from the terminal it is picking the maven located at /usr/share/maven.
Confirmed by
Rajeshs-MacBook-Pro:bin rajesh$ which mvn /usr/bin/mvn Rajeshs-MacBook-Pro:bin rajesh$ ls -ltr /usr/bin/mvn lrwxr-xr-x 1 root wheel 24 Oct 29 13:15 /usr/bin/mvn -> /usr/share/maven/bin/mvn Rajeshs-MacBook-Pro:bin rajesh$
Could anyone please tell me how can i set my maven which i have installed as the default one ignoring the default one.
Thanks in advance.