使用Maven编译spring boot报错找不到jackson-bom:pom:2.6.2

在使用Maven编译Spring Boot项目时遇到错误,提示找不到jackson-bom:pom:2.6.2。原因是该版本在Maven仓库中已不存在。解决方案是更新项目pom.xml中jackson.version的版本号,将其改为可用版本,从而成功编译项目。

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

使用Maven编译spring boot报错找不到jackson-bom:pom:2.6.2

错误信息如下:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Failure to find com.fasterxml.jackson:jackson-bom:pom:2.6.2 in https://repo.spring.io/milestone was cached in the local repository, resolution will not be reattempted until the update interval of spring-milestone has elapsed or updates are forced @ org.springframework.boot:spring-boot-dependencies:2.0.0.RELEASE, repository\org\springframework\boot\spring-boot-dependencies\2.0.0.RELEASE\spring-boot-dependencies-2.0.0.RELEASE.pom, line 585, column 25
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]     Non-resolvable import POM: Failure to find com.fasterxml.jackson:jackson-bom:pom:2.6.2 in https://repo.spring.io/milestone was cached in the local repository, resolution will not be reattempted until the update interval of spring-milestone has elapsed or updates are forced @ org.springframework.boot:spring-boot-dependencies:2.0.0.RELEASE, repository\org\springframework\boot\spring-boot-dependencies\2.0.0.RELEASE\spring-boot-dependencies-2.0.0.RELEASE.pom, line 585, column 25 -> [Help 2]
[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

翻译关键信息如下:

[错误] [错误]处理POM时遇到一些问题:
[错误]导入的POM不可解析:找不到com.fasterxml.jackson:jackson-bom:pom:2.6.2 在仓库https://repo.spring.io/milestone 被缓存在本地存储库中,在spring-milestone的更新间隔过去或强制更新之前,不会重新尝试解析@ org.springframework.boot:spring-boot-dependencies:2.0.0.RELEASE, repository\org\springframework\boot\spring-boot-dependencies\2.0.0.RELEASE\spring-boot-dependencies-2.0.0.RELEASE.pom, line 585, column 25

分析过程如下:

  1. 查看文件spring-boot-dependencies-2.0.0.RELEASE.pom, line 585, column 25的内容如下图:关键是变量${jackson.version}
  2. 查看maven官网的仓库发现jackson-bom:pom:2.6.2版本已经不存在了,如下图所示:最早的版本为2.6.7

解决方法:
修改项目pom文件里面jackson.version的版本为存在的版本。
修改前为:

<properties>
       <jackson.version>2.6.2</jackson.version>
</properties>

修改后为:

<properties>
        <jackson.version>2.9.6</jackson.version>
</properties>

修改好后,重新编译,问题解决

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值