第一步:安装Maven(官网自查)
第二步: 配置settings.xml文件
1.进入Maven文件
2.在进入conf文件
3.修改settings.xml(记得自己备份一个)
初学者不需要管文件的其他类容,只要会添加本地库就可以了
(1). 添加本地repository (jar库)地址配置
<localRepository>本地repository的实际地址</localRepository>
(2).配置云仓库镜像文件
<mirrors>
<!-- 阿里云仓库 -->
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- 中央仓库1 -->
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo1.maven.org/maven2/</url>
</mirror>
<!-- 中央仓库2 -->
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
</mirrors>
第三步.在开发工具中配置Maven
1.在IDEA上配置:
1.
2.在Eclipse上配置: