最近在使用maven添加依赖的时候,动不动idea就会从Updating [central] https://repo.maven.apache.org/maven2开始下载1.23G的文件。即使在maven setting.xml中配置了阿里云的镜像。
原因是所有自定义pom.xml都是继承自super pom:

<repositories><repository><id>central</id><name>Central Repository</name><url>http://repo.maven.apache.org/maven2</url><layout>default</layout><snapshots><enabled>false</enabled></snapshots></repository></repositories><pluginRepositories><pluginRepository><id>central</id><name>Central Repository</name><url>http://repo.maven.apache.org/maven2</url><layout>default</layout><snapshots><enabled>false</enabled></snapshots><releases><updatePolicy>never</updatePolicy></releases></pluginRepository></pluginRepositories>

因此当maven加载依赖的时候,总是会优先去中央仓库下载,
解决办法,在项目pom.xml中添加如下配置:

<repositories><repository><id>central</id><url>http://host:port/content/groups/public</url></repository>
</repositories><pluginRepositories><pluginRepository><id>central</id><url>http://host:port/content/groups/public</url></pluginRepository>
</pluginRepositories>

maven加载依赖时总是Updating [central] https://repo.maven.apache.org/maven2相关推荐

  1. 解决IDEA中Maven加载依赖包慢的问题

    解决IDEA中Maven加载依赖包慢的问题 参考文章: (1)解决IDEA中Maven加载依赖包慢的问题 (2)https://www.cnblogs.com/ouym/p/6106450.html ...

  2. mvn install BUILD FAILURE : Downloading from central: https://repo.maven.apache.org/maven2/org/sp...

    错误信息: D:\project\2018\ygb\ygb\server>mvn install [INFO] Scanning for projects... [INFO] [INFO] -- ...

  3. Maven安装和配置阿里云镜像(解决在idea中Maven加载依赖慢的问题,保姆级教学)

    目录 前言 1.安装Maven及配置 1.1.解压maven包 1.2.创建本地依赖文件夹 1.3.打开配置文件 1.4.添加阿里云镜像代码块 2.配置环境变量 2.1.Windows下配置环境变量 ...

  4. Maven:Failure to transfer XXXXX from https://repo.maven.apache.org/maven2

    在打开pom.xml文件时,经常会有一些<dependecy>报如下错误: Multiple annotations found at this line:     - Failure t ...

  5. Could not transfer artifact (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_v

    异常信息 Failed to read artifact descriptor for org.slf4j:slf4j-api:jar:1.7.2 org.eclipse.aether.resolut ...

  6. sceneManager.loadscene加载场景时不会主动去加载场景的依赖包,要手动加载或添加场景到build setting列表中...

    sceneManager.loadscene加载场景时不会主动去加载场景的依赖包,要手动加载或添加场景到build setting列表中 假设有一场景1001.unity,,manifest文件如下: ...

  7. idea2020更新了maven自动加载依赖

    maven 自动加载依赖 当idea推出2020 版本以后 ,取消了maven 原本的自动加载依赖的设置,那么新版如何加载依赖呢 右上角m 小图标就是加载依赖的按钮 当 鼠标翻上去以后 会显示快捷键c ...

  8. maven插件加载依赖的类

    文章目录 前言 思路 解析 maven生命周期 借鉴文章 前言 最近在写maven插件,遇到一个问题是classload不能加载依赖的类,比如说引入jar的类. 我之前怎么使用的呢?就用网上常见的ma ...

  9. sql加载配置文件时出错:_SQL复制:基本设置和配置

    sql加载配置文件时出错: This is article is a continuation of the previous: SQL Server replication: Overview of ...

最新文章

  1. Redis集群:sharding策略
  2. 10-线程,进程,协程,IO多路复用
  3. RESTful 架构风格概述
  4. dataframe中将一列数据切分成多列
  5. 康纳的表情包(思维)
  6. springboot快速入门(一)——HelloWorld搭建
  7. 韩企全球首造72层3D NAND芯片 下半年或量产
  8. Vivado工程路径太长导致不能生成bit文件
  9. php function curl token_最全PHP代码规范
  10. layer 关闭父页面 刷新
  11. oc代码混淆_OC代码混淆工具
  12. 机器学习基础(八)——感知机(iterative optimization)
  13. transformer李宏毅讲解视频及decoder讲解
  14. 《linux c编程指南》学习手记2
  15. Android Q 添加GMS包
  16. 关于网站icon小图标在网站上不显示的问题解决办法
  17. 戴尔笔记本开机logo进度条时间长的解决办法
  18. Python采集手机4K壁纸,又是一个练手小案例,也不用担心没壁纸换咯
  19. c#中将一个实体类复制到另一个实体类
  20. Linux aarch64交叉编译之 assimp模型库

热门文章

  1. 分享受用一生的高效 PyCharm 使用技巧。
  2. [基础库Numpy] 技能树总结:一篇文章学会Numpy库
  3. 思维导图 基础篇(11)应用-文章分析-框架法
  4. 运用大数据手段 加快传统产业转型升级
  5. 华为交换机dhcp获取不到_华为S7706交换机DHCP Server 配置不成功问题
  6. Matlab绘制区域图
  7. C++版本OpenCv教程(十一)多通道分离与合并
  8. jQuery实现图片定时轮播
  9. 交住房公积金的好处及作用
  10. 我记忆中的“集银社”