[incubator-kie-6902] Inherit the platform versions from the kie stack BOMs (Quarkus and Spring Boot examples) - #2244
Conversation
…perties and hardcode groupId
…ingboot aggregators
jomarko
left a comment
There was a problem hiding this comment.
Looks good to me, I did not manual testing.
| <failsafe.exclude>**/Native*IT.java</failsafe.exclude> | ||
| <alphanetworkCompilerEnabled>false</alphanetworkCompilerEnabled> | ||
| <tests.category></tests.category> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
There was a problem hiding this comment.
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
There was a problem hiding this comment.
Leftover from moving the config out of the root pom. Removed the duplicate, kept the one at line 106.
| <dependencyManagement> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>${quarkus.platform.group-id}</groupId> | ||
| <artifactId>${quarkus.platform.artifact-id}</artifactId> | ||
| <version>${quarkus.platform.version}</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| </dependencies> | ||
| </dependencyManagement> |
There was a problem hiding this comment.
This block is empty and could be removed
There was a problem hiding this comment.
Right, those are leftovers from dropping the platform BOM import. Removed the empty blocks — also in onboarding-example/payroll/pom.xml, which had the same leftover but wasn't flagged.
| <properties> | ||
| <quarkus-plugin.version>3.27.5.1</quarkus-plugin.version> | ||
| <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> | ||
| <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id> | ||
| <quarkus.platform.version>3.27.5.1</quarkus.platform.version> |
There was a problem hiding this comment.
This block is empty and could be removed
There was a problem hiding this comment.
Same block as above — removed.
| <properties> | ||
| <quarkus-plugin.version>3.27.5.1</quarkus-plugin.version> | ||
| <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> | ||
| <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id> | ||
| <quarkus.platform.version>3.27.5.1</quarkus.platform.version> | ||
| </properties> | ||
| <dependencyManagement> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>${quarkus.platform.group-id}</groupId> | ||
| <artifactId>${quarkus.platform.artifact-id}</artifactId> | ||
| <version>${quarkus.platform.version}</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| </dependencies> | ||
| </dependencyManagement> |
There was a problem hiding this comment.
Removed here too, along with the same empty blocks in onboarding-example/payroll/pom.xml.
| <version>${version.org.springframework.boot}</version> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-resources-plugin</artifactId> | ||
| <version>2.5</version> |
There was a problem hiding this comment.
| <version>2.5</version> | |
| <version>${version.resources.plugin}</version> |
I think we need to get it from BOM rather than hardcoding
There was a problem hiding this comment.
Agreed. Worth noting the 2.5 was already hardcoded in the old examples root pom — this PR only moved the block — but since we now inherit from the kie BOM chain, ${version.resources.plugin} (3.1.0) resolves fine. Applied it here and in kogito-quarkus-examples/pom.xml, which had the same hardcode.
| <configuration> | ||
| <skip>true</skip> | ||
| </configuration> |
There was a problem hiding this comment.
If we are defining the enforcer, why do we need to skip
There was a problem hiding this comment.
We’re not defining the enforcer here; the skip was already present in the old root POM, and this PR only merged duplicate declarations.
Removing our block doesn’t disable it — it’s inherited from kie-parent/kogito-build-no-bom-parent, and I verified the rules still run and fail.
I tested skipping only the two incompatible rules; the remaining rules work but expose 4 existing dependency violations that need fixing.
I’ll handle those in a follow-up PR if needed, enable the 3 workable rules, and clean up the now-dead enforce-versions config.
| <configuration> | ||
| <skip>true</skip> | ||
| </configuration> |
There was a problem hiding this comment.
Same as the Quarkus aggregator — this shows as new only because the shared build config moved out of the root pom; the skip itself is pre-existing.
Issue: apache/incubator-kie#6902
Related: apache/incubator-kie#6903 (Quarkus 3.33.3.1 upgrade)
Why
Every Quarkus example pinned Quarkus 3.27.5.1 in its own pom (version properties, its own
quarkus-bomimport, explicit
quarkus-maven-pluginversion). Two problems:no longer supports (each repo's PR builds the other repo's
main).MongoDB / ProtoStream versions and ten modules fail — the red examples job on #6903.
kogito-quarkus-bomalready definesversion.io.quarkusand managesquarkus-maven-plugin(bom-splittingdesign). The examples only imported it, which carries dependency management but not the plugin version
or the property — so they were never able to inherit the version.
What changed
kogito-quarkus-examples/pom.xml: parent is noworg.kie.kogito:kogito-quarkus-bom;kogito-springboot-examples/pom.xml: parent is noworg.kie.kogito:kogito-spring-boot-bom. Eachaggregator keeps its apps BOM import and carries the examples' shared build configuration (test
wiring, container image and resource properties, enforcer skip, compiler release, jar/source
manifests, reproducible-build settings, project metadata) — a pom has a single parent, so that
configuration cannot come from the examples root anymore. The two copies are marked to be kept in sync.
pom.xml: reduced to a plain module list (metadata, reproducible-build settings,enforcer skip); nothing else inherits its build configuration any longer (the Java examples are
standalone poms, the Gradle wrappers only run Gradle).
quarkus-bomimport and plugin<version>deleted; the
quarkus-maven-plugingroupId is written literally (io.quarkus) and the now-unusedquarkus.platform.group-id/quarkus.platform.artifact-idproperties dropped — with a property as theplugin groupId Maven cannot see the managed version during raw-model validation and warns on every
module. 19 Spring Boot example poms:
spring-boot-maven-plugin<version>deleted. The Spring Bootaggregator's own
version.org.springframework.bootandversion.io.nettypins are gone too (both nowinherited from the BOM).
onboarding-example/pom.xml: its version-lesspluginManagemententry forquarkus-maven-pluginremoved (it shadowed the BOM's entry and made those modules fall back to the latest plugin).
No Quarkus or Spring Boot version is written anywhere in the Maven examples; no incubator-kie change needed.
The only remaining literals are the four Gradle examples'
gradle.properties(quarkusPluginVersion/quarkusPlatformVersion3.27.5.1,springBootVersion4.0.7): Gradle cannot inherit from a Maven parent,and the
gradle-examplesCI job does not drive Gradle, so they are inert in CI. They still need a manualbump once #6903 merges (2 lines × 2 files for Quarkus).
Effect
main: resolves to the same 3.27.5.1 — no functional change.examples through version mismatches anymore.
Verification
configuration identical for Quarkus and Spring Boot (only additions: the inherited BOM properties and,
for Spring Boot, the BOM's four compile-scope dependencies that were already on the classpath — resolved
runtime dependencies identical, 245/245). The Java examples are standalone poms and the Gradle wrappers
never used the removed root configuration (effective poms unchanged / only kie defaults visible).
state): 81/81 modules, 152 suites, 0 failures; all 62
quarkus:buildexecutions on 3.33.3.1 fromthe BOM, including the ten modules that fail on #6903's examples job today; zero
plugin.version is missingwarnings.-Dspringboot, with unit + integration tests — note thekogito-springboot-examplesCI job only builds the aggregator pom, as that profile is not active by default): 35/35 modules,
0 failures, every
spring-bootplugin run on 4.0.7 from the BOM.