Linked Questions

Popular Questions

I very often use the following entry

implementation(platform("org.springframework.boot:spring-boot-dependencies:3.0.4"))

It works fine until it comes to maven-publish. The problem is that it also publishes this entry. When I use library in other projects, it transitively connects this platform to my project even though I don't want it to.

Because of this I have to do something like this:

implementation("ru.spliterash:my-library:1.0.0") {
    exclude("org.springframework.boot", "spring-boot-dependencies")
}

Can I make it resolve version conflicts when publishing, so that the published artifact does not have this platform

For example. If I have the following in the project dependencies

implementation(platform("org.springframework.boot:spring-boot-dependencies:3.0.4"))
implementation("org.springframework.boot:spring-boot-starter")

and when artifact published, it would turn into a

implementation("org.springframework.boot:spring-boot-starter:3.0.4")

No platform, and the version is listed as usual. I am referring to this result in the pom and gradle metadata files.

PS: There is a plugin for maven that does exactly what I need Flatten Maven Plugin

Related Questions