使用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
分析过程如下:
- 查看文件spring-boot-dependencies-2.0.0.RELEASE.pom, line 585, column 25的内容如下图:
- 查看maven官网的仓库发现jackson-bom:pom:2.6.2版本已经不存在了,如下图所示:
解决方法:
修改项目pom文件里面jackson.version的版本为存在的版本。
修改前为:
<properties>
<jackson.version>2.6.2</jackson.version>
</properties>
修改后为:
<properties>
<jackson.version>2.9.6</jackson.version>
</properties>
修改好后,重新编译,问题解决