Skip to content

Build: Replace Thrift and Drill FMPP Maven plugins - #18612

Draft
HTHou wants to merge 4 commits into
apache:masterfrom
HTHou:codex/replace-thrift-maven-plugin
Draft

Build: Replace Thrift and Drill FMPP Maven plugins#18612
HTHou wants to merge 4 commits into
apache:masterfrom
HTHou:codex/replace-thrift-maven-plugin

Conversation

@HTHou

@HTHou HTHou commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Description

Replace thrift-maven-plugin and drill-fmpp-maven-plugin with generation configured in the parent POM, following Apache Thrift's Maven guidance after apache/thrift#3789.

Thrift generation uses exec-maven-plugin and build-helper-maven-plugin. Preserve the compiler download and override, generator options, Java/Python/Go/C# outputs, and IDL resources. Resolve shared IDL directly from source for clean reactor builds. Java source JARs retain Java and IDL files; they no longer bundle the generated Python/Go/C# files, which remain available in their existing output directories.

FMPP generation uses a shared Groovy script through the existing groovy-maven-plugin, with pinned FMPP and FreeMarker versions matching the previous generator. Generate into a unique temporary directory per invocation, publish only after all templates succeed, and replace only files whose contents changed. Unchanged files keep their timestamps. Each module owns its output, and generated Java source registration is centralized in the parent POM.

Validation

On macOS ARM64 / JDK 17, with build caching disabled:

  • All 50 default reactor modules passed clean test-compile with -T 4 twice for both the original and modified versions, followed by incremental builds and full package builds.

  • DataNode and its reactor dependencies passed clean test-compile with -T 4 for both English and Chinese locales.

  • Full clean verify -Dmaven.test.skip=true -Dmdep.analyze.skip=true -P enable-sbom-check passed. The SBOM Groovy execution remains root-only while FMPP generation is inherited by both template modules.

  • All 636 Thrift outputs and 158 FMPP outputs are byte-for-byte identical to the original generators. All 18,371 production and 1,848 test class files are identical.

  • Compared all 89 JARs and 10 ZIPs, including nested archives: runtime content differs only in embedded changed POMs. Source JAR differences are the intentional removal of non-Java Thrift sources and existing OpenAPI generation timestamps.

  • Local checks passed for unchanged timestamps, selective updates, template failure before publishing, independent concurrent FMPP generation, and paths containing spaces. Test scripts are not included in this PR.

  • A custom Thrift compiler path containing spaces succeeds; a compiler returning a nonzero exit status fails the build.

  • Formatting checks and git diff --check passed.

  • This PR has been self-reviewed.

@HTHou HTHou changed the title Build: Replace obsolete Thrift Maven plugin Build: Replace thrift-maven-plugin with exec-maven-plugin Sep 9, 2026
@HTHou
HTHou marked this pull request as draft September 9, 2026 09:47
@HTHou HTHou changed the title Build: Replace thrift-maven-plugin with exec-maven-plugin Build: Replace Thrift and Drill FMPP Maven plugins Sep 9, 2026
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