Skip to content

chore: generate a Jandex index in the Collaboration Engine jar - #155

Merged
mcollovati merged 1 commit into
mainfrom
chore/generate-jandex-index
Oct 2, 2026
Merged

mcollovati merged 1 commit into
mainfrom
chore/generate-jandex-index

Conversation

@mcollovati

Copy link
Copy Markdown
Contributor

Summary

The collaboration-engine jar now includes a Jandex index of its own classes. The Vaadin Quarkus extension reads this index to find the Collaboration Engine classes, so the Vaadin platform no longer needs to add the jar to an aggregate index. Collaboration Engine was the last artifact still handled that way:

[jandex] Artifacts added to the aggregate index: [collaboration-engine-25.4-SNAPSHOT.jar]

This matches vaadin/flow#25899 and vaadin/flow#26110, which do the same for the Flow runtime modules, and the same change in flow-components (vaadin/flow-components#10240, vaadin/flow-components#10320).

What changed

Behavior change: the published collaboration-engine jar now contains META-INF/jandex.idx. Nothing changes for apps that don't use Jandex. No Java code or public API changes.

  • Root pom.xml:
    • adds jandex-maven-plugin to pluginManagement with a make-index execution
    • adds a jandex.plugin.version property (3.6.0)
    • adds a jandex.format.version property (13), passed to the plugin as indexVersion. The index format is owned by Flow, so this value must stay equal to the one in the Flow root POM; a comment in the POM says so.
  • collaboration-engine/pom.xml: declares the plugin with no configuration of its own. The demo and test modules don't declare it.
  • JandexIndexTest: reads the header of the Collaboration Engine index and of the flow-server index, and fails when the formats differ. When an update of flow.version brings a new format, this test fails until jandex.format.version is set to the new value.
  • scripts/apache2-license-header.txt: the template now uses the spotless $YEAR token instead of hardcoding 2000-2024. Spotless keeps the year in existing headers, so no files change, and it accepts the 2000-2026 header of the new test.

Verification

  • mvn install -pl collaboration-engine passes, including JandexIndexTest
  • mvn spotless:check passes
  • the built jar contains META-INF/jandex.idx in format 13

The collaboration-engine jar now ships a Jandex index of its own classes
in META-INF/jandex.idx, which is where the Vaadin Quarkus extension reads
it from, so the Vaadin platform no longer needs to add it to an
aggregate index. This matches vaadin/flow#25899 and the same change in
flow-components (vaadin/flow-components#10240, #10320).

The index format is owned by Flow: jandex.format.version has the same
value as in the Flow root POM, so that all indexes an application loads
share the same format. JandexIndexTest fails when Collaboration Engine
writes a different format than flow-server.

The license header template now uses the $YEAR token, so that spotless
accepts the header of new files with a later year than 2024 and keeps
the year of existing headers.
@mcollovati
mcollovati merged commit ace3489 into main Oct 2, 2026
3 checks passed
@mcollovati
mcollovati deleted the chore/generate-jandex-index branch October 2, 2026 11:51
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.

2 participants