Skip to content

Gradle build fails with ConflictingConstraintsException when a platform BOM declares classifier-scoped versions #55456

Description

@xstefank

Describe the bug

A Maven BOM can validly declare the same groupId:artifactId at different versions per (e.g. a native artifact pinned for one platform, deferring to the upstream version for others) — Maven resolves classifiers independently so there's no real conflict, but Gradle's BOM import collapses into a single no classifier aware version constraint per group:artifact, so consuming such a BOM via implementation enforcedPlatform(...) throws ConflictingConstraintsException ("No version satisfies the constraints") on any task resolving the runtime/deployment classpath, even though the identical project builds fine with Maven.

This is mostly relevant if the BOM we ship really contains different versions per classifier, like it does in RH - https://code.quarkus.redhat.com/.

Expected behavior

Gradle runs the same way as Maven.

Actual behavior

No response

How to Reproduce?

  1. Download the https://code.quarkus.redhat.com/d?b=GRADLE&e=rest&cn=code.quarkus.redhat.com codestart
  2. Unzip the codestart
  3. Executed the ./gradlew --console=plain quarkusDev

The exact same project with Maven (https://code.quarkus.redhat.com/d?e=rest&cn=code.quarkus.redhat.com) works without any issues.

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions