etzel-mes opened a new pull request, #28370: URL: https://github.com/apache/camel/pull/28370
# Description Fixes [CAMEL-25186](https://issues.apache.org/jira/browse/CAMEL-25186): the export-based commands miss the component used by the delegate URI of a `master:` endpoint. `camel run` runs `master:lock:timer:tick` fine, but `camel export` (camel-main, Spring Boot, Quarkus) and `camel dependency list` produce a project whose pom has `camel-master` and not `camel-timer`; the exported application fails at startup with `NoSuchEndpointException`. `kubernetes export`/`kubernetes run`, `run --runtime=...`, `dependency update`/`copy` and `sbom` go through the same silent export run, so they are affected as well (read from the code, not run). Cause: during the silent export run `DependencyDownloaderComponentResolver` stubs every component outside `ACCEPTED_STUB_NAMES`, including `master`. The stubbed `MasterEndpoint` never calls `getEndpoint(delegateUri)`, so the delegate's component is never resolved and never recorded. Fix: `DownloadEndpointStrategy`, which already resolves what `language:` and `dataformat:` endpoints embed (CAMEL-22015), now also resolves the delegate endpoint of a stubbed `master:` endpoint, split as `MasterComponent.createEndpoint` splits it. `master` itself stays stubbed, so export still needs no cluster service, and a real `MasterEndpoint` (`camel run`) is never touched. This completes CAMEL-22616, which made `camel.cluster.*` work after export and detects the cluster service JAR; the delegate was the remaining gap. Accepting `master` in the stub list was rejected instead, in line with 33b24bf77: both accept lists would change, and export then fails with "No cluster service found" unless a cluster service is configured. One side effect to be aware of: `camel run` with a `--stub` pattern that covers `master` (for example `--stub=remote`, since the catalog marks `master` as remote) now also creates the delegate endpoint, as a real endpoint when the pattern does not cover it. If you prefer, the branch can be limited to export runs. Who hits this: the same gap was found in Camel K (apache/camel-k#6830, fixed on its side in #6847 while #6456 moves project generation to `camel export`), and the canonical `master:lock:timer:...` example run through `camel kubernetes run`. `ExportTest.shouldExportMasterDelegate` covers camel-main, Spring Boot and Quarkus; it fails without the change (`camel-timer` missing) and passes with it. The whole `ExportTest` class passes (142 tests). `zookeeper-master` splits its URI the same way and is not covered here; it can follow in a separate change if wanted. JIRA user: mardonius. @davsclaus # Target - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch) # Tracking - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it). # Apache Camel coding standards and style - [x] 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. (Not the full root build: `dsl/camel-kamelet-main` and `dsl/camel-jbang/camel-jbang-core` were built with `-Psourcecheck`, `formatter:format` and `impsort:sort`; the change touches no generated files.) # AI-assisted contributions - [x] 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. 🤖 Generated with [Claude Code](https://claude.com/claude-code) _Claude Code on behalf of etzel-mes_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
