Intellij Idea配置Maven并给maven设置阿里源

前提:

Maven已经安装并配置好。

安装并配置maven参考以下链接:

https://www.cnblogs.com/majestyking/articles/10303476.html

1. IDEA->File->Settings->Build,Execution,Deployment->Building Tools->Maven

如下图所示,三个地方都要更改成自己的配置。

2.IDEA->新建maven项目

3.更改maven的源为阿里的源

在maven的安装目录->conf文件夹->settings.xml,找到mirros

4. 在mirros中添加阿里源

5.mirrors的配置

<mirror>
        <mirror>
            <id>aliyunmaven</id>
            <name>Ali maven</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>                        
        </mirror>
        
        <mirror>
            <id>aliyunmaven</id>
            <name>Ali maven</name>
            <url>http://maven.aliyun.com/nexus/content/repositories/central</url>
            <mirrorOf>central</mirrorOf>                        
        </mirror>
        
  </mirrors>

6.阿里云官网参考

7.阿里云官方网站帮助文档

https://help.aliyun.com/document_detail/102512.html?spm=a2c40.aliyun_maven_repo.0.0.361865e98WjFsj

后记:

2020年2月19日 凌晨00:39 星期三 农历正月二六 天气晴 上海

猜你喜欢

转载自www.cnblogs.com/majestyking/p/12329535.html