Gradle catalog does not work correctly with spring boot project

I have a libs.version.toml file as

[versions]
boot-version = '3.1.4'
cloud-version = '2022.0.4'
openapi-version = '2.2.0'

[libraries]
spring-boot-bom = { module = "org.springframework.boot:spring-boot-dependencies", version.ref = "boot-version" }
spring-boot-actuator = { module = 'org.springframework.boot:spring-boot-starter-actuator' }
spring-boot-data-jpa = { module = 'org.springframework.boot:spring-boot-starter-data-jpa' }
spring-boot-data-redis = { module = 'org.springframework.boot:spring-boot-starter-data-redis' }
spring-boot-security = { module = 'org.springframework.boot:spring-boot-starter-security' }
spring-boot-oauth2-resource-server = { module = 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' }
spring-boot-test = { module = 'org.springframework.boot:spring-boot-starter-test' }
spring-boot-validation = { module = 'org.springframework.boot:spring-boot-starter-validation' }
spring-boot-web = { module = 'org.springframework.boot:spring-boot-starter-web' }
spring-boot-web-services = { module = 'org.springframework.boot:spring-boot-starter-web-services' }

spring-cloud-bom = { module = 'org.springframework.cloud:spring-cloud-dependencies', version.ref = 'cloud-version' }
spring-cloud-bootstrap = { module = 'org.springframework.cloud:spring-cloud-starter-bootstrap' }
spring-cloud-config = { module = 'org.springframework.cloud:spring-cloud-starter-config' }
spring-cloud-eureka-client = { module = 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' }
spring-cloud-openfeign = { module = 'org.springframework.cloud:spring-cloud-starter-openfeign' }

spring-kafka = { module = 'org.springframework.kafka:spring-kafka' }

spring-session-data-redis = { module = "org.springframework.session:spring-session-data-redis", version = "3.1.2" }

openapi = { module = 'org.springdoc:springdoc-openapi-starter-webmvc-ui', version.ref = 'openapi-version' }
oracle = { module = 'com.oracle.database.jdbc:ojdbc8' }

h2 = { module = 'com.h2database:h2' }
poi-ooxml = { module = 'org.apache.poi:poi-ooxml', version = '5.2.4' }

[bundles]
microservice = ['openapi', 'spring-boot-actuator', 'spring-boot-data-jpa', 'spring-boot-validation', 'spring-boot-web',
    'spring-cloud-config', 'spring-cloud-eureka-client', 'spring-cloud-bootstrap', 'oracle']

[plugins]
spring-boot-plugin = { id = 'org.springframework.boot', version.ref = 'boot-version' }
spring-dependency-management-plugin = { id = 'io.spring.dependency-management', version = '1.1.3' }

and I publish it to our company nexus with maven-publish plugin,

Then I have a spring boot microservice, with following build.gradle:

plugins {
    id 'java'
    alias(libs.plugins.spring.boot.plugin)
    alias(libs.plugins.spring.dependency.management.plugin)
}

group = 'my.project.name'
version = '6.0.0'
sourceCompatibility = JavaVersion.VERSION_17

dependencies {
    implementation platform(libs.spring.cloud.bom)
    implementation libs.bundles.microservice

    compileOnly libs.lombok
    testCompileOnly libs.lombok
    annotationProcessor libs.lombok
    testAnnotationProcessor libs.lombok

    testImplementation libs.spring.boot.test
    testRuntimeOnly libs.h2
}

test {
    useJUnitPlatform()
    jvmArgs = ["-Xss8m"]
}

when I create Spring boot fat jar many of dependencies are missing, but when I add them by name they are not missing. Why this happens?

Besides that you should not use the Spring Dependency Management plugin - it is a relict from times when Gradle had no built-in BOM support, does more harm than good, and even the maintainer of that plugin recommends not to use it anymore - which dependencies are missing?

Also, in your microservice bundle you reference openapi, but that library is not defined in the catalog. Same for oracle.

I dropped some parts of the toml file for the forum, and accidentally dropped oracle and openapi too, they really exist in .toml file. The test cases pass, so gradle test resolve them correctly, but no spring-boot-starter*.jar (and most of their dependencies) are missed from the fat jar, but spring-cloud-starter-*.jar files are included in the fat jar.

The toml file which is published to nexus contains version=“” for all dependencies which miss version, so I have added version to all dependencies in toml file, and still no luck!

I dropped spring-dependency-management plugin, and added spring “org.springframework.boot:spring-boot-dependencies” as a platform dependency, and still no luck

Then it is hard to guess, can you knit an MCVE?