Skip to content

CAMEL-23703: camel-launcher - fix brew audit --strict redundant version - #25509

Draft
ammachado wants to merge 1 commit into
apache:mainfrom
ammachado:CAMEL-23703-fix-brew-audit-redundant-version
Draft

CAMEL-23703: camel-launcher - fix brew audit --strict redundant version#25509
ammachado wants to merge 1 commit into
apache:mainfrom
ammachado:CAMEL-23703-fix-brew-audit-redundant-version

Conversation

@ammachado

@ammachado ammachado commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

formula.rb.tpl (the Homebrew formula template rendered by JReleaser for camel-launcher) set both a url and an explicit version field. Homebrew's brew audit --strict flags an explicit version as redundant whenever it can already be inferred by scanning the url (which it can here, since the URL embeds the Maven coordinate version). Any real submission of the generated formula to homebrew-core would fail this audit gate.

Fix: drop the redundant version line from the template.

camel-validate.sh's Homebrew validation step previously read the expected post-install version back out of that same version field (needed because in CI's test-mode staging the formula's real POM version, e.g. a -SNAPSHOT, differs from the release-manager-facing resolved version). Removing the field regressed that check, so it now reads the expected version out of the formula's url instead, captured before the test-mode step rewrites that url to a local file:// path for the offline install.

Found and fixed while running camel-package.sh prepare + camel-validate.sh all for the already-released camel-4.22.0 version to verify the launcher's JReleaser release procedure end-to-end.

Verified locally: re-ran camel-package.sh prepare --channel stable + camel-validate.sh all in the project's own CAMEL_PACKAGE_TEST_MODE (the same mechanism .github/workflows/package-native-validation.yml uses in CI) — brew audit --strict now reports no offenses, and the post-install version check passes.

Target

  • I checked that the commit is targeting the correct branch (Camel 4 uses the main branch)

Tracking

  • If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.
  • I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

This change only touches a shell script and a Mustache template (no Java sources), so the Maven formatter/impsort step has nothing to reformat; the pre-push hook's mvn formatter:format impsort:sort ran clean with no changes. A full root build was not run given the change's scope.

AI-assisted contributions

  • If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., Co-authored-by trailers) and the PR description identifies the AI tool used.

Claude Code (Sonnet 5) on behalf of Adriano Machado (@ammachado)

Homebrew's brew audit --strict rejects a formula's `version` field when
it merely duplicates the version brew already scans from the `url`
field. formula.rb.tpl set both, so any real submission of the generated
formula to homebrew-core would fail that gate. Removed the redundant
`version` line.

camel-validate.sh's homebrew version check previously read the expected
post-install version from that same `version` field, so removing it
regressed the check. It now reads the version out of the formula's own
`url` before Step 2 rewrites that url to a local file:// path for the
offline test-mode install.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ammachado ammachado added the task label Aug 14, 2026
@ammachado ammachado self-assigned this Aug 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions github-actions Bot added the dsl label Aug 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-launcher

🔬 Scalpel shadow comparison — Scalpel: 2 tested, 0 compile-only — current: 1 all tested

Maveniverse Scalpel detected 2 affected modules (current approach: 1).

⚠️ Modules only in Scalpel (1)
  • camel-launcher

Skip-tests mode would test 2 modules (1 direct + 1 downstream), skip tests for 0 (generated code, meta-modules)

Modules Scalpel would test (2)
  • camel-launcher
  • camel-launcher-container

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

💡 Manual integration tests recommended:

You modified dsl/camel-jbang/camel-launcher. The related integration tests in dsl/camel-jbang/camel-jbang-it are excluded from CI. Consider running them manually:

mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
All tested modules (2 modules)
  • Camel :: Launcher
  • Camel :: Launcher :: Container

⚙️ View full build and test results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants