Running Exported Projects
Overview
When you export a Camel integration to a Maven project using Kaoto, the exported folder includes a .vscode/ directory with pre-configured tasks.json and launch.json files. These give you ready-to-use Run and Debug launch configurations so you can run or deploy your project directly from VS Code without any manual setup.
Two runtimes are supported:
- Camel Quarkus — runs via
quarkus:dev - Camel on Spring Boot — runs via
spring-boot:run
The .vscode/ configurations are only written if the files do not already exist in the target folder, so any customizations you make are never overwritten on a subsequent export.
Prerequisites
- Java 17 or later
- Maven wrapper (
./mvnw) — included automatically in the exported project
Running the project
Open the exported project folder in VS Code, then switch to the Run and Debug panel (Ctrl+Shift+D / Cmd+Shift+D). Click the configuration dropdown at the top of the panel to see the available launch configurations.
Camel Quarkus
Select Run (quarkus:dev) and click the green play button (or press F5).
This triggers the Run (quarkus:dev) background task, which runs:
./mvnw quarkus:dev
The terminal opens automatically and streams the Quarkus dev-mode output. The task is marked as a background task — VS Code considers it started once the Started pattern appears in the output.
Camel on Spring Boot
Select Run (spring-boot:run) and click the green play button (or press F5).
This triggers the Run (spring-boot:run) background task, which runs:
./mvnw spring-boot:run
The terminal opens automatically and streams the Spring Boot startup output.
Deploying to OpenShift
Both runtimes also include a deploy configuration in the dropdown.
Quarkus — Deploy on OpenShift
Select Deploy on OpenShift (Quarkus) and click play. This runs:
./mvnw package -Dquarkus.openshift.deploy=true
Spring Boot — Deploy on OpenShift
Select Deploy on OpenShift (Spring Boot) and click play. This runs:
./mvnw package oc:build oc:apply
OpenShift deployment requires the OpenShift CLI (oc) and an active cluster login. Ensure you are logged in with oc login before triggering the deploy configuration.
Known Limitations
DataMapper files are not copied during export
If your integration uses a DataMapper step, the export does not copy the DataMapper-specific files to the Maven project. You must copy them manually before running the exported project.
Do not open the DataMapper step in the exported project until you have copied all required files. Opening the DataMapper without the .kaoto file present will reset the mapping and overwrite your .xsl file with an empty transformation — losing all your mapping work.
The following files are not included by the camel jbang export command:
| File | Description |
|---|---|
.kaoto | Workspace metadata file — stores xsltPath, sourceBody.filePath, and targetBody.filePath (all paths are relative to the .kaoto file itself) |
| XSD / JSON schema files | Files listed in sourceBody.filePath[] and targetBody.filePath[] inside .kaoto |
| XSL transformation file | File referenced by xsltPath in .kaoto — your mapping definition, not regenerated by re-exporting |
The simplest approach — preserve the original directory structure:
Copy the .kaoto file next to the exported Camel route file, then copy the schema and XSL files at the same paths relative to .kaoto as they had in your original workspace. This preserves all filePath and xsltPath references inside .kaoto without any editing.
Manual steps:
- Back up the XSL transformation file referenced by
xsltPathin.kaoto— it is your mapping definition and will not be restored by re-exporting. - Copy the
.kaotofile next to the exported Camel route (e.g.src/main/resources/camel/). - Copy all schema files (listed in
sourceBody.filePathandtargetBody.filePath) preserving their paths relative to.kaoto. - Copy the XSL file preserving its path relative to
.kaoto.
If you need to place files in different locations, open the .kaoto file and update xsltPath, sourceBody.filePath, and targetBody.filePath to match the new paths (all relative to the .kaoto file).
Next Steps
- Runtime Selector — Choose the Camel runtime (Quarkus, Spring Boot, or Main) for your integration before exporting
- Executing Integrations — Run integrations directly from VS Code without exporting to a Maven project