第一步:
首先下载一个maven的压缩包
进行解压
文件加微博常慧萍C私聊发送
第二步:
在电脑上进行环境变量配置
首先设置MAVEN_HOME:
变量值为maven解压包的所在位置注意 :解压的文件不要放在c盘
然后在配置path 加入 ;%MAVEN_HOME%\bin 注意: ;号一定要写
配置后在运行cmd 输入mvn -v
查看是否安装成功。
成功的截图。
第三步:
在你所解压的文件中 E:\maven\apache-maven-3.5.0\conf\settings
找到这个路径 打开修改
<localRepository>E:\maven\apache-maven-3.5.0\localRepository</localRepository>
上边的localRepository是需要自己创建一个文件,我的是直接创建在maven里了。
第四步:
修改
<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>
<mirrorOf>*</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
<mirror>
<id>osc</id>
<mirrorOf>oschina</mirrorOf>
<url>http://maven.oschina.net/content/groups/public/</url>
</mirror>
</mirrors>
1110

被折叠的 条评论
为什么被折叠?



