私有库 nexus Dependency ‘SNAPSHOT‘ not found

文章讲述了开发者在使用私有库Nexus时遇到的SNAPSHOT依赖找不到的问题,原因是仅在dependencyManagement中声明了引用,而未在dependencies中实际指定。作者强调了基础设置的重要性,提醒大家注意在Maven中正确配置依赖关系。

私有库 nexus 提示 Dependency 'SNAPSHOT' not found

jar包无法下载,困扰了很久,后来才发现,是因为只在 dependencyManagement 里写了引用,没有在具体的  dependencies 里引用,导致无法获取到jar包,低级错误,以后要避免。还是基础不牢,浪费自己的时间。

dependencyManagement 只是管理引用的,并不真正的引用jar包。

真正需要引用,得在单独的 dependencies 节点里引用。

参考:Maven中关于dependencyManagement和普通dependencies的区别_dependencymanagement 下会导入jar包吗-CSDN博客

[INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.431 s [INFO] Finished at: 2025-07-07T16:56:29+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project tsp_group_api-graphflow: Could not resolve dependencies for project com.sankuai.tsp.group:tsp_group_api-graphflow:jar:1.0-SNAPSHOT [ERROR] dependency: com.sankuai.tsp.group:tsp_group_api-common:jar:1.0-SNAPSHOT (compile) [ERROR] Could not find artifact com.sankuai.tsp.group:tsp_group_api-common:jar:1.0-SNAPSHOT in meituan-offline-releases (http://maven.offline.sankuai.com/nexus/content/groups/public) [ERROR] com.sankuai.tsp.group:tsp_group_api-common:jar:1.0-SNAPSHOT was not found in http://pixel.sankuai.com/repository/mtdp during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of meituan-dianping has elapsed or updates are forced [ERROR] dependency: com.sankuai.tsp.group:phfc_group_integration-infra:jar:1.0-SNAPSHOT (compile) [ERROR] Could not find artifact com.sankuai.tsp.group:phfc_group_integration-infra:jar:1.0-SNAPSHOT in meituan-offline-releases (http://maven.offline.sankuai.com/nexus/content/groups/public) [ERROR] com.sankuai.tsp.group:phfc_group_integration-infra:jar:1.0-SNAPSHOT was not found in http://pixel.sankuai.com/repository/mtdp during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of meituan-dianping has elapsed or updates are forced [ERROR] dependency: com.sankuai.tsp.group:phfc_guide_integration-infra:jar:1.0-SNAPSHOT (compile) [ERROR] Could not find artifact com.sankuai.tsp.group:phfc_guide_integration-infra:jar:1.0-SNAPSHOT in meituan-offline-releases (http://maven.offline.sankuai.com/nexus/content/groups/public) [ERROR] com.sankuai.tsp.group:phfc_guide_integration-infra:jar:1.0-SNAPSHOT was not found in http://pixel.sankuai.com/repository/mtdp during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of meituan-dianping has elapsed or updates are forced [ERROR] dependency: com.sankuai.tsp.group:phfc_general_integration-infra:jar:1.0-SNAPSHOT (compile) [ERROR] Could not find artifact com.sankuai.tsp.group:phfc_general_integration-infra:jar:1.0-SNAPSHOT in meituan-offline-releases (http://maven.offline.sankuai.com/nexus/content/groups/public) [ERROR] com.sankuai.tsp.group:phfc_general_integration-infra:jar:1.0-SNAPSHOT was not found in http://pixel.sankuai.com/repository/mtdp during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of meituan-dianping 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
07-08
[ERROR] Failed to execute goal on project ruoyi-admin: Could not resolve dependencies for project com.ruoyi:ruoyi-admin:jar:4.8.0 [ERROR] dependency: com.ruoyi:ruoyi-framework:jar:4.8.0 (compile) [ERROR] com.ruoyi:ruoyi-framework:jar:4.8.0 was not found in https://maven.aliyun.com/repository/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of public has elapsed or updates are forced [ERROR] com.ruoyi:ruoyi-framework:jar:4.8.0 was not found in https://maven.aliyun.com/nexus/content/groups/public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of alimaven has elapsed or updates are forced [ERROR] dependency: com.ruoyi:ruoyi-quartz:jar:4.8.0 (compile) [ERROR] com.ruoyi:ruoyi-quartz:jar:4.8.0 was not found in https://maven.aliyun.com/repository/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of public has elapsed or updates are forced [ERROR] com.ruoyi:ruoyi-quartz:jar:4.8.0 was not found in https://maven.aliyun.com/nexus/content/groups/public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of alimaven has elapsed or updates are forced [ERROR] dependency: com.ruoyi:ruoyi-generator:jar:4.8.0 (compile) [ERROR] com.ruoyi:ruoyi-generator:jar:4.8.0 was not found in https://maven.aliyun.com/repository/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of public has elapsed or updates are forced [ERROR] com.ruoyi:ruoyi-generator:jar:4.8.0 was not found in https://maven.aliyun.com/nexus/content/groups/public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the
07-09
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值