Hi, I'm building our code with Spring Boot 4.0.0-RC2 pre-release and I'm seeing org.apache.kafka:kafka_2.12 managed version being set to 4.1.0 but there is no such release in maven central for kafka_2.12. Does this instead need to be at 3.9.1 (latest currently in central) or removed?

Here's an example pom that demonstrates this problem;

<?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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>4.0.0-RC2</version>
    </parent>
    <groupId>org.example</groupId>
    <artifactId>kafka_2.12-issue</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>


    <dependencies>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka_2.12</artifactId>
        </dependency>
    </dependencies>
</project>
[ERROR] Failed to execute goal on project kafka_2.12-issue: Could not resolve dependencies for project org.example:kafka_2.12-issue:jar:1.0-SNAPSHOT
[ERROR] dependency: org.apache.kafka:kafka_2.12:jar:4.1.0 (compile)
[ERROR]         Could not find artifact org.apache.kafka:kafka_2.12:jar:4.1.0 in central (https://repo.maven.apache.org/maven2)

Comment From: scottfrederick

Support for the Scala 2.12 build of Kafka was removed in Kafka 4.0. Spring Boot dependency management should not include kafka_2.12 in the list of libraries managed with Kafka 4.1.0.

Can you upgrade your build to use org.apache.kafka:kafka_2.13 instead? If you're only using Java and not using Scala you can use org.apache.kafka:kafka-clients instead.

Comment From: cmakinen

Thank you! We cannot upgrade to it as it is a transitive dependency from a third party library. We're in the process of removing the dependence of the third party library itself. We'll be managing the version as 3.9.1 in the interim.

Just wanted to bring this up. Please feel free to close the issue when you're able to.

Comment From: snicoll

@cmakinen thanks, this is indeed a problem in our dependency management that we need to fix.

Closing in favor of PR #47991 - Thanks Scott!