Installation of Maven under Linux

Source: Internet
Author: User

Reference Blog: http://www.linuxidc.com/Linux/2015-02/112712.htm

Here are a few common commands

MVN compile compiling the project MVN test compile and run unit tests MVN Package Packaging (jar or war) MVN Install the project to the local warehouse mvn Clean Empty Project mvn eclipse:eclipse generate Eclipse Project

First download maven and unzip and move to the usr/local directory

$ wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.2. 3/binaries/apache-maven-3.2. 3-bin.tar.gz $ tar vxf apache-maven-3.2. 3-bin.tar.gz $ mv apache-maven-3.2. 3/usr/local/maven3

Modify the environment variables to add the following lines in the/etc/profile

Maven_home=/usr/local/maven3export Maven_homeexport Path=${path}:${maven_home}/bin

Remember to perform source /etc/profile the environment variables in effect.

Finally run mvn -v Verify that MAVEN is installed successfully and print the following if the installation is successful

Apache maven 3.2.3 (33F8C3E1027C3DDDE99D3CDEBAD2656A31E8FDF4; 2014-08-12t04:58:10+08:00) maven home:/usr/local/ Maven3java version:1.7.0_65, Vendor:oracle Corporationjava home:/usr/lib/jvm/java-7-openjdk-amd64/jredefault locale : en_US, platform Encoding:utf-8os name: "Linux", Version: "3.13.0-35-generic", Arch: "AMD64", Family: "UNIX" NOTE: input Sudu PA SSWD Root
Then follow the prompts to enter the password two times, you can establish the root account,
Then enter Su, as prompted to enter the root password just set, you can enter the root user.

Installation of Maven under Linux

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.