Skip to content

chore: manage the avro-maven-plugin version in the parent - #5

Merged
marc0olo merged 1 commit into
mainfrom
chore/manage-avro-plugin-version
Aug 21, 2026
Merged

chore: manage the avro-maven-plugin version in the parent#5
marc0olo merged 1 commit into
mainfrom
chore/manage-avro-plugin-version

Conversation

@marc0olo

Copy link
Copy Markdown
Member

Unbreaks soon-market-sse-api's build on main, in the place that should own the version.

The failure

generated-sources/avsc/contracts/realtime_event.java:[8,23] cannot find symbol
  symbol:   class JsonSchemaParser
  location: package org.apache.avro

soon-market-sse-api 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 Maven resolved the newest release, and Avro 1.12 generates code referencing org.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.version duplicate in #3: a version property that existed without being authoritative.

The version is correct, not merely pinned

avro-maven-plugin:1.11.3:schema
org.apache.avro:avro:jar:1.11.3:compile

An exact match, which is the property that matters — generated code must only reference APIs the runtime has. 1.11.3 is not a choice I made; it is the value this pom already declared and what the Quarkus BOM resolves for the runtime, confirmed with mvn 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 compile resolves avro-maven-plugin:1.11.3 and mvn package -DskipTests succeeds, 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-api is 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's main tree 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-api needs its submodule pointer bumped to pick this up — that is what unbreaks its main. 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-contract and scheduled-task-service want the bump too, for #2 and #3 rather than for this.

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>
@marc0olo
marc0olo merged commit b5c80fb into main Aug 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant