当前位置: 首页 > news >正文

【IDEA使用maven package时,出现依赖不存在以及无法从仓库获取本地依赖的问题】

Install Parent project

在这里插入图片描述
在这里插入图片描述

C:\Users\lxh\.jdks\corretto-1.8.0_362\bin\java.exe -Dmaven.multiModuleProjectDirectory=D:\学习\projectFile\study\study_example_service "-Dmaven.home=D:\Program Files\JetBrains\IntelliJ IDEA2021\plugins\maven\lib\maven3" "-Dclassworlds.conf=D:\Program Files\JetBrains\IntelliJ IDEA2021\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=D:\Program Files\JetBrains\IntelliJ IDEA2021\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA2021\lib\idea_rt.jar=63004:D:\Program Files\JetBrains\IntelliJ IDEA2021\bin" -Dfile.encoding=UTF-8 -classpath "D:\Program Files\JetBrains\IntelliJ IDEA2021\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;D:\Program Files\JetBrains\IntelliJ IDEA2021\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2021.1 -s D:\software\apache-maven-3.8.4\conf\settings.xml -Dmaven.repo.local=D:\software\apache-maven-3.8.4\mvn_resp -DskipTests=true package
[WARNING] 
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'blocked' (position: START_TAG seen ...</url>\r\n      <blocked>... @184:16)  @ D:\software\apache-maven-3.8.4\conf\settings.xml, line 184, column 16
[WARNING] 
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------< com.lxh:study_example_service >--------------------
[INFO] Building study_example_service 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.lxh:study_common:jar:1.0.0 is missing, no dependency information available
[WARNING] The POM for com.lxh:study_dao:jar:1.0.0 is missing, no dependency information available
[WARNING] The POM for com.lxh:study_utils:jar:1.0.0 is missing, no dependency information available
[WARNING] The POM for com.alibaba:druid:jar:1.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The artifact mysql:mysql-connector-java:jar:8.0.32 has been relocated to com.mysql:mysql-connector-j:jar:8.0.32
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.503 s
[INFO] Finished at: 2023-11-01T17:38:52+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project study_example_service: Could not resolve dependencies for project com.lxh:study_example_service:jar:1.0.0: The following artifacts could not be resolved: com.lxh:study_common:jar:1.0.0, com.lxh:study_dao:jar:1.0.0, com.lxh:study_utils:jar:1.0.0: Failure to find com.lxh:study_common:jar:1.0.0 in http://maven.aliyun.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are forced -> [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

解决

在父项目(root)pom依赖中加入<pluginManagement></pluginManagement>标签,之前没加。

    <build><pluginManagement><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins></pluginManagement></build>

相关博客:
https://blog.csdn.net/qq_39826207/article/details/123917550
https://blog.csdn.net/qq_41988159/article/details/124761291
maven<pluginManagement>标签的作用:
https://blog.csdn.net/qq_27022241/article/details/108978554?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522169890834816777224460914%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=169890834816777224460914&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduend~default-1-108978554-null-null.142v96pc_search_result_base6&utm_term=pluginmanagement%E6%A0%87%E7%AD%BE&spm=1018.2226.3001.4187

觉得对你有帮助点个赞哦爱你

http://www.lryc.cn/news/216933.html

相关文章:

  • Flink 统计接入的数据量-滚动窗口和状态的使用
  • SpringBoot快速整合canal1.1.5(TCP模式)
  • docker打包container成image,然后将image上传到docker hub
  • 设计模式—创建型模式之原型模式
  • Zygote进程通信为什么用Socket而不是Binder?
  • API接口加密,解决自动化中登录问题
  • COCOS2DX3.17.2 Android升级targetSDK30问题解决方案
  • HarmonyOS鸿蒙原生应用开发设计- 隐私声明
  • 【面试精选】00后卷王带你三天刷完软件测试面试八股文
  • k-means算法c++实现
  • oracle查询哪些用户下有表
  • 机器人连杆惯量参数辨识(估计)
  • 一座 “数智桥梁”,华为助力“天堑变通途”
  • C#知识总结 基础篇(上)
  • 照片编辑软件Affinity Photo 2 for Mac v2.1.1中文激活版 2024年最新中文版下载
  • TPAMI 2023 | Temporal Perceiver:通用时序边界检测方法
  • Unity-UV展开工具
  • springboot actuator jvm监控丢失
  • UDP服务端和客户端通信代码开发流程
  • 数据库实验:SQL的数据定义与单表查询
  • P3398 仓鼠找 sugar
  • C# 发送邮件
  • Zeal下载文档慢的问题
  • HR模块开发(1):简单的开发流程和注意事项
  • 创建Vue实例
  • 2024上海国际人工智能展(CSITF)以“技术,让生活更精彩”为核心理念,以“创新驱动发展,保护知识产权,促进技术贸易”为主题
  • Vue3使用Monaco-editor
  • java 根据ip获取到城市 GeoLite2-City.mmdb
  • kaggle使用说明
  • BUUCTF FLAG 1