How to install Maven on Ubuntu
- Extract the distribution archive, i.e. apache-maven-3.2.3-bin.tar.gz to the directory you wish to install Maven 3.2.3.
These instructions assume you chose /usr/local/apache-maven-3.2.3.
- Edit the profile file, to add environment variables
- sudo gedit /etc/profile
- Add to the end
- #MAVEN
M2_HOME=/usr/local/apache-maven-3.2.3
M2=$M2_HOME/bin
PATH=$M2:$PATH
export M2_HOME
export M2
export PATH
- To update the environment:
- source /etc/profile
- . /etc/profile (with the space)
- Run mvn --version to verify that it is correctly installed.
No comments:
Post a Comment