Improve set-quarkus-version.sh
The script greps all </XXX.version> tags from pom.xml and resolves each against the Quarkus BOM. Out of 132 properties, only 12 match, the rest produce "Failed to resolve" noise.
Naming mismatches
Several properties manage the same artifact as the BOM but under a different name, so the script silently skips them:
| BOM property | KC property | BOM | KC |
|---|---|---|---|
bouncycastle.fips.version |
bouncycastle.bcfips.version |
2.1.3 | 2.1.3 |
bouncycastle.tls.fips.version |
bouncycastle.bctls-fips.version |
2.1.24 | 2.1.25 |
snakeyaml.version |
org.yaml.snakeyaml.version |
2.6 | 2.0 |
angus-mail.version |
angus.mail.version |
2.0.5 | 2.0.5 |
The angus.mail match only works by accident, the dot in the property name acts as a regex wildcard matching the BOM's hyphen. Some mismatches were deliberate, e.g. bcfips or snake IIRC correctly, so a mapping should be opt-in rather than automatic.
Slow property substitution
Each property change spawns a full mvn versions:set-property JVM (~4s per call, ~60s total). These are simple XML text replacements, sed does the same in under a second. The quarkus/pom.xml invocation on line 100 is also redundant, that file has no version properties.
Suggested improvements
- Replace
mvn versions:set-propertywithsed - Suppress unresolved property output or move it behind
--verbose - Add an opt-in mapping for naming mismatches where alignment is desired
- Remove the redundant
quarkus/pom.xmlinvocation
Source: keycloak/keycloak