tree: ded56dda22bbc8d5e9dca543827ddf58cb03dadf [search]
  1. src/
  2. pom.xml
  3. README.md
tooling/camel-exe/README.md

Camel :: Exe

Standalone Maven module that builds the native Windows camel-x64.exe and camel-arm64.exe bootstraps for the Camel CLI launcher.

Purpose

WinGet's portable installer (and similar package managers) require a genuine executable as the camel command. A .bat or .cmd shim is not enough — it produces a broken camel.exe symlink. This module compiles minimal native binaries that satisfy that contract.

camel-x64.exe / camel-arm64.exe do not embed Java or run Camel. They resolve WinGet‘s camel.exe symlink, locate camel.bat beside the extracted target, forward the caller’s command line (preserving spaces and Unicode), and return its exit code. All Java discovery and CLI parsing remain in camel.bat and the launcher JAR.

Why a separate module?

The launcher (dsl/camel-jbang/camel-launcher) is a fat JAR with a large upstream dependency tree (jbang core, plugins, repackager, and their transitive Camel deps). The native bootstrap is ~100 lines of C with no Java dependencies. Keeping it here allows:

  • Fast CI — mvn -pl tooling/camel-exe verify -Dcamel.exe.build=true compiles and tests the exe without building the full jbang graph.
  • Clear separation — packaging bootstrap vs. runtime launcher.
  • Reusable artifact — camel-launcher copies the attached exe artifacts into its WinGet-only distribution (bin/camel-x64.exe and bin/camel-arm64.exe inside camel-launcher-*-winget-bin.zip).

Build and test

Requires llvm-mingw (release 20260616 pinned) on PATH. Works on Linux, macOS, or Windows — no host-OS restriction.

mvn -pl tooling/camel-exe verify -Dcamel.exe.build=true

Release and integration builds that produce the WinGet launcher ZIP also build this module first:

mvn -pl tooling/camel-exe,dsl/camel-jbang/camel-launcher -am verify -Dcamel.exe.build=true

The native launcher workflow runs this build twice from clean output directories and compares the SHA-256 values of camel-x64.exe, camel-arm64.exe, and the WinGet ZIP. It also deploys the reactor to a temporary file repository and fails if Maven publishes the WinGet ZIP or a corresponding .sha1 sidecar. A checksum difference is a release failure and must be investigated before changing compiler or linker flags.

See src/main/native/README.md for toolchain setup, compiler flags, and the release-gate profile.