- Download maven from Apache website (http://maven.apache.org/download.cgi)
- Extract the downloaded file, put the extracted file to /usr/bin
tar xzvf apache-maven-[version]-bin.tar.gz C /usr/bin
-
Then go to the /usr/bin directory and create symlink (symbolic link) for maven.
cd /usr/bin ln -s apache-maven-[version] maven
- Then, do the following:
vi /etc/profile.d/maven.sh
Put below code into the vi editor and save it:
export M2_HOME=/usr/local/maven export PATH=${M2_HOME}/bin:${PATH}
- Then log-out and log-in again to activate the above environment setting.
- To check maven is running ok on your computer, type the following using terminal:
mvn -version
Sunday, February 23, 2014
Install Maven on CentOS 6.5
Subscribe to:
Posts (Atom)