总目录

下载

官方网站:https://maven.apache.org/

Welcome
  ⇩ 
Download
  ⇩ 
Files
  ⇩  
Link
  ⇩ 
apache-maven-3.6.3-bin.zip 

安装

● 下载得到 apache-maven-3.6.3-bin.zip 文件


● 解压至某一目录下即可。
 【例如】
  解压到: apache-maven-3.6.3 目录下。


● 修改系统环境变量path,追加D:\xxx\apache-maven-3.6.3\bin 

配置

maven的配置文件setting.xml出现在两个位置。 
(建议只修改本地配置文件)

1)全局配置文件
... ﹥ apache-maven-3.6.3 ﹥ conf ﹥ settings.xml

2)本地配置文件
C: ﹥ Users ﹥ '你的用户名' ﹥ .m2 ﹥ settings.xml 
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  -->

+ <localRepository>G:\IDE\maven_repository</localRepository>


<mirrors>
  <!-- mirror
   | Specifies a repository mirror site to use instead of a given repository. The repository that
   | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
   | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
   |
  -->

+ <mirror>
+   <id>aliyunmaven</id>
+   <mirrorOf>*</mirrorOf>
+   <name>阿里云公共仓库</name>
+   <url>https://maven.aliyun.com/repository/public</url>
+ </mirror>

</mirrors>
     

分类: Java Web

Deng Jia

Keep Moving.

0 条评论

发表评论

电子邮件地址不会被公开。