idea maven下载异常,报错 Cannot access alimaven (http://maven.aliyun.com/nexus/content/groups/public/)

本文描述了在使用Maven时遇到的错误,特别是在阿里云Nexus离线模式下无法下载SpringCloud和其他依赖包的问题,提供了去掉工作离线模式并指定本地仓库路径的解决方案,以及针对其他常见问题的处理方法。

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

1.maven下载报错信息

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Cannot access alimaven (http://maven.aliyun.com/nexus/content/groups/public/) in offline mode and the artifact org.springframework.cloud:spring-cloud-dependencies:pom:2021.0.3 has not been downloaded from it before. @ line 54, column 25
[ERROR] Non-resolvable import POM: Cannot access alimaven (http://maven.aliyun.com/nexus/content/groups/public/) in offline mode and the artifact cn.hutool:hutool-bom:pom:5.8.2 has not been downloaded from it before. @ line 313, column 25
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-bootstrap:jar is missing. @ line 347, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-test:jar is missing. @ line 352, column 21
[ERROR] 'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 365, column 21
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.vpp:vpp-iot:3.5.0 (E:\1_workSpace\***\pom.xml) has 7 errors
[ERROR]     Non-resolvable import POM: Cannot access alimaven (http://maven.aliyun.com/nexus/content/groups/public/) in offline mode and the artifact org.springframework.cloud:spring-cloud-dependencies:pom:2021.0.3 has not been downloaded from it before. @ line 54, column 25 -> [Help 2]
[ERROR]     Non-resolvable import POM: Cannot access alimaven (http://maven.aliyun.com/nexus/content/groups/public/) in offline mode and the artifact com.alibaba.cloud:spring-cloud-alibaba-dependencies:pom:2021.0.1.0 has not been downloaded from it before. @ line 63, column 25 -> [Help 2]
[ERROR]     Non-resolvable import POM: Cannot access alimaven (http://maven.aliyun.com/nexus/content/groups/public/) in offline mode and the artifact org.springframework.boot:spring-boot-dependencies:pom:2.7.2 has not been downloaded from it before. @ line 86, column 25 -> [Help 2]
[ERROR]     Non-resolvable import POM: Cannot access alimaven (http://maven.aliyun.com/nexus/content/groups/public/) in offline mode and the artifact cn.hutool:hutool-bom:pom:5.8.2 has not been downloaded from it before. @ line 313, column 25 -> [Help 2]
[ERROR]     'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-bootstrap:jar is missing. @ line 347, column 21
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-test:jar is missing. @ line 352, column 21
[ERROR]     'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 365, column 21
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Process finished with exit code 1

2.问题原因

请添加图片描述

3.解决方案

解决 去掉work offline的勾选选项,只勾选本地仓库路径,保存确定,重新下载即可

4.其他问题

1.下载源码出现:Decompiled .class file ,右下角出现Cannot download sources Sources not found for: xxx
解决办法:
在对应项目pom.xml所在目录下执行以下命令:

mvn dependency:resolve -Dclassifier=sources

2.Maven Helper插件命令记录
clean -T 1C -Dmaven.compile.fork=true
clean package -T 1C -Dmaven.test.skip=true -Dmaven.compile.fork=true
compile -T 1C -Dmaven.test.skip=true -Dmaven.compile.fork=true
clean install package -Dmaven.test.skip=true
dependency:resolve -Dclassifier=sources
3.如果无法成功下载可以尝试,勾选下面三个选型,清除本地maven库重新下载即可!
在这里插入图片描述

D:\home\jdk11\bin\java.exe -Dmaven.multiModuleProjectDirectory=D:\showndoc\haikongweishi -Dmaven.home=D:\home\apache-maven-3.6.0 -Dclassworlds.conf=D:\home\apache-maven-3.6.0\bin\m2.conf "-Dmaven.ext.class.path=D:\home\IntelliJ IDEA 2021.1.3\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\home\IntelliJ IDEA 2021.1.3\lib\idea_rt.jar=59520:D:\home\IntelliJ IDEA 2021.1.3\bin" -Dfile.encoding=UTF-8 -classpath D:\home\apache-maven-3.6.0\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2021.1.3 --offline -s D:\home\apache-maven-3.6.0\conf\settings.xml -Dmaven.repo.local=D:\home\apache-maven-3.6.0\mvn_resp install [INFO] Scanning for projects... [INFO] [INFO] -----------------------< com.dwi:haikongweishi >------------------------ [INFO] Building haikongweishi 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [WARNING] The POM for org.apache.maven.plugins:maven-shade-plugin:jar:3.2.1 is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.240 s [INFO] Finished at: 2023-06-08T13:09:36+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-shade-plugin:3.2.1 or one of its dependencies could not be resolved: Cannot access alimaven (http://maven.aliyun.com/nexus/content/groups/public/) in offline mode and the artifact org.apache.maven.plugins:maven-shade-plugin:jar:3.2.1 has not been downloaded from it before. -> [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/PluginResolutionException Process finished with exit code 1
06-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

java攻城狮1024

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值