Having problems with maven bom files

I’m using

implementation org.springframework.boot:spring-boot-dependencies:2.0.3.RELEASE

to import a maven bom file however when the pom file is generated for the artifact this gets included in the file:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.0.3.RELEASE</version>
<scope>runtime</scope>
</dependency>

now if I use this dependency in a maven project it fails since it is looking for a jar artifact not a pom
, is this a bug how gradle handles pom files from maven?

I would’ve expected

<dependencyManagement>
   <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-dependencies</artifactId>
      <version>2.0.3.RELEASE</version>
      <scope>import</scope>
   </dependency>
</dependencyManagement>

Totally agree, I wouldn’t expect it to import a jar artifact in that case, I was able to excluded it in the pom file that using dependency and that did the trick of course but it is just a workaround

so Artifact A uses the spring-boot-dependecy

Articat B (a maven project) uses A as a dependency I exclude spring-boot-dependecies and it works other wise fails

Which version of Gradle are you using? I’m assuming 4.6+?

https://docs.gradle.org/4.6/release-notes.html#bom-import

Yes correct I’m using 4.8…
Maybe you could also take a look at this: Having problems setting IMPROVED_POM_SUPPORT feature

IMPROVED_POM_SUPPORT is not what you want if you like to use Spring.

Spring and Gradle developers disagree on BOM semantics:

Gradle 4.6 built-in BOM resolution breaks Spring’s BOMs.

It is exactly what I want to use and it works fine except for that