修改idea默认的maven支持
注意:安装Maven3之前需要安装jdk1.7以上版本,下面介绍的是最新版Maven官网下载并安装
- 第一步下载自己需要的maven版本 官方网站:http://maven.apache.org/download.cg
2.第二步下载好之后解压解压到安装路径即可。
3.第二步配置环境变量新建系统变量 变量值为maven解压的所在目录(本列以windows10)
在系统变量里找到patch目录 追加%MAVEN_HOME%\bin
扫描二维码关注公众号,回复:
6224118 查看本文章
4.第三步:测试 cmd窗口 命令 mvn -v
看到以下消息则说明配置成功了
5.第四步:修改配置文件(可以不进行配置,默认在C盘)(本地仓库下载存储位置)
手动创建该目录文件E:\maven-3.6.0\repository
settings.xml添加本地仓库指定位置配置:
<localRepository>E:\maven-3.6.0\repository</localRepository>
settings.xml阿里云镜像仓库地址配置:复制红色代码到指定位置
<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>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
<mirror>
<id>nexus-aliyun</id>
<name>nexus-aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
6.第五步:idea修改maven版本支持
7.修改maven优化配置项(自动帮我们下载项目所需要的依赖包,以及一些组件的支持,方便后续开发)