Claus Ibsen created CAMEL-27560:
-----------------------------------
Summary: camel-jbang - run/export split, stages 4 to 7: kubernetes
exporter, the last Export subclasses, remove ExportBaseCommand,
camel-kamelet-main optional
Key: CAMEL-27560
URL: https://issues.apache.org/jira/browse/CAMEL-27560
Project: Camel
Issue Type: Improvement
Components: camel-jbang
Reporter: Claus Ibsen
Fix For: 4.25.0
Follow-up of CAMEL-24724 (stages 4 to 7 of the run/export split). Stages 1
(CAMEL-24727) and 2 (CAMEL-24726) are done in 4.24.0: the engine is the
{{camel-jbang-run}} module, with {{ProjectExporter}} / {{ExportRequest}} and
{{ProjectRunner}} / {{RunContext}} as the Java API (docs page "Java API for
Export and Run"). The CLI commands for run and export already call it. Stage 3
(the TUI calls {{ProjectRunner}}) is CAMEL-24728.
What is left, as checked on main:
h3. Stage 4 - camel-jbang-plugin-kubernetes
{{KubernetesExport}} still extends the picocli {{Export}} command. Make it an
exporter on the {{camel-jbang-run}} API, with a thin picocli command on top.
h3. Stage 5 - the last Export subclasses
{{DependencyList}} and {{SBOMGenerator}} (and what is left in
camel-jbang-plugin-test) still extend {{ExportCommandBase}} ->
{{ExportBaseCommand}}. Move them onto {{ProjectExporter}} / {{ExportRequest}}.
h3. Stage 6 - remove ExportBaseCommand
Once nothing extends them, delete {{ExportBaseCommand}} and
{{ExportCommandBase}} and finalise the packages. No code outside Camel uses
these classes, so no deprecated aliases are needed.
h3. Stage 7 - camel-kamelet-main optional
The {{DependencyResolver}} interface exists in
{{org.apache.camel.dsl.jbang.run.export}}, but {{camel-kamelet-main}} is still
a required dependency of {{camel-jbang-run}}. Make it optional, so a consumer
with its own {{DependencyResolver}} (for example one based on the catalog) does
not need it.
h3. Must keep
* The golden tests of run and export ({{RunExportGoldenTest}}) pass unchanged:
never update them with {{-Dcamel.golden.update=true}} during a refactor.
* The exit codes of the CLI (CAMEL-25388).
* No change in behaviour of {{camel export}}, {{camel run}}, {{camel dependency
list}}, {{camel sbom}} and {{camel kubernetes export}}.
Each stage can be its own PR.
_Claude Code on behalf of davsclaus (Claus Ibsen)_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)