Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions karavan-vscode/AGENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ line**. `${NAMESPACE}` and `${DATE}` are resolved later as **terminal env vars**
value `.export`. `readCamelYamlFiles()` filters exported copies out of the file list.
- **JBang command shape** (`jbang.prepareCommand`):
`jbang "-Dcamel.jbang.version=<camel.version>" camel@apache/camel <cmd>`.
The version option is omitted when `camel.version` is unset, empty, or whitespace-only.
- **Run** = `run * [--max-messages=N] [--local-kamelet-dir=…] [--dev]`.
**Export** = `export --fresh --directory=<path> [--local-kamelet-dir=…]`.
**Runtime run** appends `&& mvn clean compile <quarkus:dev|spring-boot:run|camel:run> -f <path>`.
Expand Down
3 changes: 3 additions & 0 deletions karavan-vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ Build-in catalogues:

# Run integration

The **Camel version** extension setting controls the version passed to Camel JBang.
Leave it empty to omit `-Dcamel.jbang.version` and let Camel JBang select its default version.

## Run integration locally
* Run in UI: click `Run` button

Expand Down
2 changes: 1 addition & 1 deletion karavan-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"camel.version": {
"type": "string",
"default": "4.18.1",
"description": "Camel version",
"description": "Camel version. Leave empty to use the default version selected by Camel JBang.",
"scope": "machine",
"order": 10
},
Expand Down
6 changes: 3 additions & 3 deletions karavan-vscode/src/jbang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ export async function camelJbangGenerate(rootPath: string, openApiFullPath: stri
}

function prepareCommand(command: string): string {
const version = workspace.getConfiguration().get("camel.version");
return "jbang \"-Dcamel.jbang.version=" + version + "\" camel@apache/camel " + command;
const version = workspace.getConfiguration().get<string>("camel.version");
const versionOption = version && version.trim().length > 0 ? " \"-Dcamel.jbang.version=" + version + "\"" : "";
return "jbang" + versionOption + " camel@apache/camel " + command;
}

export function camelJbangRun() {
Expand Down Expand Up @@ -84,4 +85,3 @@ function executeJbangCommand(rootPath: string, command: string, callback: (code:
}
}