Install maven in Ubuntu

Source: Internet
Author: User

Installation Environment

Operating system: Ubuntu 14.04.1 Server AMD64

Installing the JDK

Before you install MAVEN, you must ensure that you have installed the JDK.

Please refer to the article "Installing JDK in Ubuntu" for the method of installing the JDK.

Download maven
wget http://apache.fayea.com/apache-mirror/maven/maven-3/3.2.3/binaries/ Apache-maven-3.2.3-bin.tar.gz
Extract
tar -xzf apache-maven-3.2. 3-bin. tar. gz
Setting environment variables

Environment variables are divided into user variables and system variables.

User Variable profile: ~/.BASHRC (hidden files in the current user's home directory, can be found through ' ls-a ')

System environment configuration file:/etc/profile

As with the configuration of user variables and system variables, this article takes the example of configuring user variables.

Edit the configuration file. BASHRC:

VI . BASHRC

Append at end of file:

# set Maven environmentexport m2_home=/home/hadoop/apache-maven-3.2. 3 export PATH= $M 2_home/bin: $PATH
Make environment variables effective
source. BASHRC
Validation

Verify that MAVEN is installed successfully.

$ MVN--Versionapache Maven3.2.3(33F8C3E1027C3DDDE99D3CDEBAD2656A31E8FDF4; the- ,-12t04: -:Ten+ ,:xx) Maven Home:/home/hadoop/apache-maven-3.2.3Java Version:1.7. 0_67, Vendor:oracle Corporationjava home:/home/hadoop/jdk1.7.0_67/Jredefault Locale:en_us, platform Encoding:utf-8OS Name:"Linux", Version:"3.13.0-32-generic", Arch:"AMD64", Family:"Unix"

Install maven in Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.