This article is the first in a series of maven tutorials, including the concept of Maven, Linux installation, and Windows installation, please learn the corresponding content for your own computer system

The concept is introduced

Maven is a Project management tool based on the concept of Project Object Model (POM). It can build and manage Java projects. It is an open source Project developed by Pure Java under Apache Software Foundation Management

Install on Linux platform

Run the maven zip command to download the Maven package

Wget HTTP: / / https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz

Copy the code

Run the following command to decompress the package

javatar -zxvf apache-maven-3.54.-bin.tar.gz 

Copy the code

I extract the directory is: / usr/local/Java/helianxiaowu/apache maven — 3.5.4

To set maven environment variables, run the vi /etc/profile command to edit the file and add the following content

export MAVEN_HOME=/usr/local/java/helianxiaowu/apache-maven-3.54. export PATH=$PATH:$MAVEN_HOME/bin

Copy the code

Run commands to make the environment variables take effect

source /etc/profile

Copy the code

Run the MVN -version command. If the following information is displayed, the installation is successful


Windows platform installation

Download the zip package, be careful to download the Windows version.

Download address: http://maven.apache.org/download.cgi


After the download is complete, decompress the package to any directory

D:/helianxiaowu/ apache-Maven-3.5.0


Create a new MAVEN_HOME environment variable with the value of the maven installation directory


Add MAVEN_HOME to path with a value of; %MAVEN_HOME%\bin


After setting environment variables, open the CMD window and run the MVN -version command. If the following information is displayed, the installation is successful


— Original work of Helian Xiaowu. Follow the public account of Helian Xiaowu on wechat to get more technical dry goods