maven项目中jackson编译报错:Failure to find com.fasterxml.jackson:jackson-bom:pom

1,005 阅读1分钟

问题描述: spring boot版本为2.2.6.RELEASE,jackson版本为2.7.4,在父maven工程中使用dependencyManagement统一定义,使用了 ${commons-io.version} 的形式管理版本。子maven工程引用了jackson,编译时如下错误:

[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.7.4 in http://maven.aliyun.com/nexus/content/repositories/central/ was cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are forced @ org.springframework.boot:spring-boot-dependencies:2.2.6.RELEASE, C:\mvn_repo\org\springframework\boot\spring-boot-dependencies\2.2.6.RELEASE\spring-boot-dependencies-2.2.6.RELEASE.pom, line 630, column 19

解决办法:

1. 升级 jackson 版本,如 2.10.4 等更新版本
2. 将 ${commons-io.version} 的地方全部换成 2.7.4,可能与高版本的 spring boot 版本存在兼容等问题,不推荐