Hello,
Today we are going to install maven to my MacBook Pro (late 2010 model). It has OS X Yosemite. Before you start please install JDK. I have installed jdk-8u45-macosx-x64 .
Lets start :
Today we are going to install maven to my MacBook Pro (late 2010 model). It has OS X Yosemite. Before you start please install JDK. I have installed jdk-8u45-macosx-x64 .
Lets start :
- First you need to install latest version of maven from its website.here is the link : https://maven.apache.org/download.cgi
- When you open the web site scroll the page down. You will see this caption.
"Unix-Based Operating Systems (Linux, Solaris and Mac OS X)"
Follow the instructions and install. You can think what is the aim of this post
but don't have a hasty judge on me because these instructions didn't work
on my OS so I decided to publish this post. As they write in instructions
download apache-maven-3.3.3-bin.tar.gz
- Now we need to locate the "apache-maven-3.3.3" folder. Copy the folder. I prefer to locate
After end of download double click to ".tar" file |
- Now we need to locate the "apache-maven-3.3.3" folder. Copy the folder. I prefer to locate
folder in Library folder. on when you are on desktop press Shift + Command + C button combination to open Computer. There you are going to see the HDD which is OS installed.
Double click on OS disk and then Library Folder. Then paste the folder inside Library folder.
- If you finished to locate folder. Now you need to point it to your operating system. on Yosemite press Command+Space and write "Terminal" to spotlight search.
Double click on OS disk and then Library Folder. Then paste the folder inside Library folder.
Location of folder. |
- If you finished to locate folder. Now you need to point it to your operating system. on Yosemite press Command+Space and write "Terminal" to spotlight search.
Click the Terminal to run. |
- On command line write this command and press enter. open ~/.bash_profile
After you press enter the .bash_profile will be open in text edit. You will edit this file to point where your Java and Maven are. |
- If you open .bash_profile file enter the following lines to file. according to your system configuration file paths can change.
export M2_HOME=/Library/apache-maven-3.3.3/
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export JAVA_HOME=$(/Library/Java/JavaVirtualMachines/jdk1.8.0_45)
- press command + S and save file then close text edit window. Also you need to quit from Terminal to do this when you are in Terminal press command+Q and it will be closed. Then re-open Terminal and enter this command mvn --version if you have the following screen your installation is completed success fully.
AFTER ALL IF YOU HAVE PROBLEM WITH INSTALLATION EDIT JAVA HOME LINE IN .BASH_PROFILE FILE SAME AS BELOW
Proof of successful installation. |
export JAVA_HOME=$(/usr/libexec/java_home)
Comments
Post a Comment