Download and install Maven downloading and installing Maven

The download and install Maven

1. Download

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

central warehouse in maven: http://mvnrepository.com/

2. Install

2.1 and extract it to a directory without spaces in Chinese

Write pictures described here

2.2 Configuration Environment Variables

MAVEN_HOME

D:\Maven\maven\apache-maven-3.5.2

Write pictures described here

PATH

D:\Maven\maven\apache-maven-3.5.2\bin

Write pictures described here

2.3 Test

By mvn -v command to check whether the installation was successful maven

Write pictures described here

3. Local warehouse configuration

apache-maven-3.5.2 \ conf \ settings.xml file found in the installation directory

Write pictures described here

Setting.xml open the file, find the <localRepository> / path / to / local / repo </ localRepository>

 <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

Configuration is as follows

Write pictures described here

4.Maven directory project agreement

Write pictures described here

5. Common Maven command

to be continued…

Guess you like

Origin blog.csdn.net/YiJianCaoTang/article/details/93365468