Claus Ibsen created CAMEL-23667:
-----------------------------------

             Summary: Add --stub=remote flag to stub only remote components via 
catalog resolution
                 Key: CAMEL-23667
                 URL: https://issues.apache.org/jira/browse/CAMEL-23667
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang
            Reporter: Claus Ibsen


When using --stub=all, all components are stubbed except for a hardcoded 
accepted list (direct, seda, log, timer, etc). This requires manually 
maintaining the accepted list as new local components are added.

The Camel catalog already has a {{remote}} boolean field on ComponentModel that 
classifies whether a component connects to an external/remote system. For 
example, {{kafka}} has {{remote=true}} while {{timer}} has {{remote=false}}.

Add a new {{--stub=remote}} special flag that uses the catalog to resolve which 
components to stub. When {{--stub=remote}} is specified, only components where 
the catalog reports {{remote=true}} would be stubbed. This is more maintainable 
than the hardcoded accepted list approach and automatically handles new 
components correctly.

This would be useful for the TUI Stub checkbox feature, which currently uses 
{{--stub=all}} to skip Docker infra services when running examples.

Key files:
- {{DependencyDownloaderComponentResolver.java}} in camel-kamelet-main (stub 
resolution logic)
- {{ComponentModel.java}} in camel-tooling-model (remote field definition)
- Component JSON files in catalog (remote field values)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to