idea系列之-Repositories Update Error

本文讲述了在IntelliJ IDEA中遇到RepositoriesError的问题,通过分析发现旧的HTTP镜像仓库不再可用,转向阿里云Maven配置,分享了详细的设置步骤和解决过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


前言

Idea是一款十分便捷,操控性很强的开发工具,十分稳健,今天出现个问题,不是工具的问题,Maven仓库以前配置的镜像仓库失效了。这个问题以后难免还会出现,记录一下求个心安。


一、Repositories Error?

示例:如图所示Idea 以前的镜像不起作用了,这是我下载最新的资源才发现的问题,因为以前本地仓库该有的Jar包都有,所以这个问题不曾出现。

在这里插入图片描述


二、问题分析

  1. 之前的镜像配置都是采用Http协议访问,现在很多镜像仓库都采用了安全传输的Https协议,导致以前的镜像仓库配置失效。
  2. 即之前的Setting Repositories->Url 都是Http协议开头的,我改成Https协议的自己用浏览器访问了一下,可以访问。
  3. 但是一顿操作猛如虎,经过多方尝试一直Repositories Update Error
  4. 最后还是决定使用阿里云镜像得了
  5. 阿里云-Maven配置指南
    在这里插入图片描述6. 配置完以后可以看到Idea的File | Settings | Build, Execution, Deployment | Remote Jar Repositories成功加载了阿里云镜像仓库。
    在这里插入图片描述7. 没有报错了
    在这里插入图片描述8. Jar包也正常下载没有报错了
    在这里插入图片描述

三、Setting文件配置

Setting文件内容(示例):

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

    <localRepository>D:\apache-maven-3.3.9\repository</localRepository>
    
    <mirrors>
	  	<mirror>
			  <id>aliyunmaven</id>
			  <mirrorOf>*</mirrorOf>
			  <name>阿里云公共仓库</name>
			  <url>https://maven.aliyun.com/repository/public</url>
			</mirror>
    </mirrors>
</settings>


总结

我是一个开发老鸟了,碰到这种问题有思路解决,但是解决过程还是不如人意,感觉应该这样配置就没有问题,但是实际操作,问题解决不了,还得多尝试才能解决问题。上面的配置很简洁了,希望后面不要出现问题,哈哈!!!

C:\Users\Administrator\.jdks\semeru-1.8.0_462\bin\java.exe -Dmaven.multiModuleProjectDirectory=C:\Users\Administrator\Desktop\大三\springcloud\SpringCloudDianShang-main\goods-consumer -Djansi.passthrough=true -Dmaven.home=D:\ideaIU-2024.2.1.win\plugins\maven\lib\maven3 -Dclassworlds.conf=D:\ideaIU-2024.2.1.win\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=D:\ideaIU-2024.2.1.win\plugins\maven\lib\maven-event-listener.jar -javaagent:D:\ideaIU-2024.2.1.win\lib\idea_rt.jar=53552:D:\ideaIU-2024.2.1.win\bin -Dfile.encoding=UTF-8 -classpath D:\ideaIU-2024.2.1.win\plugins\maven\lib\maven3\boot\plexus-classworlds-2.8.0.jar;D:\ideaIU-2024.2.1.win\plugins\maven\lib\maven3\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2024.2.1 -s D:\maven\maven-3.5.0\conf\settings.xml -Dmaven.repo.local=D:\maven\maven-3.5.0\repository install [INFO] Scanning for projects... [INFO] [INFO] ---------------------< com.itheima:goods-consumer >--------------------- [INFO] Building goods-consumer 0.0.1-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [WARNING] The POM for com.itheima.B2B:common-module:jar:0.0.1-SNAPSHOT is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.101 s [INFO] Finished at: 2025-06-11T23:17:15+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project goods-consumer: Could not resolve dependencies for project com.itheima:goods-consumer:jar:0.0.1-SNAPSHOT [ERROR] dependency: com.itheima.B2B:common-module:jar:0.0.1-SNAPSHOT (compile) [ERROR] com.itheima.B2B:common-module:jar:0.0.1-SNAPSHOT was not found in https://repo.spring.io/milestone during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spring-milestones has elapsed or updates are forced [ERROR] [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException 进程已结束,退出代码为 1
06-12
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值