Jackson team published a broken pom, and apparently spring team followed.
The following pom won't compile:
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>${jackson-bom.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
With error
Could not resolve dependencies for project com.example:demo:jar:0.0.1-SNAPSHOT: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.13.2.20220328 was not found in https://repo.maven.apache.org/maven2
It works for 2.6.5 release.
Comment From: wilkinsona
There's no guarantee that the bom's version and individual module versions will be the same. You are using the bom version to configure the version of an individual module so your build will break whenever the bom's version and an individual module's version don't align.
jackson-dataformat-xml is included in Boot's dependency management (through jackson-bom) so there's no need to configure the version when declaring the dependency:
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
</dependency>