Skip to content

chore(build): build client native library with Maven#46

Open
sklarsa wants to merge 3 commits into
mainfrom
maven-native-binaries-on-demand
Open

chore(build): build client native library with Maven#46
sklarsa wants to merge 3 commits into
mainfrom
maven-native-binaries-on-demand

Conversation

@sklarsa

@sklarsa sklarsa commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • remove checked-in native client binaries and ignore regenerated resource binaries
  • build the host native library during Maven generate-resources and package it under io/questdb/client/bin/
  • keep release packaging Maven-y via -P include-native-artifacts for staged all-platform binaries
  • add an IntelliJ Ant trigger that invokes the same Maven native build executions
  • remove the obsolete workflow that rebuilt and committed native binaries

Testing

  • mvn -pl core -DskipTests package
  • mvn -pl core -Dquestdb.client.native.skip=true -DskipTests package
  • mvn -pl core -P include-native-artifacts -DskipTests package
  • mvn -pl core -Dtest=OsTest test
  • mvn -pl core org.codehaus.mojo:exec-maven-plugin:exec@configure-native org.codehaus.mojo:exec-maven-plugin:exec@build-native

Note: ant is not installed locally, so I verified the Maven commands used by the IntelliJ Ant target directly.

@sklarsa sklarsa changed the title Build client native library with Maven chore(build): build client native library with Maven Jun 12, 2026
@sklarsa

sklarsa commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

Validation/update after follow-up fixes:

Changes pushed:

  • d5bdeeb: CI native build setup for Maven, recursive submodule checkout/init, Windows MSYS2 MinGW/Ninja setup, Windows CMake profile wiring, and include-native-artifacts validation for missing/empty release libraries.
  • bd091c7: fixed the Windows MinGW native build failure by resolving binutils with CMake find_program and explicitly installing mingw-w64-x86_64-binutils in CI. The failing command was archive creation for archives/libasm.a via x86_64-w64-mingw32-ar.

Validation completed:

  • Local mvn -pl core package passed: 2314 tests, 0 failures/errors, 1 skipped.
  • Local native jar packaging verified: generated and packaged darwin-aarch64/libquestdb.dylib.
  • -P include-native-artifacts missing-artifact path fails as expected; complete staged dummy layout passes validate.
  • YAML parses successfully; git diff --check is clean.
  • Downstream QuestDB compile/package passed after switching to GraalVM/JDK 25.
  • Local downstream focused line protocol run used this PR as org.questdb:questdb-client:9.9.9; it had one environmental port-9000 bind error from local gvproxy, not a client/native packaging failure.
  • Azure run 241421 is green: Javadoc, Linux x64, macOS aarch64, macOS x64, and Windows MinGW 2022 x64 all passed. This includes the previously failing Windows native Maven build path and downstream server line tests.

Remaining validation:

  • Validate IntelliJ integration in an actual IntelliJ import/sync/run; this is not covered by Maven or CI.
  • Validate release packaging with real native artifacts for all five target platforms.

@sklarsa sklarsa marked this pull request as ready for review June 12, 2026 18:44
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