chore: manage the avro-maven-plugin version in the parent - #5
Merged
Conversation
soon-market-sse-api's native build fails on main with
generated-sources/avsc/contracts/realtime_event.java: cannot find symbol
symbol: class JsonSchemaParser location: package org.apache.avro
It declares avro-maven-plugin without a version, and this pom defined
avro-maven-plugin.version = 1.11.3 as a property it never used - there was
no pluginManagement entry at all - so the version floated to the newest
release. Avro 1.12 generates code referencing
org.apache.avro.JsonSchemaParser, which does not exist in the 1.11 runtime
the quarkus bom provides, so the generated sources cannot compile against
their own runtime.
The property is now actually used, which makes codegen and runtime match
exactly - the property that matters, since generated code must only
reference apis the runtime has:
avro-maven-plugin:1.11.3:schema
org.apache.avro:avro:jar:1.11.3:compile
Verified end to end: with no version in sse-api's own pom and its submodule
pointed at this change, mvn compile resolves 1.11.3 and succeeds. That is
why the per repo pin in kryptokrauts/soon-market-sse-api#11 was closed in
favour of this.
sse-api is the only consumer that declares the plugin today; the other four
were checked.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unbreaks
soon-market-sse-api's build onmain, in the place that should own the version.The failure
soon-market-sse-apideclaresavro-maven-pluginwithout a version, and this pom definedavro-maven-plugin.version = 1.11.3as a property it never used — there was nopluginManagemententry at all. So Maven resolved the newest release, and Avro 1.12 generates code referencingorg.apache.avro.JsonSchemaParser, which does not exist in the 1.11 runtime the Quarkus BOM provides. The generated sources could not compile against their own runtime.Same shape as the
beanutils.versionduplicate in #3: a version property that existed without being authoritative.The version is correct, not merely pinned
An exact match, which is the property that matters — generated code must only reference APIs the runtime has.
1.11.3is not a choice I made; it is the value this pom already declared and what the Quarkus BOM resolves for the runtime, confirmed withmvn dependency:list.Verified end to end before opening this: with no version in sse-api's own pom and its submodule pointed at this change,
mvn compileresolvesavro-maven-plugin:1.11.3andmvn package -DskipTestssucceeds, format check included. That is what made the per-repo pin in kryptokrauts/soon-market-sse-api#11 unnecessary, and it is now closed in favour of this.soon-market-sse-apiis the only consumer that declares the plugin today — the other four were checked — so nothing else changes behaviour here.Why it surfaced now
Not a regression from the line-ending work, though that is what triggered it. The Docker layer that primes the plugin cache is keyed on
pom.xml, and normalising line endings changed that file, so plugins were re-resolved for the first time in a long while. sse-api'smaintree is byte-identical to the branch tip that built green 23 minutes earlier, which is what ruled the content out.Avro 1.12.0 has been out since August 2024, so that repo had been building on a stale cached plugin ever since. The next change to its pom, whatever it was, would have done this.
After merging
soon-market-sse-apineeds its submodule pointer bumped to pick this up — that is what unbreaks itsmain. The same bump also carries #2, so its startup behaviour changes: the market config and exchange rate caches are now required at boot rather than filled an interval later. Worth knowing that "unbreak the build" and "change startup behaviour" arrive together.soon-market-api,event-processor-contractandscheduled-task-servicewant the bump too, for #2 and #3 rather than for this.