CAMEL-23566: camel-jbang - Source examples from camel-jbang-examples repository#23375
Merged
Conversation
…repository Replace the 3 hardcoded built-in examples with a catalog-driven system sourcing examples from the apache/camel-jbang-examples repository. - Add ExampleHelper with catalog loading, filtering by name/tag/level, bundled extraction (with subdirectory support), and GitHub fetch - Refactor Run.java --example/--example-list to use the catalog JSON - --example-list now shows NAME, LEVEL, DESCRIPTION, SOURCE columns and supports filtering (e.g. --example-list beginner, --example-list ai) - Bundled examples (7) work offline, others fetch from GitHub on demand - Add -Psync-example-catalog Maven profile to download latest catalog - Bundle 7 curated examples with READMEs: timer-log, rest-api, cron-log, circuit-breaker, groovy, routes, xslt Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
…ple-list Remove the separate --example-list flag. Using --example without a value now lists available examples. Group examples by level (beginner first), sort alphabetically within groups, and use emoji icons for source/docker indicators to give descriptions more room. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
🧪 CI tested the following changed modules:
💡 Manual integration tests recommended:
All tested modules (6 modules)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ExampleHelperwith catalog loading, filtering by name/tag/level, bundled extraction, and GitHub fetch for online examples--example/--example-listinRun.javato use the catalog JSON--example-listnow shows NAME, LEVEL, DESCRIPTION, SOURCE columns and supports filtering (e.g.--example-list beginner,--example-list ai)-Psync-example-catalogMaven profile to download the latest catalog from the examples repoThe catalog system uses
camel-jbang-example-catalog.jsongenerated from per-examplemetadata.jsonfiles in the examples repo (see apache/camel-jbang-examples@66b6871).Test plan
ExampleHelperTest— 14 tests covering catalog loading, filtering, extraction, GitHub URL generationRunTest— 11 tests covering listing, filtering, unknown example suggestions, option parsingcamel run --example-listshows all 21 examples with levelscamel run --example-list beginnerfilters to 7 beginner examplescamel run --example circuit-breakerruns the bundled example offline🤖 Generated with Claude Code
Claude Code on behalf of Claus Ibsen