maven加载依赖时总是Updating [central] https://repo.maven.apache.org/maven2
最近在使用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相关推荐
- 解决IDEA中Maven加载依赖包慢的问题
解决IDEA中Maven加载依赖包慢的问题 参考文章: (1)解决IDEA中Maven加载依赖包慢的问题 (2)https://www.cnblogs.com/ouym/p/6106450.html ...
- 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] -- ...
- Maven安装和配置阿里云镜像(解决在idea中Maven加载依赖慢的问题,保姆级教学)
目录 前言 1.安装Maven及配置 1.1.解压maven包 1.2.创建本地依赖文件夹 1.3.打开配置文件 1.4.添加阿里云镜像代码块 2.配置环境变量 2.1.Windows下配置环境变量 ...
- Maven:Failure to transfer XXXXX from https://repo.maven.apache.org/maven2
在打开pom.xml文件时,经常会有一些<dependecy>报如下错误: Multiple annotations found at this line: - Failure t ...
- 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 ...
- sceneManager.loadscene加载场景时不会主动去加载场景的依赖包,要手动加载或添加场景到build setting列表中...
sceneManager.loadscene加载场景时不会主动去加载场景的依赖包,要手动加载或添加场景到build setting列表中 假设有一场景1001.unity,,manifest文件如下: ...
- idea2020更新了maven自动加载依赖
maven 自动加载依赖 当idea推出2020 版本以后 ,取消了maven 原本的自动加载依赖的设置,那么新版如何加载依赖呢 右上角m 小图标就是加载依赖的按钮 当 鼠标翻上去以后 会显示快捷键c ...
- maven插件加载依赖的类
文章目录 前言 思路 解析 maven生命周期 借鉴文章 前言 最近在写maven插件,遇到一个问题是classload不能加载依赖的类,比如说引入jar的类. 我之前怎么使用的呢?就用网上常见的ma ...
- sql加载配置文件时出错:_SQL复制:基本设置和配置
sql加载配置文件时出错: This is article is a continuation of the previous: SQL Server replication: Overview of ...
最新文章
- Redis集群:sharding策略
- 10-线程,进程,协程,IO多路复用
- RESTful 架构风格概述
- dataframe中将一列数据切分成多列
- 康纳的表情包(思维)
- springboot快速入门(一)——HelloWorld搭建
- 韩企全球首造72层3D NAND芯片 下半年或量产
- Vivado工程路径太长导致不能生成bit文件
- php function curl token_最全PHP代码规范
- layer 关闭父页面 刷新
- oc代码混淆_OC代码混淆工具
- 机器学习基础(八)——感知机(iterative optimization)
- transformer李宏毅讲解视频及decoder讲解
- 《linux c编程指南》学习手记2
- Android Q 添加GMS包
- 关于网站icon小图标在网站上不显示的问题解决办法
- 戴尔笔记本开机logo进度条时间长的解决办法
- Python采集手机4K壁纸,又是一个练手小案例,也不用担心没壁纸换咯
- c#中将一个实体类复制到另一个实体类
- Linux aarch64交叉编译之 assimp模型库