CentOS installation maven

Source: Internet
Author: User

One of the existing projects was managed using MAVEN, and the source code was put into subversion. Although Maven manages the project very conveniently, it is cumbersome to deploy. Build the project jar package locally, upload it to the server, and then restart the service. If you install MAVEN on the server, you can build the project jar package directly on the server, which is easier to deploy.

MAVEN is: http://maven.apache.org/download.cgi

It's easy to install MAVEN, just unzip the downloaded compressed file.

cd/usr/local/src/wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.1.1/binaries/ apache-maven-3.1.1-bin.tar.gztar zxf apache-maven-3.1. 1-bin. Tar . GZ MV apache-maven-3.1. 1 /usr/local/maven3


VI /etc/ profile Then you also need to configure the environment variables.

#在适当的位置添加export m2_home=/usr/local/maven3export PATH= $PATH: $JAVA _home/bin: $M 2_home/bin


After you save the exit, run the following command to make the configuration take effect, or restart the server.

Source/etc/profile

Verify version

Mvn-v

If the installation is correct, you can see the MAVEN version. If you are prompted with the following error, check that the PATH environment variable value in/etc/profile contains the paths to the Maven executable file and that the configuration is in effect.

-bash:mvn:command not found

More about MAVEN's usage can be found here: Maven Getting Started Guide

CentOS installation maven

Related Article

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.