Maven 聚合工程 Could not find artifact 父模块找不到异常

说明

我们在利用Maven建立一个多模块的聚合工程时,可能会遇到这样的问题,那就是Could not find artifact xxx,并且不能找到的artifact 正是父工程

项目结构

在这里插入图片描述

此图是我聚合工程的一个项目,在对根pom.xml进行打包的时候mvn package报了如下错误
Could not find artifact com.xxx:xxx:xxx in nexus-aliyun (https://maven.aliyun.com/repository/public)

父pom(artifactId:xxx)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <</
  • 11
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
回答: 你遇到的问题是不到org.springframework.boot:spring-boot-maven:pom这个依赖。根据引用\[1\]中的信息,你需要在pom.xml文件中添加spring-boot-starter-web的版本号,例如<version>2.1.2.RELEASE</version>。另外,引用\[2\]和引用\[3\]中提到了一些镜像源的配置信息,你可以尝试更换镜像源来解决这个问题。 #### 引用[.reference_title] - *1* [Could not find artifact org.springframework.boot:spring-boot-starter-web:](https://blog.csdn.net/wobenwoxiangfei/article/details/121347516)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [解决Could not find artifact org.springframework.boot:spring-boot-maven:pom](https://blog.csdn.net/zhs260133172/article/details/113000175)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [Could not find artifact org.springframework.boot:spring-boot-starter-parent](https://blog.csdn.net/lylovejava0/article/details/129686203)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值