davsclaus opened a new pull request, #28747: URL: https://github.com/apache/camel/pull/28747
_Claude Code on behalf of davsclaus_ Stage 2e of [CAMEL-24726](https://issues.apache.org/jira/browse/CAMEL-24726): the docs of the Java API of export and run, after the runner (#28739, #28740, #28741, #28743) and the rename of the module to camel-jbang-run (#28746). Tools such as Kaoto, an IDE or an AI agent can export and run Camel integrations from Java, the same way as `camel export` and `camel run`, which use this API themselves. This PR documents how. ## Changes - **A new page, "Camel CLI - Java API for Export and Run"** (`camel-jbang-java-api.adoc`), under "Export to Maven" in the navigation and in the table of the Camel CLI page: - the dependency (`camel-jbang-run`, without camel-jbang-core or picocli), and the API at a glance: `ExportRequest`/`RunRequest`, `ExportContext`/`RunContext`, `ProjectExporter`/`ProjectRunner`, `RunningIntegration`; - exporting a project, with the export context (printer, confirmation, start failure listener) and the dependency resolver; - running an integration: `start`, `run`, the handle (`pid`, `waitFor`, `stop`), where each runtime runs (a Maven project with Camel Main, Spring Boot and Quarkus; the current JVM with the jbang runtime), an existing Maven project, and the log of the previous run; - configure, then start (`ProjectRunner.configure`, `ConfiguredRun`), as `camel run` does to decide between this JVM and another one; - the run context: the process starter (to redirect the output of Maven and of the application), the Java home, the prepared listener, the start and reload failure listeners, the exit code of a failed start, the initial properties; - what the API leaves to the tool: logging, system properties, the work directory, the Maven repositories. - **"Exporting from Java"** on the Export to Maven page is a short example with a link to the new page. - **`ProjectRunner.configure`**: a comment on why it finds a directory as the file to run again (a caller that configures the run itself, as `camel run` does), as suggested in the review of #28743. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0128ThHB3iQdrvSRLVBGRrdP -- 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]
