quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.72k stars 2.67k forks source link

`io.quarkus:quarkus-bom:3.5.1` contains unresolved versions: `org.jboss:jdk-misc:${version.jdk-misc}` #36952

Closed ppalaga closed 11 months ago

ppalaga commented 11 months ago

Describe the bug

We use a custom BOM flattener in Quarkus CXF and Camel Quarkus that is rather sensitive to broken source BOMs. After the upgrade to Quarkus 3.5.1, it started failing due to version.jdk-misc property being used but not being defined:

[ERROR] Failed to execute goal org.l2x6.cq:cq-maven-plugin:4.4.5:flatten-bom (flatten-bom) on project quarkus-cxf-bom: Execution flatten-bom of goal org.l2x6.cq:cq-maven-plugin:4.4.5:flatten-bom failed: Additional BOM io.quarkus:quarkus-bom:3.5.1 contains unresolved versions:
[ERROR]     - org.jboss:jdk-misc:${version.jdk-misc}

This is caused by https://github.com/jboss/jboss-parent-pom/issues/236 and the fix is underway via https://github.com/jboss/jboss-parent-pom/pull/237

I wonder if there is any way to workaround this on the Quarkus side while waiting for jboss-parent 41? I mean flatten-platform-bom could perhaps be configured to ignore org.jboss:jdk-misc via excludeArtifactKeys. WDYT @aloubyansky ?

ppalaga commented 11 months ago

flatten-platform-bom could perhaps be configured to ignore org.jboss:jdk-misc via excludeArtifactKeys. WDYT @aloubyansky ?

It seems to work. Let me send a PR.

aloubyansky commented 11 months ago

flatten-platform-bom also has filterInvalidConstraints option, which we don't enable by default to save time on builds.

aloubyansky commented 11 months ago

I guess a better fix would be to update to the fixed jboss-parent

ppalaga commented 11 months ago

I guess a better fix would be to update to the fixed jboss-parent

Well, if it is not released before Quarkus 3.6.0, then we'll have to implement a workaround in our flattener.

This change does exactly what we need and I do not see any time penalty: https://github.com/quarkusio/quarkus/pull/36953/files

Another possible workaround would be to add <version.jdk-misc>3.Final</version.jdk-misc> to quarkus BOM.

quarkus-bot[bot] commented 11 months ago

/cc @quarkusio/devtools (maven)

gsmet commented 11 months ago

We have merged a workaround for now.