Maven常用配置

官网:http://maven.apache.org/download.cgi

配置环境变量:Path:"../apache-maven-3.6.3/bin"

检验版本命令:mvn -v

配置仓库位置:

  位置:conf/settings.xml

<localRepository>d:/maven/repository</localRepository>

配置国内maven阿里云镜像(提高下载速度):

  位置:conf/settings.xml——<mirrors>便签里添加

<mirror>
            <id>alimaven</id>
            <mirrorOf>central</mirrorOf>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>

Eclipse集成配置maven:

  配置maven目录:Window->Preferences->Maven->Installations-> Add

  配置settings.xml:Window->Preferences->Maven->User Settings->Global Settings 和 User Settings

创建maven项目:

  Group Id: 包名
  Artifact Id: 项目名

原文地址:https://www.cnblogs.com/gdou/p/13258322.html